[vbox-dev] VirtualBox Coding questions

Alexey Eromenko al4321 at gmail.com
Sat Jan 7 17:17:49 PST 2012


I'm trying to modify VirtualBox GUI to include my new feature

In file "src/VBox/Frontends/VirtualBox/src/wizards/newvm/UINewVMWzd.cpp"
(vbox SVN) I see:
  m.AttachDevice(ctrDvdName, 1, 0, KDeviceType_DVD, CMedium());

I try to change the code to open DVD medium:

              QString isopath = "/tmp/cd1.iso";
              CMedium mymedium = vboxGlobal().openMedium(isopath,
KDeviceType_DVD, KAccessMode_ReadOnly, 0);
              m.AttachDevice(ctrDvdName, 1, 0, KDeviceType_DVD, mymedium);

I get compiling error:

In member function ‘bool UINewVMWzdPage5::constructMachine()’:
error: no matching function for call to
‘VBoxGlobal::openMedium(QString&, KDeviceType, KAccessMode, int)’
note: candidates are: QString
VBoxGlobal::openMedium(VBoxDefs::MediumType, QString, QWidget*)

What would be the correct way ?

Thanks in advance,
-Alexey Eromenko "Technologov", 08.01.2012.

More information about the vbox-dev mailing list