Commit a966f974 authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

dplayx: Remove the unused lock from IDPLobbySPImpl.

parent b11dddf7
...@@ -27,8 +27,6 @@ ...@@ -27,8 +27,6 @@
WINE_DEFAULT_DEBUG_CHANNEL(dplay); WINE_DEFAULT_DEBUG_CHANNEL(dplay);
/* Prototypes */ /* Prototypes */
static BOOL DPLSP_CreateIUnknown( LPVOID lpSP );
static BOOL DPLSP_DestroyIUnknown( LPVOID lpSP );
static BOOL DPLSP_CreateDPLobbySP( void *lpSP, IDirectPlayImpl *dp ); static BOOL DPLSP_CreateDPLobbySP( void *lpSP, IDirectPlayImpl *dp );
static BOOL DPLSP_DestroyDPLobbySP( LPVOID lpSP ); static BOOL DPLSP_DestroyDPLobbySP( LPVOID lpSP );
...@@ -36,18 +34,12 @@ static BOOL DPLSP_DestroyDPLobbySP( LPVOID lpSP ); ...@@ -36,18 +34,12 @@ static BOOL DPLSP_DestroyDPLobbySP( LPVOID lpSP );
/* Predefine the interface */ /* Predefine the interface */
typedef struct IDPLobbySPImpl IDPLobbySPImpl; typedef struct IDPLobbySPImpl IDPLobbySPImpl;
typedef struct tagDPLobbySPIUnknownData
{
CRITICAL_SECTION DPLSP_lock;
} DPLobbySPIUnknownData;
typedef struct tagDPLobbySPData typedef struct tagDPLobbySPData
{ {
IDirectPlayImpl *dplay; IDirectPlayImpl *dplay;
} DPLobbySPData; } DPLobbySPData;
#define DPLSP_IMPL_FIELDS \ #define DPLSP_IMPL_FIELDS \
DPLobbySPIUnknownData* unk; \
DPLobbySPData* sp; DPLobbySPData* sp;
struct IDPLobbySPImpl struct IDPLobbySPImpl
...@@ -92,9 +84,7 @@ HRESULT DPLSP_CreateInterface( REFIID riid, void **ppvObj, IDirectPlayImpl *dp ) ...@@ -92,9 +84,7 @@ HRESULT DPLSP_CreateInterface( REFIID riid, void **ppvObj, IDirectPlayImpl *dp )
} }
/* Initialize it */ /* Initialize it */
if( DPLSP_CreateIUnknown( *ppvObj ) && if( DPLSP_CreateDPLobbySP( *ppvObj, dp ) )
DPLSP_CreateDPLobbySP( *ppvObj, dp )
)
{ {
IDPLobbySP_AddRef( (LPDPLOBBYSP)*ppvObj ); IDPLobbySP_AddRef( (LPDPLOBBYSP)*ppvObj );
return S_OK; return S_OK;
...@@ -102,7 +92,6 @@ HRESULT DPLSP_CreateInterface( REFIID riid, void **ppvObj, IDirectPlayImpl *dp ) ...@@ -102,7 +92,6 @@ HRESULT DPLSP_CreateInterface( REFIID riid, void **ppvObj, IDirectPlayImpl *dp )
/* Initialize failed, destroy it */ /* Initialize failed, destroy it */
DPLSP_DestroyDPLobbySP( *ppvObj ); DPLSP_DestroyDPLobbySP( *ppvObj );
DPLSP_DestroyIUnknown( *ppvObj );
HeapFree( GetProcessHeap(), 0, *ppvObj ); HeapFree( GetProcessHeap(), 0, *ppvObj );
*ppvObj = NULL; *ppvObj = NULL;
...@@ -110,34 +99,6 @@ HRESULT DPLSP_CreateInterface( REFIID riid, void **ppvObj, IDirectPlayImpl *dp ) ...@@ -110,34 +99,6 @@ HRESULT DPLSP_CreateInterface( REFIID riid, void **ppvObj, IDirectPlayImpl *dp )
return DPERR_NOMEMORY; return DPERR_NOMEMORY;
} }
static BOOL DPLSP_CreateIUnknown( LPVOID lpSP )
{
IDPLobbySPImpl *This = lpSP;
This->unk = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof( *(This->unk) ) );
if ( This->unk == NULL )
{
return FALSE;
}
InitializeCriticalSection( &This->unk->DPLSP_lock );
This->unk->DPLSP_lock.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": IDPLobbySPImpl*->DPLobbySPIUnknownData*->DPLSP_lock");
return TRUE;
}
static BOOL DPLSP_DestroyIUnknown( LPVOID lpSP )
{
IDPLobbySPImpl *This = lpSP;
This->unk->DPLSP_lock.DebugInfo->Spare[0] = 0;
DeleteCriticalSection( &This->unk->DPLSP_lock );
HeapFree( GetProcessHeap(), 0, This->unk );
return TRUE;
}
static BOOL DPLSP_CreateDPLobbySP( void *lpSP, IDirectPlayImpl *dp ) static BOOL DPLSP_CreateDPLobbySP( void *lpSP, IDirectPlayImpl *dp )
{ {
IDPLobbySPImpl *This = lpSP; IDPLobbySPImpl *This = lpSP;
...@@ -200,7 +161,6 @@ static ULONG WINAPI IDPLobbySPImpl_Release( IDPLobbySP *iface ) ...@@ -200,7 +161,6 @@ static ULONG WINAPI IDPLobbySPImpl_Release( IDPLobbySP *iface )
if( !ref ) if( !ref )
{ {
DPLSP_DestroyDPLobbySP( This ); DPLSP_DestroyDPLobbySP( This );
DPLSP_DestroyIUnknown( This );
HeapFree( GetProcessHeap(), 0, This ); HeapFree( GetProcessHeap(), 0, This );
} }
......
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