On 04.10.2011 22:52, Emad Steitieh wrote:
Thank you for your email. How can I make the DVD Device a Live CD/DVD
like in VBox GUI?

The GUI is also an API client - so it can serve as a sample. Likewise for VBoxManage.

Does your code save the settings at the end? Otherwise it's expected behavior that the changes don't make it to the VM config.

Klaus

Regards,
emadns

*From:* Huihong Luo <[email protected]>
*To:* "[email protected]" <[email protected]>; Emad Steitieh
<[email protected]>
*Sent:* Tuesday, October 4, 2011 7:37 PM
*Subject:* Re: [vbox-dev] Live CD/DVD Setting
/* Attach live or empty CD/DVD ROM Device */
CVirtualBox vbox = vboxGlobal().virtualBox();
QVector <CMedium> dvds = vbox.GetHost().GetDVDDrives();
QString dvdId(
"");
if(dvds.count() > 0)
{
dvdId = dvds[0].GetId();
vmedium = vboxGlobal().findMedium(dvdId);
medium = vmedium.medium();
m.AttachDevice (ctrDvdName, 1, 0, KDeviceType_DVD, medium);
}
else
{
m.AttachDevice (ctrDvdName, 1, 0, KDeviceType_DVD, CMedium());
}


--- On *Tue, 10/4/11, Emad Steitieh /<[email protected]>/* wrote:


    From: Emad Steitieh <[email protected]>
    Subject: [vbox-dev] Live CD/DVD Setting
    To: "[email protected]" <[email protected]>
    Date: Tuesday, October 4, 2011, 3:10 AM

    Hello Experts,
    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
    Regards,
    emadns


_______________________________________________
vbox-dev mailing list
[email protected]
https://www.virtualbox.org/mailman/listinfo/vbox-dev

Reply via email to