[vbox-dev] VirtualBox SDK question

Klaus Espenlaub Klaus.Espenlaub at Sun.COM
Wed Aug 5 16:32:09 GMT 2009

Stephen Taylor schrieb:
> Hi All,
> I have a couple of questions regarding developing with the VirtualBox API:
> Right now we are compiling against virtualbox by including the headers 
> from the open source edition for the COM glue code (like ComPtr, and 
> COMGETTER), and then linking against the SDK for the VirtualBox_i.c file 
> that contains the interface GUIDs.  Other glue classes like Bstr throw 
> compiler errors when we try to use them (can't find it).
> Ideally we'd want to just compile against the SDK, but it seems that it 
> contains no glue code, such as support for ComPtr.  Looking at the 
> sample in the SDK contains this blurb:
> "Currently, there is no separate sample program that uses the VirtualBox 
> MS COM XPCOM Glue library. Please refer to the sources of stock 
> VirtualBox applications such as the VirtualBox GUI frontend or the 
> VBoxManage command line frontend."
> Is the glue code included in the sdk, or will I have to continue to 
> compile against the OSE?

No, the glue headers are not part of OSE right now. Will see if we can 
simplify this in the future.

> I've also noticed that using Visual Studio 2008 to compile against the 
> OSE give errors in the VirtualBox code.  An example of this is in line 
> 188 of \com\string.h, where it can't convert the parameter types 
> implicitly.  I have to fix by explicitly casting types to what the 
> compiler is expecting (other similar errors are in \com\guid.h).  Am I 
> missing something, or is there something I can do where I won't need to 
> fix these errors each time a new version of VBox comes out?

Not sure why we don't get those errors...


More information about the vbox-dev mailing list