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

dplayx: Get rid of the IDirectPlayImpl aliases.

parent 5e038366
...@@ -190,21 +190,13 @@ typedef struct IDirectPlayImpl ...@@ -190,21 +190,13 @@ typedef struct IDirectPlayImpl
DirectPlay2Data *dp2; DirectPlay2Data *dp2;
} IDirectPlayImpl; } IDirectPlayImpl;
typedef struct IDirectPlayImpl IDirectPlay2Impl; HRESULT DP_HandleMessage( IDirectPlayImpl *This, const void *lpMessageBody,
typedef struct IDirectPlayImpl IDirectPlay2AImpl; DWORD dwMessageBodySize, const void *lpMessageHeader, WORD wCommandId, WORD wVersion,
typedef struct IDirectPlayImpl IDirectPlay3Impl; void **lplpReply, DWORD *lpdwMsgSize ) DECLSPEC_HIDDEN;
typedef struct IDirectPlayImpl IDirectPlay3AImpl;
typedef struct IDirectPlayImpl IDirectPlay4Impl;
typedef struct IDirectPlayImpl IDirectPlay4AImpl;
HRESULT DP_HandleMessage( IDirectPlay2Impl* This, LPCVOID lpMessageBody,
DWORD dwMessageBodySize, LPCVOID lpMessageHeader,
WORD wCommandId, WORD wVersion,
LPVOID* lplpReply, LPDWORD lpdwMsgSize ) DECLSPEC_HIDDEN;
/* DP SP external interfaces into DirectPlay */ /* DP SP external interfaces into DirectPlay */
extern HRESULT DP_GetSPPlayerData( IDirectPlay2Impl* lpDP, DPID idPlayer, LPVOID* lplpData ) DECLSPEC_HIDDEN; extern HRESULT DP_GetSPPlayerData( IDirectPlayImpl *lpDP, DPID idPlayer, void **lplpData ) DECLSPEC_HIDDEN;
extern HRESULT DP_SetSPPlayerData( IDirectPlay2Impl* lpDP, DPID idPlayer, LPVOID lpData ) DECLSPEC_HIDDEN; extern HRESULT DP_SetSPPlayerData( IDirectPlayImpl *lpDP, DPID idPlayer, void *lpData ) DECLSPEC_HIDDEN;
/* DP external interfaces to call into DPSP interface */ /* DP external interfaces to call into DPSP interface */
extern LPVOID DPSP_CreateSPPlayerData(void) DECLSPEC_HIDDEN; extern LPVOID DPSP_CreateSPPlayerData(void) DECLSPEC_HIDDEN;
......
...@@ -36,7 +36,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(dplay); ...@@ -36,7 +36,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(dplay);
/* Prototypes */ /* Prototypes */
static BOOL DPSP_CreateIUnknown( LPVOID lpSP ); static BOOL DPSP_CreateIUnknown( LPVOID lpSP );
static BOOL DPSP_DestroyIUnknown( LPVOID lpSP ); static BOOL DPSP_DestroyIUnknown( LPVOID lpSP );
static BOOL DPSP_CreateDirectPlaySP( LPVOID lpSP, IDirectPlay2Impl* dp ); static BOOL DPSP_CreateDirectPlaySP( void *lpSP, IDirectPlayImpl *dp );
static BOOL DPSP_DestroyDirectPlaySP( LPVOID lpSP ); static BOOL DPSP_DestroyDirectPlaySP( LPVOID lpSP );
/* Predefine the interface */ /* Predefine the interface */
...@@ -56,7 +56,7 @@ typedef struct tagDirectPlaySPData ...@@ -56,7 +56,7 @@ typedef struct tagDirectPlaySPData
LPVOID lpSpLocalData; LPVOID lpSpLocalData;
DWORD dwSpLocalDataSize; /* Size of data pointed to by lpSpLocalData */ DWORD dwSpLocalDataSize; /* Size of data pointed to by lpSpLocalData */
IDirectPlay2Impl* dplay; /* FIXME: This should perhaps be iface not impl */ IDirectPlayImpl *dplay; /* FIXME: This should perhaps be iface not impl */
} DirectPlaySPData; } DirectPlaySPData;
...@@ -85,7 +85,7 @@ typedef struct tagDP_SPPLAYERDATA ...@@ -85,7 +85,7 @@ typedef struct tagDP_SPPLAYERDATA
} DP_SPPLAYERDATA, *LPDP_SPPLAYERDATA; } DP_SPPLAYERDATA, *LPDP_SPPLAYERDATA;
/* Create the SP interface */ /* Create the SP interface */
HRESULT DPSP_CreateInterface( REFIID riid, LPVOID* ppvObj, IDirectPlay2Impl* dp ) HRESULT DPSP_CreateInterface( REFIID riid, void **ppvObj, IDirectPlayImpl *dp )
{ {
TRACE( " for %s\n", debugstr_guid( riid ) ); TRACE( " for %s\n", debugstr_guid( riid ) );
...@@ -159,7 +159,7 @@ static BOOL DPSP_DestroyIUnknown( LPVOID lpSP ) ...@@ -159,7 +159,7 @@ static BOOL DPSP_DestroyIUnknown( LPVOID lpSP )
} }
static BOOL DPSP_CreateDirectPlaySP( LPVOID lpSP, IDirectPlay2Impl* dp ) static BOOL DPSP_CreateDirectPlaySP( void *lpSP, IDirectPlayImpl *dp )
{ {
IDirectPlaySPImpl *This = lpSP; IDirectPlaySPImpl *This = lpSP;
......
...@@ -45,9 +45,8 @@ typedef struct tagMSGTHREADINFO ...@@ -45,9 +45,8 @@ typedef struct tagMSGTHREADINFO
} MSGTHREADINFO, *LPMSGTHREADINFO; } MSGTHREADINFO, *LPMSGTHREADINFO;
static DWORD CALLBACK DPL_MSG_ThreadMain( LPVOID lpContext ); static DWORD CALLBACK DPL_MSG_ThreadMain( LPVOID lpContext );
static LPVOID DP_MSG_ExpectReply( IDirectPlay2AImpl* This, LPDPSP_SENDDATA data, static void *DP_MSG_ExpectReply( IDirectPlayImpl *This, DPSP_SENDDATA *data, DWORD dwWaitTime,
DWORD dwWaitTime, WORD wReplyCommandId, WORD wReplyCommandId, void **lplpReplyMsg, DWORD *lpdwMsgBodySize );
LPVOID* lplpReplyMsg, LPDWORD lpdwMsgBodySize );
/* Create the message reception thread to allow the application to receive /* Create the message reception thread to allow the application to receive
...@@ -154,9 +153,8 @@ end_of_thread: ...@@ -154,9 +153,8 @@ end_of_thread:
} }
/* DP messaging stuff */ /* DP messaging stuff */
static static HANDLE DP_MSG_BuildAndLinkReplyStruct( IDirectPlayImpl *This,
HANDLE DP_MSG_BuildAndLinkReplyStruct( IDirectPlay2Impl* This, DP_MSG_REPLY_STRUCT_LIST *lpReplyStructList, WORD wReplyCommandId )
LPDP_MSG_REPLY_STRUCT_LIST lpReplyStructList, WORD wReplyCommandId )
{ {
lpReplyStructList->replyExpected.hReceipt = CreateEventW( NULL, FALSE, FALSE, NULL ); lpReplyStructList->replyExpected.hReceipt = CreateEventW( NULL, FALSE, FALSE, NULL );
lpReplyStructList->replyExpected.wExpectedReply = wReplyCommandId; lpReplyStructList->replyExpected.wExpectedReply = wReplyCommandId;
...@@ -183,8 +181,7 @@ LPVOID DP_MSG_CleanReplyStruct( LPDP_MSG_REPLY_STRUCT_LIST lpReplyStructList, ...@@ -183,8 +181,7 @@ LPVOID DP_MSG_CleanReplyStruct( LPDP_MSG_REPLY_STRUCT_LIST lpReplyStructList,
return lpReplyStructList->replyExpected.lpReplyMsg; return lpReplyStructList->replyExpected.lpReplyMsg;
} }
HRESULT DP_MSG_SendRequestPlayerId( IDirectPlay2AImpl* This, DWORD dwFlags, HRESULT DP_MSG_SendRequestPlayerId( IDirectPlayImpl *This, DWORD dwFlags, DPID *lpdpidAllocatedId )
LPDPID lpdpidAllocatedId )
{ {
LPVOID lpMsg; LPVOID lpMsg;
LPDPMSG_REQUESTNEWPLAYERID lpMsgBody; LPDPMSG_REQUESTNEWPLAYERID lpMsgBody;
...@@ -250,7 +247,7 @@ HRESULT DP_MSG_SendRequestPlayerId( IDirectPlay2AImpl* This, DWORD dwFlags, ...@@ -250,7 +247,7 @@ HRESULT DP_MSG_SendRequestPlayerId( IDirectPlay2AImpl* This, DWORD dwFlags,
return hr; return hr;
} }
HRESULT DP_MSG_ForwardPlayerCreation( IDirectPlay2AImpl* This, DPID dpidServer ) HRESULT DP_MSG_ForwardPlayerCreation( IDirectPlayImpl *This, DPID dpidServer )
{ {
LPVOID lpMsg; LPVOID lpMsg;
LPDPMSG_FORWARDADDPLAYER lpMsgBody; LPDPMSG_FORWARDADDPLAYER lpMsgBody;
...@@ -368,10 +365,8 @@ HRESULT DP_MSG_ForwardPlayerCreation( IDirectPlay2AImpl* This, DPID dpidServer ) ...@@ -368,10 +365,8 @@ HRESULT DP_MSG_ForwardPlayerCreation( IDirectPlay2AImpl* This, DPID dpidServer )
* ordering issues on sends and receives from the opposite machine. No wonder MS is not * ordering issues on sends and receives from the opposite machine. No wonder MS is not
* a networking company. * a networking company.
*/ */
static static void *DP_MSG_ExpectReply( IDirectPlayImpl *This, DPSP_SENDDATA *lpData, DWORD dwWaitTime,
LPVOID DP_MSG_ExpectReply( IDirectPlay2AImpl* This, LPDPSP_SENDDATA lpData, WORD wReplyCommandId, void **lplpReplyMsg, DWORD *lpdwMsgBodySize )
DWORD dwWaitTime, WORD wReplyCommandId,
LPVOID* lplpReplyMsg, LPDWORD lpdwMsgBodySize )
{ {
HRESULT hr; HRESULT hr;
HANDLE hMsgReceipt; HANDLE hMsgReceipt;
...@@ -410,8 +405,8 @@ LPVOID DP_MSG_ExpectReply( IDirectPlay2AImpl* This, LPDPSP_SENDDATA lpData, ...@@ -410,8 +405,8 @@ LPVOID DP_MSG_ExpectReply( IDirectPlay2AImpl* This, LPDPSP_SENDDATA lpData,
* all important data. It is quite silly to have to copy the message, but the documents * all important data. It is quite silly to have to copy the message, but the documents
* indicate that a copy is taken. Silly really. * indicate that a copy is taken. Silly really.
*/ */
void DP_MSG_ReplyReceived( IDirectPlay2AImpl* This, WORD wCommandId, void DP_MSG_ReplyReceived( IDirectPlayImpl *This, WORD wCommandId, const void *lpcMsgBody,
LPCVOID lpcMsgBody, DWORD dwMsgBodySize ) DWORD dwMsgBodySize )
{ {
LPDP_MSG_REPLY_STRUCT_LIST lpReplyList; LPDP_MSG_REPLY_STRUCT_LIST lpReplyList;
...@@ -449,7 +444,7 @@ void DP_MSG_ReplyReceived( IDirectPlay2AImpl* This, WORD wCommandId, ...@@ -449,7 +444,7 @@ void DP_MSG_ReplyReceived( IDirectPlay2AImpl* This, WORD wCommandId,
} }
} }
void DP_MSG_ToSelf( IDirectPlay2AImpl* This, DPID dpidSelf ) void DP_MSG_ToSelf( IDirectPlayImpl *This, DPID dpidSelf )
{ {
LPVOID lpMsg; LPVOID lpMsg;
LPDPMSG_SENDENVELOPE lpMsgBody; LPDPMSG_SENDENVELOPE lpMsgBody;
...@@ -486,8 +481,8 @@ void DP_MSG_ToSelf( IDirectPlay2AImpl* This, DPID dpidSelf ) ...@@ -486,8 +481,8 @@ void DP_MSG_ToSelf( IDirectPlay2AImpl* This, DPID dpidSelf )
} }
} }
void DP_MSG_ErrorReceived( IDirectPlay2AImpl* This, WORD wCommandId, void DP_MSG_ErrorReceived( IDirectPlayImpl *This, WORD wCommandId, const void *lpMsgBody,
LPCVOID lpMsgBody, DWORD dwMsgBodySize ) DWORD dwMsgBodySize )
{ {
LPCDPMSG_FORWARDADDPLAYERNACK lpcErrorMsg; LPCDPMSG_FORWARDADDPLAYERNACK lpcErrorMsg;
......
...@@ -31,15 +31,15 @@ ...@@ -31,15 +31,15 @@
DWORD CreateLobbyMessageReceptionThread( HANDLE hNotifyEvent, HANDLE hStart, DWORD CreateLobbyMessageReceptionThread( HANDLE hNotifyEvent, HANDLE hStart,
HANDLE hDeath, HANDLE hConnRead ) DECLSPEC_HIDDEN; HANDLE hDeath, HANDLE hConnRead ) DECLSPEC_HIDDEN;
HRESULT DP_MSG_SendRequestPlayerId( IDirectPlay2AImpl* This, DWORD dwFlags, HRESULT DP_MSG_SendRequestPlayerId( IDirectPlayImpl *This, DWORD dwFlags,
LPDPID lpdipidAllocatedId ) DECLSPEC_HIDDEN; LPDPID lpdipidAllocatedId ) DECLSPEC_HIDDEN;
HRESULT DP_MSG_ForwardPlayerCreation( IDirectPlay2AImpl* This, DPID dpidServer ) DECLSPEC_HIDDEN; HRESULT DP_MSG_ForwardPlayerCreation( IDirectPlayImpl *This, DPID dpidServer ) DECLSPEC_HIDDEN;
void DP_MSG_ReplyReceived( IDirectPlay2AImpl* This, WORD wCommandId, void DP_MSG_ReplyReceived( IDirectPlayImpl *This, WORD wCommandId,
LPCVOID lpMsgBody, DWORD dwMsgBodySize ) DECLSPEC_HIDDEN; LPCVOID lpMsgBody, DWORD dwMsgBodySize ) DECLSPEC_HIDDEN;
void DP_MSG_ErrorReceived( IDirectPlay2AImpl* This, WORD wCommandId, void DP_MSG_ErrorReceived( IDirectPlayImpl *This, WORD wCommandId,
LPCVOID lpMsgBody, DWORD dwMsgBodySize ) DECLSPEC_HIDDEN; LPCVOID lpMsgBody, DWORD dwMsgBodySize ) DECLSPEC_HIDDEN;
void DP_MSG_ToSelf( IDirectPlay2AImpl* This, DPID dpidSelf ) DECLSPEC_HIDDEN; void DP_MSG_ToSelf( IDirectPlayImpl *This, DPID dpidSelf ) DECLSPEC_HIDDEN;
/* Timings -> 1000 ticks/sec */ /* Timings -> 1000 ticks/sec */
#define DPMSG_WAIT_5_SECS 5000 #define DPMSG_WAIT_5_SECS 5000
......
...@@ -29,7 +29,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(dplay); ...@@ -29,7 +29,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(dplay);
/* Prototypes */ /* Prototypes */
static BOOL DPLSP_CreateIUnknown( LPVOID lpSP ); static BOOL DPLSP_CreateIUnknown( LPVOID lpSP );
static BOOL DPLSP_DestroyIUnknown( LPVOID lpSP ); static BOOL DPLSP_DestroyIUnknown( LPVOID lpSP );
static BOOL DPLSP_CreateDPLobbySP( LPVOID lpSP, IDirectPlay2Impl* dp ); static BOOL DPLSP_CreateDPLobbySP( void *lpSP, IDirectPlayImpl *dp );
static BOOL DPLSP_DestroyDPLobbySP( LPVOID lpSP ); static BOOL DPLSP_DestroyDPLobbySP( LPVOID lpSP );
...@@ -44,7 +44,7 @@ typedef struct tagDPLobbySPIUnknownData ...@@ -44,7 +44,7 @@ typedef struct tagDPLobbySPIUnknownData
typedef struct tagDPLobbySPData typedef struct tagDPLobbySPData
{ {
IDirectPlay2Impl* dplay; IDirectPlayImpl *dplay;
} DPLobbySPData; } DPLobbySPData;
#define DPLSP_IMPL_FIELDS \ #define DPLSP_IMPL_FIELDS \
...@@ -61,7 +61,7 @@ struct IDPLobbySPImpl ...@@ -61,7 +61,7 @@ struct IDPLobbySPImpl
/* Forward declaration of virtual tables */ /* Forward declaration of virtual tables */
static const IDPLobbySPVtbl dpLobbySPVT; static const IDPLobbySPVtbl dpLobbySPVT;
HRESULT DPLSP_CreateInterface( REFIID riid, LPVOID* ppvObj, IDirectPlay2Impl* dp ) HRESULT DPLSP_CreateInterface( REFIID riid, void **ppvObj, IDirectPlayImpl *dp )
{ {
TRACE( " for %s\n", debugstr_guid( riid ) ); TRACE( " for %s\n", debugstr_guid( riid ) );
...@@ -134,7 +134,7 @@ static BOOL DPLSP_DestroyIUnknown( LPVOID lpSP ) ...@@ -134,7 +134,7 @@ static BOOL DPLSP_DestroyIUnknown( LPVOID lpSP )
return TRUE; return TRUE;
} }
static BOOL DPLSP_CreateDPLobbySP( LPVOID lpSP, IDirectPlay2Impl* dp ) static BOOL DPLSP_CreateDPLobbySP( void *lpSP, IDirectPlayImpl *dp )
{ {
IDPLobbySPImpl *This = lpSP; IDPLobbySPImpl *This = lpSP;
......
...@@ -353,10 +353,8 @@ void NS_PruneSessionCache( LPVOID lpNSInfo ) ...@@ -353,10 +353,8 @@ void NS_PruneSessionCache( LPVOID lpNSInfo )
} }
/* NAME SERVER Message stuff */ /* NAME SERVER Message stuff */
void NS_ReplyToEnumSessionsRequest( LPCVOID lpcMsg, void NS_ReplyToEnumSessionsRequest( const void *lpcMsg, void **lplpReplyData, DWORD *lpdwReplySize,
LPVOID* lplpReplyData, IDirectPlayImpl *lpDP )
LPDWORD lpdwReplySize,
IDirectPlay2Impl* lpDP )
{ {
LPDPMSG_ENUMSESSIONSREPLY rmsg; LPDPMSG_ENUMSESSIONSREPLY rmsg;
DWORD dwVariableSize; DWORD dwVariableSize;
......
...@@ -40,7 +40,7 @@ void NS_SetLocalAddr( LPVOID lpNSInfo, LPCVOID lpHdr, DWORD dwHdrSize ) DECLSPEC ...@@ -40,7 +40,7 @@ void NS_SetLocalAddr( LPVOID lpNSInfo, LPCVOID lpHdr, DWORD dwHdrSize ) DECLSPEC
void NS_ReplyToEnumSessionsRequest( LPCVOID lpcMsg, void NS_ReplyToEnumSessionsRequest( LPCVOID lpcMsg,
LPVOID* lplpReplyData, LPVOID* lplpReplyData,
LPDWORD lpdwReplySize, LPDWORD lpdwReplySize,
IDirectPlay2Impl* lpDP ) DECLSPEC_HIDDEN; IDirectPlayImpl *lpDP ) DECLSPEC_HIDDEN;
HRESULT NS_SendSessionRequestBroadcast( LPCGUID lpcGuid, HRESULT NS_SendSessionRequestBroadcast( LPCGUID lpcGuid,
DWORD dwFlags, DWORD dwFlags,
......
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