[vbox-dev] IMachine methods in source code?

Frank Mehnert frank.mehnert at oracle.com
Fri Jun 6 15:10:54 GMT 2014


Hi Johannes,

1. Please could you reply to the list? Other users might be able to help
   you or might be interested in your problems.

2. To read values from the VBox settings file you don't need the file
   path but should use the CFGM API. You will find this API in
   include/VBox/vmm/cfgm.h.

Kind regards,

Frank

On Friday 06 June 2014 16:40:04 you wrote:
> Becouse i want to read some value from VMname.vbox (the xml file). So want
> to obtain the path of VM, becouse the .vbox file is in the same folder.
> And i'm looking for a way for read value from xml file
> 
> 2014-06-06 15:27 GMT+02:00 Frank Mehnert <frank.mehnert at oracle.com>:
> > Sorry, that information is not available in VMM and I don't see the
> > reason why you would need it. And beyond the doxygen'd source code
> > there is no further documentation.
> > 
> > Kind regards,
> > 
> > Frank
> > 
> > On Friday 06 June 2014 15:12:37 Johannes DeWitt wrote:
> > > Thanks.
> > > Once i have that pRoot, how can i obtain for example the path of the
> > > machine (like the GetSettingsFilePath() ) ?
> > > If you don't have time for answer these specific questions, can you tell
> > 
> > me
> > 
> > > where can i find the documentation about the tree attributes?
> > > 
> > > 2014-06-06 14:51 GMT+02:00 Frank Mehnert <frank.mehnert at oracle.com>:
> > > > Johannes,
> > > > 
> > > > On Friday 06 June 2014 14:46:46 Johannes DeWitt wrote:
> > > > > I, i need to use come IMachine methods in source code. For example,
> > 
> > if a
> > 
> > > > > want to use the GetSettingsFilePath() function (used in
> > > > > tstVBoxAPIXPCOM.cpp) in a cpp file of the source code, for example
> > 
> > in a
> > 
> > > > cpp
> > > > 
> > > > > file in /src/VBox/VMM/VMMAll/, how can i do it?
> > > > > And which headers files i need to include?
> > > > 
> > > > that's actually not the intended way to use !VirtualBox. VMM and Main
> > > > are strictly separated, and in particular the IMachine code you are
> > > > talking about lives in VBoxSVC while the VMM code lives in the VBoxSVC
> > > > client (either the VirtualBox process or the VBoxHeadless process).
> > > > 
> > > > Inside VMM you should always have a pRoot handle,
> > > > 
> > > >   pRoot = CFGMR3GetRoot(pVM);
> > > > 
> > > > Using this pRoot handle you can access the CFGM tree for that
> > 
> > particular
> > 
> > > > VM.
> > > > 
> > > > Kind regards,
> > > > 
> > > > Frank
> > > > --
> > > > Dr.-Ing. Frank Mehnert | Software Development Director, VirtualBox
> > > > ORACLE Deutschland B.V. & Co. KG | Werkstr. 24 | 71384 Weinstadt,
> > 
> > Germany
> > 
> > > > Hauptverwaltung: Riesstr. 25, D-80992 München
> > > > Registergericht: Amtsgericht München, HRA 95603
> > > > Geschäftsführer: Jürgen Kunz
> > > > 
> > > > Komplementärin: ORACLE Deutschland Verwaltung B.V.
> > > > Hertogswetering 163/167, 3543 AS Utrecht, Niederlande
> > > > Handelsregister der Handelskammer Midden-Niederlande, Nr. 30143697
> > > > Geschäftsführer: Alexander van der Ven, Astrid Kepper, Val Maher
> > > > 
> > > > _______________________________________________
> > > > vbox-dev mailing list
> > > > vbox-dev at virtualbox.org
> > > > https://www.virtualbox.org/mailman/listinfo/vbox-dev
> > 
> > --
> > Dr.-Ing. Frank Mehnert | Software Development Director, VirtualBox
> > ORACLE Deutschland B.V. & Co. KG | Werkstr. 24 | 71384 Weinstadt, Germany
> > 
> > Hauptverwaltung: Riesstr. 25, D-80992 München
> > Registergericht: Amtsgericht München, HRA 95603
> > Geschäftsführer: Jürgen Kunz
> > 
> > Komplementärin: ORACLE Deutschland Verwaltung B.V.
> > Hertogswetering 163/167, 3543 AS Utrecht, Niederlande
> > Handelsregister der Handelskammer Midden-Niederlande, Nr. 30143697
> > Geschäftsführer: Alexander van der Ven, Astrid Kepper, Val Maher
> > 
> > _______________________________________________
> > vbox-dev mailing list
> > vbox-dev at virtualbox.org
> > https://www.virtualbox.org/mailman/listinfo/vbox-dev

-- 
Dr.-Ing. Frank Mehnert | Software Development Director, VirtualBox
ORACLE Deutschland B.V. & Co. KG | Werkstr. 24 | 71384 Weinstadt, Germany

Hauptverwaltung: Riesstr. 25, D-80992 München
Registergericht: Amtsgericht München, HRA 95603
Geschäftsführer: Jürgen Kunz

Komplementärin: ORACLE Deutschland Verwaltung B.V.
Hertogswetering 163/167, 3543 AS Utrecht, Niederlande
Handelsregister der Handelskammer Midden-Niederlande, Nr. 30143697
Geschäftsführer: Alexander van der Ven, Astrid Kepper, Val Maher




More information about the vbox-dev mailing list