Commit 179dc259 authored by Francois Gouget's avatar Francois Gouget Committed by Alexandre Julliard

Fix incorrect usage of COBJMACROS.

Duplicate and adapt the COM access macros so they also work in C++. Fix the IDirectPlayX access macros.
parent 52ecbf73
......@@ -227,7 +227,7 @@ DECLARE_INTERFACE_(IDirectPlay8Address,IUnknown) { IDirectPlay8Address_METHODS }
#undef INTERFACE
#ifdef COBJMACROS
#if !defined(__cplusplus) || defined(CINTERFACE)
/*** IUnknown methods ***/
#define IDirectPlay8Address_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IDirectPlay8Address_AddRef(p) (p)->lpVtbl->AddRef(p)
......@@ -252,6 +252,31 @@ DECLARE_INTERFACE_(IDirectPlay8Address,IUnknown) { IDirectPlay8Address_METHODS }
#define IDirectPlay8Address_SetDevice(p,a) (p)->lpVtbl->SetDevice(p,a)
#define IDirectPlay8Address_GetDevice(p,a) (p)->lpVtbl->GetDevice(p,a)
#define IDirectPlay8Address_BuildFromDirectPlay4Address(p,a,b) (p)->lpVtbl->BuildFromDirectPlay4Address(p,a,b)
#else
/*** IUnknown methods ***/
#define IDirectPlay8Address_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
#define IDirectPlay8Address_AddRef(p) (p)->AddRef()
#define IDirectPlay8Address_Release(p) (p)->Release()
/*** IDirectPlay8Address methods ***/
#define IDirectPlay8Address_BuildFromURLW(p,a) (p)->BuildFromURLW(a)
#define IDirectPlay8Address_BuildFromURLA(p,a) (p)->BuildFromURLA(a)
#define IDirectPlay8Address_Duplicate(p,a) (p)->Duplicate(a)
#define IDirectPlay8Address_SetEqual(p,a) (p)->SetEqual(a)
#define IDirectPlay8Address_IsEqual(p,a) (p)->IsEqual(a)
#define IDirectPlay8Address_Clear(p) (p)->Clear()
#define IDirectPlay8Address_GetURLW(p,a,b) (p)->GetURLW(a,b)
#define IDirectPlay8Address_GetURLA(p,a,b) (p)->GetURLA(a,b)
#define IDirectPlay8Address_GetSP(p,a) (p)->GetSP(a)
#define IDirectPlay8Address_GetUserData(p,a,b) (p)->GetUserData(a,b)
#define IDirectPlay8Address_SetSP(p,a) (p)->SetSP(a)
#define IDirectPlay8Address_SetUserData(p,a,b) (p)->SetUserData(a,b)
#define IDirectPlay8Address_GetNumComponents(p,a) (p)->GetNumComponents(a)
#define IDirectPlay8Address_GetComponentByName(p,a,b,c,d) (p)->GetComponentByName(a,b,c,d)
#define IDirectPlay8Address_GetComponentByIndex(p,a,b,c,d,e,f) (p)->GetComponentByIndex(a,b,c,d,e,f)
#define IDirectPlay8Address_AddComponent(p,a,b,c,d) (p)->AddComponent(a,b,c,d)
#define IDirectPlay8Address_SetDevice(p,a) (p)->SetDevice(a)
#define IDirectPlay8Address_GetDevice(p,a) (p)->GetDevice(a)
#define IDirectPlay8Address_BuildFromDirectPlay4Address(p,a,b) (p)->BuildFromDirectPlay4Address(a,b)
#endif
/*****************************************************************************
......@@ -269,7 +294,19 @@ DECLARE_INTERFACE_(IDirectPlay8Address,IUnknown) { IDirectPlay8Address_METHODS }
DECLARE_INTERFACE_(IDirectPlay8AddressIP,IUnknown) { IDirectPlay8AddressIP_METHODS };
#undef INTERFACE
#ifdef COBJMACROS
#if !defined(__cplusplus) || defined(CINTERFACE)
/*** IUnknown methods ***/
#define IDirectPlay8AddressIP_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(a,b)
#define IDirectPlay8AddressIP_AddRef(p) (p)->lpVtbl->AddRef()
#define IDirectPlay8AddressIP_Release(p) (p)->lpVtbl->Release()
/*** IDirectPlay8AddressIP methods ***/
#define IDirectPlay8AddressIP_BuildFromSockAddr(p,a) (p)->lpVtbl->BuildFromSockAddr(a)
#define IDirectPlay8AddressIP_BuildAddress(p,a,b) (p)->lpVtbl->BuildAddress(a,b)
#define IDirectPlay8AddressIP_BuildLocalAddress(p,a,b) (p)->lpVtbl->BuildLocalAddress(a,b)
#define IDirectPlay8AddressIP_GetSockAddress(p,a,b) (p)->lpVtbl->GetSockAddress(a,b)
#define IDirectPlay8AddressIP_GetLocalAddress(p,a,b) (p)->lpVtbl->GetLocalAddress(a,b)
#define IDirectPlay8AddressIP_GetAddress(p,a,b,c) (p)->lpVtbl->GetAddress(a,b,c)
#else
/*** IUnknown methods ***/
#define IDirectPlay8AddressIP_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
#define IDirectPlay8AddressIP_AddRef(p) (p)->AddRef()
......
......@@ -408,26 +408,54 @@ DECLARE_INTERFACE_(IDirectPlayLobby2,IDirectPlayLobby) { IDirectPlayLobby2_METHO
DECLARE_INTERFACE_(IDirectPlayLobby3,IDirectPlayLobby2) { IDirectPlayLobby3_METHODS };
#undef INTERFACE
#ifdef COBJMACROS
#if !defined(__cplusplus) || defined(CINTERFACE)
/*** IUnknown methods ***/
#define IDirectPlayLobby_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IDirectPlayLobby_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IDirectPlayLobby_Release(p) (p)->lpVtbl->Release(p)
/*** IDirectPlayLobby methods ***/
#define IDirectPlayLobby_Connect(p,a,b,c) (p)->lpVtbl->Connect(p,a,b,c)
#define IDirectPlayLobby_ConnectEx(p,a,b,c,d) (p)->lpVtbl->ConnectEx(p,a,b,c,d)
#define IDirectPlayLobby_CreateAddress(p,a,b,c,d,e,f) (p)->lpVtbl->CreateAddress(p,a,b,c,d,e,f)
#define IDirectPlayLobby_CreateCompoundAddress(p,a,b,c,d) (p)->lpVtbl->CreateCompoundAddress(p,a,b,c,d)
#define IDirectPlayLobby_EnumAddress(p,a,b,c,d) (p)->lpVtbl->EnumAddress(p,a,b,c,d)
#define IDirectPlayLobby_EnumAddressTypes(p,a,b,c,d) (p)->lpVtbl->EnumAddressTypes(p,a,b,c,d)
#define IDirectPlayLobby_EnumLocalApplications(p,a,b,c) (p)->lpVtbl->EnumLocalApplications(p,a,b,c)
#define IDirectPlayLobby_GetConnectionSettings(p,a,b,c) (p)->lpVtbl->GetConnectionSettings(p,a,b,c)
#define IDirectPlayLobby_ReceiveLobbyMessage(p,a,b,c,d,e) (p)->lpVtbl->ReceiveLobbyMessage(p,a,b,c,d,e)
#define IDirectPlayLobby_RegisterApplication(p,a,b) (p)->lpVtbl->RegisterApplication(p,a,b)
#define IDirectPlayLobby_RunApplication(p,a,b,c,d) (p)->lpVtbl->RunApplication(p,a,b,c,d)
#define IDirectPlayLobby_SendLobbyMessage(p,a,b,c,d) (p)->lpVtbl->SendLobbyMessage(p,a,b,c,d)
#define IDirectPlayLobby_SetConnectionSettings(p,a,b,c) (p)->lpVtbl->SetConnectionSettings(p,a,b,c)
#define IDirectPlayLobby_SetLobbyMessageEvent(p,a,b,c) (p)->lpVtbl->SetLobbyMessageEvent(p,a,b,c)
/*** IDirectPlayLobby2 methods ***/
#define IDirectPlayLobby_CreateCompoundAddress(p,a,b,c,d) (p)->lpVtbl->CreateCompoundAddress(p,a,b,c,d)
/*** IDirectPlayLobby3 methods ***/
#define IDirectPlayLobby_ConnectEx(p,a,b,c,d) (p)->lpVtbl->ConnectEx(p,a,b,c,d)
#define IDirectPlayLobby_RegisterApplication(p,a,b) (p)->lpVtbl->RegisterApplication(p,a,b)
#define IDirectPlayLobby_UnregisterApplication(p,a,b) (p)->lpVtbl->UnregisterApplication(p,a,b)
#define IDirectPlayLobby_WaitForConnectionSettings(p,a) (p)->lpVtbl->WaitForConnectionSettings(p,a)
#else
/*** IUnknown methods ***/
#define IDirectPlayLobby_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
#define IDirectPlayLobby_AddRef(p) (p)->AddRef()
#define IDirectPlayLobby_Release(p) (p)->Release()
/*** IDirectPlayLobby methods ***/
#define IDirectPlayLobby_Connect(p,a,b,c) (p)->Connect(a,b,c)
#define IDirectPlayLobby_CreateAddress(p,a,b,c,d,e,f) (p)->CreateAddress(a,b,c,d,e,f)
#define IDirectPlayLobby_EnumAddress(p,a,b,c,d) (p)->EnumAddress(a,b,c,d)
#define IDirectPlayLobby_EnumAddressTypes(p,a,b,c,d) (p)->EnumAddressTypes(a,b,c,d)
#define IDirectPlayLobby_EnumLocalApplications(p,a,b,c) (p)->EnumLocalApplications(a,b,c)
#define IDirectPlayLobby_GetConnectionSettings(p,a,b,c) (p)->GetConnectionSettings(a,b,c)
#define IDirectPlayLobby_ReceiveLobbyMessage(p,a,b,c,d,e) (p)->ReceiveLobbyMessage(a,b,c,d,e)
#define IDirectPlayLobby_RunApplication(p,a,b,c,d) (p)->RunApplication(a,b,c,d)
#define IDirectPlayLobby_SendLobbyMessage(p,a,b,c,d) (p)->SendLobbyMessage(a,b,c,d)
#define IDirectPlayLobby_SetConnectionSettings(p,a,b,c) (p)->SetConnectionSettings(a,b,c)
#define IDirectPlayLobby_SetLobbyMessageEvent(p,a,b,c) (p)->SetLobbyMessageEvent(a,b,c)
/*** IDirectPlayLobby2 methods ***/
#define IDirectPlayLobby_CreateCompoundAddress(p,a,b,c,d) (p)->CreateCompoundAddress(a,b,c,d)
/*** IDirectPlayLobby3 methods ***/
#define IDirectPlayLobby_ConnectEx(p,a,b,c,d) (p)->ConnectEx(a,b,c,d)
#define IDirectPlayLobby_RegisterApplication(p,a,b) (p)->RegisterApplication(a,b)
#define IDirectPlayLobby_UnregisterApplication(p,a,b) (p)->UnregisterApplication(a,b)
#define IDirectPlayLobby_WaitForConnectionSettings(p,a) (p)->WaitForConnectionSettings(a)
#endif
/* Used for WaitForConnectionSettings */
......
......@@ -75,7 +75,7 @@ typedef struct IDxDiagContainer IDxDiagContainer, *LPDXDIAGCONTAINER, *PDX
DECLARE_INTERFACE_(IDxDiagProvider,IUnknown) { IDxDiagProvider_METHODS };
#undef INTERFACE
#ifdef COBJMACROS
#if !defined(__cplusplus) || defined(CINTERFACE)
/*** IUnknown methods ***/
#define IDxDiagProvider_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IDxDiagProvider_AddRef(p) (p)->lpVtbl->AddRef(p)
......@@ -83,6 +83,14 @@ DECLARE_INTERFACE_(IDxDiagProvider,IUnknown) { IDxDiagProvider_METHODS };
/*** IDxDiagProvider methods ***/
#define IDxDiagProvider_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
#define IDxDiagProvider_GetRootContainer(p,a) (p)->lpVtbl->GetRootContainer(p,a)
#else
/*** IUnknown methods ***/
#define IDxDiagProvider_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
#define IDxDiagProvider_AddRef(p) (p)->AddRef()
#define IDxDiagProvider_Release(p) (p)->Release()
/*** IDxDiagProvider methods ***/
#define IDxDiagProvider_Initialize(p,a,b) (p)->Initialize(a,b)
#define IDxDiagProvider_GetRootContainer(p,a) (p)->GetRootContainer(a)
#endif
/*****************************************************************************
......@@ -104,7 +112,7 @@ DECLARE_INTERFACE_(IDxDiagProvider,IUnknown) { IDxDiagProvider_METHODS };
DECLARE_INTERFACE_(IDxDiagContainer,IUnknown) { IDxDiagContainer_METHODS };
#undef INTERFACE
#ifdef COBJMACROS
#if !defined(__cplusplus) || defined(CINTERFACE)
/*** IUnknown methods ***/
#define IDxDiagContainer_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IDxDiagContainer_AddRef(p) (p)->lpVtbl->AddRef(p)
......@@ -116,6 +124,18 @@ DECLARE_INTERFACE_(IDxDiagContainer,IUnknown) { IDxDiagContainer_METHODS };
#define IDxDiagContainer_GetNumberOfProps(p,a) (p)->lpVtbl->GetNumberOfProps(p,a)
#define IDxDiagContainer_EnumProps(p,a,b) (p)->lpVtbl->EnumProps(p,a,b,c)
#define IDxDiagContainer_GetProp(p,a,b) (p)->lpVtbl->GetProp(p,a,b)
#else
/*** IUnknown methods ***/
#define IDxDiagContainer_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
#define IDxDiagContainer_AddRef(p) (p)->AddRef()
#define IDxDiagContainer_Release(p) (p)->Release()
/*** IDxDiagContainer methods ***/
#define IDxDiagContainer_GetNumberOfChildContainers(p,a) (p)->GetNumberOfChildContainers(a)
#define IDxDiagContainer_EnumChildContainerNames(p,a,b,c) (p)->EnumChildContainerNames(a,b,c)
#define IDxDiagContainer_GetChildContainer(p,a,b) (p)->GetChildContainer(a,b)
#define IDxDiagContainer_GetNumberOfProps(p,a) (p)->GetNumberOfProps(a)
#define IDxDiagContainer_EnumProps(p,a,b) (p)->EnumProps(a,b,c)
#define IDxDiagContainer_GetProp(p,a,b) (p)->GetProp(a,b)
#endif
#ifdef __cplusplus
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment