<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div><span>Thank you for your email. How can I make the DVD Device a Live CD/DVD like in VBox GUI?</span></div><div><span></span> </div><div><span>Regards,</span></div><div><span>emadns</span></div><div><br></div><div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"><div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"><font size="2" face="Arial"><div style="margin: 5px 0px; padding: 0px; border: 1px solid rgb(204, 204, 204); height: 0px; line-height: 0; font-size: 0px;" class="hr" contentEditable="false" readonly="true"></div><b><span style="font-weight: bold;">From:</span></b> Huihong Luo <huisinro@yahoo.com><br><b><span style="font-weight: bold;">To:</span></b> "vbox-dev@virtualbox.org" <vbox-dev@virtualbox.org>; Emad Steitieh
 <emadns@yahoo.com><br><b><span style="font-weight: bold;">Sent:</span></b> Tuesday, October 4, 2011 7:37 PM<br><b><span style="font-weight: bold;">Subject:</span></b> Re: [vbox-dev] Live CD/DVD Setting<br></font><wbr>
<div id="yiv1462225565"><table border="0" cellSpacing="0" cellPadding="0"><tbody><tr><td style="font: inherit; font-size-adjust: inherit; font-stretch: inherit;" vAlign="top"><font color="#008000" size="2"><font color="#008000" size="2">
<div>/* Attach live or empty CD/DVD ROM Device */</div></font></font><font size="2">
<div>CVirtualBox vbox = vboxGlobal().virtualBox();</div>
<div>QVector <CMedium> dvds = vbox.GetHost().GetDVDDrives(); </div>
<div>QString dvdId(</div></font><div><font color="#800000" size="2"><font color="#800000" size="2">""</font></font><font size="2">);</font></div><font size="2">
<div></div></font><div><font color="#0000ff" size="2"><font color="#0000ff" size="2">if</font></font><font size="2"> (dvds.count() > 0)</font></div><font size="2">
<div>{</div>
<div>dvdId = dvds[0].GetId();</div>
<div>vmedium = vboxGlobal().findMedium(dvdId);</div>
<div>medium = vmedium.medium();</div>
<div>m.AttachDevice (ctrDvdName, 1, 0, KDeviceType_DVD, medium);</div>
<div>}</div>
<div></div></font><div><font color="#0000ff" size="2"><font color="#0000ff" size="2">else</font></font></div><font color="#0000ff" size="2"><font color="#0000ff" size="2"></font></font><font size="2">
<div>{ </div>
<div>m.AttachDevice (ctrDvdName, 1, 0, KDeviceType_DVD, CMedium());</div>
<div>}</div></font><br><br>--- On <b>Tue, 10/4/11, Emad Steitieh <i><emadns@yahoo.com></i></b> wrote:<br>
<blockquote style="padding-left: 5px; margin-left: 5px; border-left-color: rgb(16, 16, 255); border-left-width: 2px; border-left-style: solid;"><br>From: Emad Steitieh <emadns@yahoo.com><br>Subject: [vbox-dev] Live CD/DVD Setting<br>To: "vbox-dev@virtualbox.org" <vbox-dev@virtualbox.org><br>Date: Tuesday, October 4, 2011, 3:10 AM<br><br>
<div id="yiv1462225565">
<div style="color: rgb(0, 0, 0); font-family: times new roman, new york, times, serif; font-size: 12pt; background-color: rgb(255, 255, 255);">
<div>Hello Experts,</div>
<div> </div>
<div>I tried to find the API that makes a DVD live but could not. If you add a DVD drive to a machine you have the option to set it to be Live CD/DVD. How can I do that using the MSCOM? Thank you</div>
<div> </div>
<div>Regards,</div>
<div>emadns</div>
<div> </div></div></div><br>-----Inline Attachment Follows-----<br><br>
<div class="yiv1462225565plainMail">_______________________________________________<wbr>vbox-dev mailing list<wbr><a href="http://us.mc1603.mail.yahoo.com/mc/compose?to=vbox-dev@virtualbox.org" rel="nofollow" target="_blank">vbox-dev@virtualbox.org</a><wbr><a href="https://www.virtualbox.org/mailman/listinfo/vbox-dev" rel="nofollow" target="_blank">https://www.virtualbox.org/mailman/listinfo/vbox-dev</a><wbr></div></blockquote></td></tr></tbody></table></div><wbr><wbr></div></div></div></body></html>