dplayx: Remove the duplicated IDirectPlayXImpl structs.
This commit is contained in:
parent
0e7b1a46d5
commit
82b51258ea
|
@ -396,46 +396,26 @@ static BOOL DP_DestroyDirectPlay2( LPVOID lpDP )
|
|||
HRESULT DP_CreateInterface
|
||||
( REFIID riid, LPVOID* ppvObj )
|
||||
{
|
||||
IDirectPlayImpl *This;
|
||||
|
||||
TRACE( " for %s\n", debugstr_guid( riid ) );
|
||||
|
||||
*ppvObj = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY,
|
||||
sizeof( IDirectPlay2Impl ) );
|
||||
|
||||
if( *ppvObj == NULL )
|
||||
{
|
||||
This = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof( IDirectPlayImpl ) );
|
||||
if( !This )
|
||||
return DPERR_OUTOFMEMORY;
|
||||
}
|
||||
|
||||
if( IsEqualGUID( &IID_IDirectPlay2, riid ) )
|
||||
{
|
||||
IDirectPlay2Impl *This = *ppvObj;
|
||||
This->lpVtbl = &directPlay2WVT;
|
||||
}
|
||||
else if( IsEqualGUID( &IID_IUnknown, riid ) || IsEqualGUID( &IID_IDirectPlay2A, riid ) )
|
||||
{
|
||||
IDirectPlay2AImpl *This = *ppvObj;
|
||||
This->lpVtbl = &directPlay2AVT;
|
||||
}
|
||||
else if( IsEqualGUID( &IID_IDirectPlay3, riid ) )
|
||||
{
|
||||
IDirectPlay3Impl *This = *ppvObj;
|
||||
This->lpVtbl = &directPlay3WVT;
|
||||
}
|
||||
else if( IsEqualGUID( &IID_IDirectPlay3A, riid ) )
|
||||
{
|
||||
IDirectPlay3AImpl *This = *ppvObj;
|
||||
This->lpVtbl = &directPlay3AVT;
|
||||
}
|
||||
else if( IsEqualGUID( &IID_IDirectPlay4, riid ) )
|
||||
{
|
||||
IDirectPlay4Impl *This = *ppvObj;
|
||||
This->lpVtbl = &directPlay4WVT;
|
||||
}
|
||||
else if( IsEqualGUID( &IID_IDirectPlay4A, riid ) )
|
||||
{
|
||||
IDirectPlay4AImpl *This = *ppvObj;
|
||||
This->lpVtbl = &directPlay4AVT;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Unsupported interface */
|
||||
|
@ -446,6 +426,7 @@ HRESULT DP_CreateInterface
|
|||
}
|
||||
|
||||
/* Initialize it */
|
||||
*ppvObj = This;
|
||||
if ( DP_CreateIUnknown( *ppvObj ) && DP_CreateDirectPlay2( *ppvObj ) )
|
||||
{
|
||||
IDirectPlayX_AddRef( (LPDIRECTPLAY2A)*ppvObj );
|
||||
|
|
|
@ -31,16 +31,6 @@ extern HRESULT DPL_EnumAddress( LPDPENUMADDRESSCALLBACK lpEnumAddressCallback,
|
|||
LPCVOID lpAddress, DWORD dwAddressSize,
|
||||
LPVOID lpContext ) DECLSPEC_HIDDEN;
|
||||
|
||||
/*****************************************************************************
|
||||
* Predeclare the interface implementation structures
|
||||
*/
|
||||
typedef struct IDirectPlay2Impl IDirectPlay2AImpl;
|
||||
typedef struct IDirectPlay2Impl IDirectPlay2Impl;
|
||||
typedef struct IDirectPlay3Impl IDirectPlay3AImpl;
|
||||
typedef struct IDirectPlay3Impl IDirectPlay3Impl;
|
||||
typedef struct IDirectPlay4Impl IDirectPlay4AImpl;
|
||||
typedef struct IDirectPlay4Impl IDirectPlay4Impl;
|
||||
|
||||
typedef struct tagDirectPlayIUnknownData
|
||||
{
|
||||
LONG ulObjRef;
|
||||
|
@ -196,28 +186,20 @@ typedef struct tagDirectPlay2Data
|
|||
DPQ_HEAD( tagDP_MSG_REPLY_STRUCT_LIST ) repliesExpected;
|
||||
} DirectPlay2Data;
|
||||
|
||||
#define DP_IMPL_FIELDS \
|
||||
LONG ulInterfaceRef; \
|
||||
DirectPlayIUnknownData* unk; \
|
||||
DirectPlay2Data* dp2;
|
||||
|
||||
struct IDirectPlay2Impl
|
||||
typedef struct IDirectPlayImpl
|
||||
{
|
||||
const IDirectPlay2Vtbl *lpVtbl;
|
||||
DP_IMPL_FIELDS
|
||||
};
|
||||
const void *lpVtbl;
|
||||
LONG ulInterfaceRef;
|
||||
DirectPlayIUnknownData *unk;
|
||||
DirectPlay2Data *dp2;
|
||||
} IDirectPlayImpl;
|
||||
|
||||
struct IDirectPlay3Impl
|
||||
{
|
||||
const IDirectPlay3Vtbl *lpVtbl;
|
||||
DP_IMPL_FIELDS
|
||||
};
|
||||
|
||||
struct IDirectPlay4Impl
|
||||
{
|
||||
const IDirectPlay4Vtbl *lpVtbl;
|
||||
DP_IMPL_FIELDS
|
||||
};
|
||||
typedef struct IDirectPlayImpl IDirectPlay2Impl;
|
||||
typedef struct IDirectPlayImpl IDirectPlay2AImpl;
|
||||
typedef struct IDirectPlayImpl IDirectPlay3Impl;
|
||||
typedef struct IDirectPlayImpl IDirectPlay3AImpl;
|
||||
typedef struct IDirectPlayImpl IDirectPlay4Impl;
|
||||
typedef struct IDirectPlayImpl IDirectPlay4AImpl;
|
||||
|
||||
HRESULT DP_HandleMessage( IDirectPlay2Impl* This, LPCVOID lpMessageBody,
|
||||
DWORD dwMessageBodySize, LPCVOID lpMessageHeader,
|
||||
|
|
Loading…
Reference in New Issue