Page 1 of 1

COM API 4.2 / 4.3 compatibility

PostPosted: 24. Oct 2013, 04:22
by rousseauhk
All my users are currently on 4.2.x, but at some stage I'd like to upgrade everyone to 4.3. However looks like the COM API throws a System.InvalidCastException if we run a .Net program that was built with the 4.2 SDK on a machine with VirtualBox 4.3 installed.

What is the recommended way to ensure compatibility? I don't want to have to force all users to upgrade to 4.3 unless I can help it (and then we'll presumably have the same compatibility issue once 4.4 comes out). Ideally I'd like to be able to support multiple VirtualBox versions from the same agent.


Re: COM API 4.2 / 4.3 compatibility

PostPosted: 24. Oct 2013, 15:04
by klaus
We only guarantee API compatibility for the maintenance releases of a particular major release (i.e. 4.2.x). Between major releases we do change the API in incompatible ways, and the client code needs to be adjusted. I'm not aware of projects which use some abstraction layer (linking against several SDK versions) in the "local COM/XPCOM" API case, but it might be possible with enough linker trickery. It's guaranteed that the IVirtualBox::version attribute is always the first one, so it can be called without knowing the VBox (or API) version before.