From abd0e1dce75b2c79b747687eb6a7626bd34ae133 Mon Sep 17 00:00:00 2001 From: Matthias Bolte Date: Tue, 14 Dec 2010 20:02:49 +0100 Subject: [PATCH] vbox: Match struct layout of the MSCOM implementation on Windows --- src/vbox/vbox_CAPI_v2_2.h | 20 ++++++++++++++++++++ src/vbox/vbox_CAPI_v3_0.h | 9 +++++++++ src/vbox/vbox_CAPI_v3_1.h | 9 +++++++++ src/vbox/vbox_CAPI_v3_2.h | 9 +++++++++ 4 files changed, 47 insertions(+) diff --git a/src/vbox/vbox_CAPI_v2_2.h b/src/vbox/vbox_CAPI_v2_2.h index 7a94ff5020..0543fdd344 100644 --- a/src/vbox/vbox_CAPI_v2_2.h +++ b/src/vbox/vbox_CAPI_v2_2.h @@ -1563,6 +1563,16 @@ struct IVirtualBox_vtbl { struct nsISupports_vtbl nsisupports; +# ifdef WIN32 + /* The MSCOM implementation has some additional methods here. + * So add them here to get correct binary layout of the object. + * In API version 2.2 this affects IVirtualBox and ISession only. */ + nsresult PR_COM_METHOD (*GetTypeInfoCount)(IVirtualBox *pThis); + nsresult PR_COM_METHOD (*GetTypeInfo)(IVirtualBox *pThis); + nsresult PR_COM_METHOD (*GetIDsOfNames)(IVirtualBox *pThis); + nsresult PR_COM_METHOD (*Invoke)(IVirtualBox *pThis); +# endif + nsresult PR_COM_METHOD (*GetVersion)(IVirtualBox *pThis, PRUnichar * *version); nsresult PR_COM_METHOD (*GetRevision)(IVirtualBox *pThis, PRUint32 *revision); @@ -4567,6 +4577,16 @@ struct ISession_vtbl { struct nsISupports_vtbl nsisupports; +# ifdef WIN32 + /* The MSCOM implementation has some additional methods here. + * So add them here to get correct binary layout of the object. + * In API version 2.2 this affects IVirtualBox and ISession only. */ + nsresult PR_COM_METHOD (*GetTypeInfoCount)(ISession *pThis); + nsresult PR_COM_METHOD (*GetTypeInfo)(ISession *pThis); + nsresult PR_COM_METHOD (*GetIDsOfNames)(ISession *pThis); + nsresult PR_COM_METHOD (*Invoke)(ISession *pThis); +# endif + nsresult PR_COM_METHOD (*GetState)(ISession *pThis, PRUint32 *state); nsresult PR_COM_METHOD (*GetType)(ISession *pThis, PRUint32 *type); diff --git a/src/vbox/vbox_CAPI_v3_0.h b/src/vbox/vbox_CAPI_v3_0.h index 4ff5f834b0..ed8b3dd0b1 100644 --- a/src/vbox/vbox_CAPI_v3_0.h +++ b/src/vbox/vbox_CAPI_v3_0.h @@ -716,6 +716,15 @@ struct nsISupports_vtbl { */ nsresult PR_COM_METHOD (*Release)(nsISupports *pThis); +# ifdef WIN32 + /* The MSCOM implementation has some additional methods here. + * So add them here to get correct binary layout of the object. + * In API version 3.x this affects all types. */ + nsresult PR_COM_METHOD (*GetTypeInfoCount)(nsISupports *pThis); + nsresult PR_COM_METHOD (*GetTypeInfo)(nsISupports *pThis); + nsresult PR_COM_METHOD (*GetIDsOfNames)(nsISupports *pThis); + nsresult PR_COM_METHOD (*Invoke)(nsISupports *pThis); +# endif }; struct nsISupports { diff --git a/src/vbox/vbox_CAPI_v3_1.h b/src/vbox/vbox_CAPI_v3_1.h index e8ae73d2b5..1eb27c46c1 100644 --- a/src/vbox/vbox_CAPI_v3_1.h +++ b/src/vbox/vbox_CAPI_v3_1.h @@ -716,6 +716,15 @@ struct nsISupports_vtbl { */ nsresult PR_COM_METHOD (*Release)(nsISupports *pThis); +# ifdef WIN32 + /* The MSCOM implementation has some additional methods here. + * So add them here to get correct binary layout of the object. + * In API version 3.x this affects all types. */ + nsresult PR_COM_METHOD (*GetTypeInfoCount)(nsISupports *pThis); + nsresult PR_COM_METHOD (*GetTypeInfo)(nsISupports *pThis); + nsresult PR_COM_METHOD (*GetIDsOfNames)(nsISupports *pThis); + nsresult PR_COM_METHOD (*Invoke)(nsISupports *pThis); +# endif }; struct nsISupports { diff --git a/src/vbox/vbox_CAPI_v3_2.h b/src/vbox/vbox_CAPI_v3_2.h index b3333b110a..0fbe2e1d55 100644 --- a/src/vbox/vbox_CAPI_v3_2.h +++ b/src/vbox/vbox_CAPI_v3_2.h @@ -712,6 +712,15 @@ struct nsISupports_vtbl { */ nsresult PR_COM_METHOD (*Release)(nsISupports *pThis); +# ifdef WIN32 + /* The MSCOM implementation has some additional methods here. + * So add them here to get correct binary layout of the object. + * In API version 3.x this affects all types. */ + nsresult PR_COM_METHOD (*GetTypeInfoCount)(nsISupports *pThis); + nsresult PR_COM_METHOD (*GetTypeInfo)(nsISupports *pThis); + nsresult PR_COM_METHOD (*GetIDsOfNames)(nsISupports *pThis); + nsresult PR_COM_METHOD (*Invoke)(nsISupports *pThis); +# endif }; struct nsISupports { -- 2.47.2