IID_IVirtualBox changed between VirtualBox versions?

Discussion about using the VirtualBox API, Tutorials, Samples.
Post Reply
zhangbo
Posts: 7
Joined: 23. Aug 2015, 05:45

IID_IVirtualBox changed between VirtualBox versions?

Post by zhangbo »

hello,

The value of IID_IVirtualBox in VBOX 5.0 is { 0x0169423f, 0x46b4, 0xcde9, 0x91, 0xaf, 0x1e, 0x9d, 0x5b, 0x6c, 0xd9, 0x45 },

but in some old VBOX versions, it's MIDL_INTERFACE("fafa4e17-1ee2-4905-a10e-fe7c18bf5554").

Am I correct ? If so, why change the COM interface GUID? It's very bad for compatiblity reasons.

oh god, the layout of the same COM interface also changed...
COM is not meant to be used like this way.
frank
Oracle Corporation
Posts: 3362
Joined: 7. Jun 2007, 09:11
Primary OS: Debian Sid
VBox Version: PUEL
Guest OSses: Linux, Windows
Location: Dresden, Germany
Contact:

Re: IID_IVirtualBox changed between VirtualBox versions?

Post by frank »

The interface ID changes if there are incompatible changes in that inteface. Such incompatible changes can happen with a new major release but never within a stable branch. So it is completely intentional to change the interface ID between VBox 4.3.30 and VBox 5.0 but the interface IDs did not change between VBox 5.0 and VBox 5.0.2. This applies only to interface IDs for public visible interfaces (there are a few internal interfaces not visible for VBox clients).
zhangbo
Posts: 7
Joined: 23. Aug 2015, 05:45

Re: IID_IVirtualBox changed between VirtualBox versions?

Post by zhangbo »

Thank you for your reply.

But how to do if someone wants to write a single COM client to interacts with VBOX 3/VBOX 4/VBOX 5 COM servers?
He has to write 3 different wrapper DLLs, one for VBOX 3, one for VBOX 4, another for VBOX 5.

Why not use IVirtualBox3/IVirtualBox4/IVirtualBox5 ? This is the right Microsoft-way.
frank
Oracle Corporation
Posts: 3362
Joined: 7. Jun 2007, 09:11
Primary OS: Debian Sid
VBox Version: PUEL
Guest OSses: Linux, Windows
Location: Dresden, Germany
Contact:

Re: IID_IVirtualBox changed between VirtualBox versions?

Post by frank »

I guess this would mean to add such a version postfix to every class and there are quite a lot of them. Our IDL interface is under heavy development between two major releases and we don't have the ressources for additional effort making it easier to write clients for different interface versions. The interface changes between major versions are well-documented. And, for instance, with Python it's not a problem to support different interfaces within the same class.
Post Reply