[vbox-dev] VirtualBox SDK question

Stephen Taylor steve.taylor at securecommand.com
Wed Aug 5 15:15:42 GMT 2009

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?

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?

Thank you for taking the time to help with these issues.


More information about the vbox-dev mailing list