2 * Copyright (C) the Wine project
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 #ifndef __WINE_DPLAY_H
20 #define __WINE_DPLAY_H
26 #endif /* defined(__cplusplus) */
28 typedef LPVOID (*LPRGLPVOID
)[];
29 typedef LPRGLPVOID PRGPVOID
, LPRGPVOID
, PRGLPVOID
, PAPVOID
, LPAPVOID
, PALPVOID
, LPALPVOID
;
32 typedef VOID
* volatile LPVOIDV
;
35 /*****************************************************************************
36 * Predeclare the interfaces
38 DEFINE_GUID(CLSID_DirectPlay
,0xd1eb6d20, 0x8923, 0x11d0, 0x9d, 0x97, 0x0, 0xa0, 0xc9, 0xa, 0x43, 0xcb);
40 DEFINE_GUID(IID_IDirectPlay
, 0x5454e9a0, 0xdb65, 0x11ce, 0x92, 0x1c, 0x00, 0xaa, 0x00, 0x6c, 0x49, 0x72);
41 typedef struct IDirectPlay IDirectPlay
,*LPDIRECTPLAY
;
43 DEFINE_GUID(IID_IDirectPlay2
, 0x2b74f7c0, 0x9154, 0x11cf, 0xa9, 0xcd, 0x0, 0xaa, 0x0, 0x68, 0x86, 0xe3);
44 typedef struct IDirectPlay2 IDirectPlay2
,*LPDIRECTPLAY2
;
46 DEFINE_GUID(IID_IDirectPlay2A
,0x9d460580, 0xa822, 0x11cf, 0x96, 0xc, 0x0, 0x80, 0xc7, 0x53, 0x4e, 0x82);
47 typedef struct IDirectPlay2 IDirectPlay2A
,*LPDIRECTPLAY2A
;
49 DEFINE_GUID(IID_IDirectPlay3
, 0x133efe40, 0x32dc, 0x11d0, 0x9c, 0xfb, 0x0, 0xa0, 0xc9, 0xa, 0x43, 0xcb);
50 typedef struct IDirectPlay3 IDirectPlay3
,*LPDIRECTPLAY3
;
52 DEFINE_GUID(IID_IDirectPlay3A
,0x133efe41, 0x32dc, 0x11d0, 0x9c, 0xfb, 0x0, 0xa0, 0xc9, 0xa, 0x43, 0xcb);
53 typedef struct IDirectPlay3 IDirectPlay3A
,*LPDIRECTPLAY3A
;
55 DEFINE_GUID(IID_IDirectPlay4
, 0xab1c530, 0x4745, 0x11d1, 0xa7, 0xa1, 0x0, 0x0, 0xf8, 0x3, 0xab, 0xfc);
56 typedef struct IDirectPlay4 IDirectPlay4
,*LPDIRECTPLAY4
;
58 DEFINE_GUID(IID_IDirectPlay4A
,0xab1c531, 0x4745, 0x11d1, 0xa7, 0xa1, 0x0, 0x0, 0xf8, 0x3, 0xab, 0xfc);
59 typedef struct IDirectPlay4 IDirectPlay4A
,*LPDIRECTPLAY4A
;
63 * GUIDS used by Service Providers shipped with DirectPlay
64 * Use these to identify Service Provider returned by EnumConnections
67 /* GUID for IPX service provider {685BC400-9D2C-11cf-A9CD-00AA006886E3} */
68 DEFINE_GUID(DPSPGUID_IPX
, 0x685bc400, 0x9d2c, 0x11cf, 0xa9, 0xcd, 0x0, 0xaa, 0x0, 0x68, 0x86, 0xe3);
70 /* GUID for TCP/IP service provider {36E95EE0-8577-11cf-960C-0080C7534E82} */
71 DEFINE_GUID(DPSPGUID_TCPIP
, 0x36E95EE0, 0x8577, 0x11cf, 0x96, 0xc, 0x0, 0x80, 0xc7, 0x53, 0x4e, 0x82);
73 /* GUID for Serial service provider {0F1D6860-88D9-11cf-9C4E-00A0C905425E} */
74 DEFINE_GUID(DPSPGUID_SERIAL
, 0xf1d6860, 0x88d9, 0x11cf, 0x9c, 0x4e, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e);
76 /* GUID for Modem service provider {44EAA760-CB68-11cf-9C4E-00A0C905425E} */
77 DEFINE_GUID(DPSPGUID_MODEM
, 0x44eaa760, 0xcb68, 0x11cf, 0x9c, 0x4e, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e);
80 /*****************************************************************************
84 /* Return Values for Direct Play */
86 #define MAKE_DPHRESULT( code ) MAKE_HRESULT( 1, _FACDP, code )
89 #define DPERR_ALREADYINITIALIZED MAKE_DPHRESULT( 5 )
90 #define DPERR_ACCESSDENIED MAKE_DPHRESULT( 10 )
91 #define DPERR_ACTIVEPLAYERS MAKE_DPHRESULT( 20 )
92 #define DPERR_BUFFERTOOSMALL MAKE_DPHRESULT( 30 )
93 #define DPERR_CANTADDPLAYER MAKE_DPHRESULT( 40 )
94 #define DPERR_CANTCREATEGROUP MAKE_DPHRESULT( 50 )
95 #define DPERR_CANTCREATEPLAYER MAKE_DPHRESULT( 60 )
96 #define DPERR_CANTCREATESESSION MAKE_DPHRESULT( 70 )
97 #define DPERR_CAPSNOTAVAILABLEYET MAKE_DPHRESULT( 80 )
98 #define DPERR_EXCEPTION MAKE_DPHRESULT( 90 )
99 #define DPERR_GENERIC E_FAIL
100 #define DPERR_INVALIDFLAGS MAKE_DPHRESULT( 120 )
101 #define DPERR_INVALIDOBJECT MAKE_DPHRESULT( 130 )
102 #define DPERR_INVALIDPARAM E_INVALIDARG
103 #define DPERR_INVALIDPARAMS DPERR_INVALIDPARAM
104 #define DPERR_INVALIDPLAYER MAKE_DPHRESULT( 150 )
105 #define DPERR_INVALIDGROUP MAKE_DPHRESULT( 155 )
106 #define DPERR_NOCAPS MAKE_DPHRESULT( 160 )
107 #define DPERR_NOCONNECTION MAKE_DPHRESULT( 170 )
108 #define DPERR_NOMEMORY E_OUTOFMEMORY
109 #define DPERR_OUTOFMEMORY DPERR_NOMEMORY
110 #define DPERR_NOMESSAGES MAKE_DPHRESULT( 190 )
111 #define DPERR_NONAMESERVERFOUND MAKE_DPHRESULT( 200 )
112 #define DPERR_NOPLAYERS MAKE_DPHRESULT( 210 )
113 #define DPERR_NOSESSIONS MAKE_DPHRESULT( 220 )
114 #define DPERR_PENDING E_PENDING
115 #define DPERR_SENDTOOBIG MAKE_DPHRESULT( 230 )
116 #define DPERR_TIMEOUT MAKE_DPHRESULT( 240 )
117 #define DPERR_UNAVAILABLE MAKE_DPHRESULT( 250 )
118 #define DPERR_UNSUPPORTED E_NOTIMPL
119 #define DPERR_BUSY MAKE_DPHRESULT( 270 )
120 #define DPERR_USERCANCEL MAKE_DPHRESULT( 280 )
121 #define DPERR_NOINTERFACE E_NOINTERFACE
122 #define DPERR_CANNOTCREATESERVER MAKE_DPHRESULT( 290 )
123 #define DPERR_PLAYERLOST MAKE_DPHRESULT( 300 )
124 #define DPERR_SESSIONLOST MAKE_DPHRESULT( 310 )
125 #define DPERR_UNINITIALIZED MAKE_DPHRESULT( 320 )
126 #define DPERR_NONEWPLAYERS MAKE_DPHRESULT( 330 )
127 #define DPERR_INVALIDPASSWORD MAKE_DPHRESULT( 340 )
128 #define DPERR_CONNECTING MAKE_DPHRESULT( 350 )
129 #define DPERR_CONNECTIONLOST MAKE_DPHRESULT( 360 )
130 #define DPERR_UNKNOWNMESSAGE MAKE_DPHRESULT( 370 )
131 #define DPERR_CANCELFAILED MAKE_DPHRESULT( 380 )
132 #define DPERR_INVALIDPRIORITY MAKE_DPHRESULT( 390 )
133 #define DPERR_NOTHANDLED MAKE_DPHRESULT( 400 )
134 #define DPERR_CANCELLED MAKE_DPHRESULT( 410 )
135 #define DPERR_ABORTED MAKE_DPHRESULT( 420 )
136 #define DPERR_BUFFERTOOLARGE MAKE_DPHRESULT( 1000 )
137 #define DPERR_CANTCREATEPROCESS MAKE_DPHRESULT( 1010 )
138 #define DPERR_APPNOTSTARTED MAKE_DPHRESULT( 1020 )
139 #define DPERR_INVALIDINTERFACE MAKE_DPHRESULT( 1030 )
140 #define DPERR_NOSERVICEPROVIDER MAKE_DPHRESULT( 1040 )
141 #define DPERR_UNKNOWNAPPLICATION MAKE_DPHRESULT( 1050 )
142 #define DPERR_NOTLOBBIED MAKE_DPHRESULT( 1070 )
143 #define DPERR_SERVICEPROVIDERLOADED MAKE_DPHRESULT( 1080 )
144 #define DPERR_ALREADYREGISTERED MAKE_DPHRESULT( 1090 )
145 #define DPERR_NOTREGISTERED MAKE_DPHRESULT( 1100 )
146 #define DPERR_AUTHENTICATIONFAILED MAKE_DPHRESULT( 2000 )
147 #define DPERR_CANTLOADSSPI MAKE_DPHRESULT( 2010 )
148 #define DPERR_ENCRYPTIONFAILED MAKE_DPHRESULT( 2020 )
149 #define DPERR_SIGNFAILED MAKE_DPHRESULT( 2030 )
150 #define DPERR_CANTLOADSECURITYPACKAGE MAKE_DPHRESULT( 2040 )
151 #define DPERR_ENCRYPTIONNOTSUPPORTED MAKE_DPHRESULT( 2050 )
152 #define DPERR_CANTLOADCAPI MAKE_DPHRESULT( 2060 )
153 #define DPERR_NOTLOGGEDIN MAKE_DPHRESULT( 2070 )
154 #define DPERR_LOGONDENIED MAKE_DPHRESULT( 2080 )
157 /* DPID - DirectPlay player and group ID */
158 typedef DWORD DPID
, *LPDPID
;
160 /* DPID from whence originate messages - just an ID */
161 #define DPID_SYSMSG 0 /* DPID of system */
162 #define DPID_ALLPLAYERS 0 /* DPID of all players */
163 #define DPID_SERVERPLAYER 1 /* DPID of the server player */
164 #define DPID_UNKNOWN 0xFFFFFFFF /* Player ID is unknown */
166 /* DPCAPS - Used to obtain the capabilities of a DirectPlay object */
167 typedef struct tagDPCAPS
169 DWORD dwSize
; /* Size of structure in bytes */
171 DWORD dwMaxBufferSize
;
172 DWORD dwMaxQueueSize
; /* Obsolete. */
173 DWORD dwMaxPlayers
; /* Maximum players/groups (local + remote) */
174 DWORD dwHundredBaud
; /* Bandwidth in 100 bits per second units;
175 * i.e. 24 is 2400, 96 is 9600, etc.
177 DWORD dwLatency
; /* Estimated latency; 0 = unknown */
178 DWORD dwMaxLocalPlayers
; /* Maximum # of locally created players */
179 DWORD dwHeaderLength
; /* Maximum header length in bytes */
180 DWORD dwTimeout
; /* Service provider's suggested timeout value
181 * This is how long DirectPlay will wait for
182 * responses to system messages
186 typedef struct tagDPNAME
189 DWORD dwFlags
; /* Not used must be 0 */
191 union /*playerShortName */ /* Player's Handle? */
193 LPWSTR lpszShortName
;
194 LPSTR lpszShortNameA
;
197 union /*playerLongName */ /* Player's formal/real name */
205 #define DPLONGNAMELEN 52
206 #define DPSHORTNAMELEN 20
207 #define DPSESSIONNAMELEN 32
208 #define DPPASSWORDLEN 16
209 #define DPUSERRESERVED 16
211 typedef struct tagDPSESSIONDESC
217 DWORD dwCurrentPlayers
;
219 char szSessionName
[ DPSESSIONNAMELEN
];
220 char szUserField
[ DPUSERRESERVED
];
222 char szPassword
[ DPPASSWORDLEN
];
228 } DPSESSIONDESC
, *LPDPSESSIONDESC
;
230 typedef struct tagDPSESSIONDESC2
235 GUID guidApplication
; /* GUID of the DP application, GUID_NULL if
236 * all applications! */
239 DWORD dwCurrentPlayers
; /* (read only value) */
241 union /* Session name */
243 LPWSTR lpszSessionName
;
244 LPSTR lpszSessionNameA
;
247 union /* Optional password */
256 DWORD dwUser1
; /* For use by the application */
260 } DPSESSIONDESC2
, *LPDPSESSIONDESC2
;
261 typedef const DPSESSIONDESC2
* LPCDPSESSIONDESC2
;
263 #define DPOPEN_JOIN 0x00000001
264 #define DPOPEN_CREATE 0x00000002
265 #define DPOPEN_RETURNSTATUS DPENUMSESSIONS_RETURNSTATUS
267 #define DPSESSION_NEWPLAYERSDISABLED 0x00000001
268 #define DPSESSION_MIGRATEHOST 0x00000004
269 #define DPSESSION_NOMESSAGEID 0x00000008
270 #define DPSESSION_JOINDISABLED 0x00000020
271 #define DPSESSION_KEEPALIVE 0x00000040
272 #define DPSESSION_NODATAMESSAGES 0x00000080
273 #define DPSESSION_SECURESERVER 0x00000100
274 #define DPSESSION_PRIVATE 0x00000200
275 #define DPSESSION_PASSWORDREQUIRED 0x00000400
276 #define DPSESSION_MULTICASTSERVER 0x00000800
277 #define DPSESSION_CLIENTSERVER 0x00001000
279 typedef struct tagDPLCONNECTION
283 LPDPSESSIONDESC2 lpSessionDesc
; /* Ptr to session desc to use for connect */
284 LPDPNAME lpPlayerName
; /* Ptr to player name structure */
285 GUID guidSP
; /* GUID of Service Provider to use */
286 LPVOID lpAddress
; /* Ptr to Address of Service Provider to use */
287 DWORD dwAddressSize
; /* Size of address data */
288 } DPLCONNECTION
, *LPDPLCONNECTION
;
290 /* DPLCONNECTION flags (for dwFlags) */
291 #define DPLCONNECTION_CREATESESSION DPOPEN_CREATE
292 #define DPLCONNECTION_JOINSESSION DPOPEN_JOIN
294 typedef struct tagDPCHAT
299 { /* Message string */
300 LPWSTR lpszMessage
; /* Unicode */
301 LPSTR lpszMessageA
; /* ANSI */
309 } SGBUFFER
, *PSGBUFFER
, *LPSGBUFFER
;
312 typedef struct tagDPSECURITYDESC
314 DWORD dwSize
; /* Size of structure */
315 DWORD dwFlags
; /* Not used. Must be zero. */
317 { /* SSPI provider name */
318 LPWSTR lpszSSPIProvider
; /* Unicode */
319 LPSTR lpszSSPIProviderA
; /* ANSI */
322 { /* CAPI provider name */
323 LPWSTR lpszCAPIProvider
; /* Unicode */
324 LPSTR lpszCAPIProviderA
; /* ANSI */
326 DWORD dwCAPIProviderType
; /* Crypto Service Provider type */
327 DWORD dwEncryptionAlgorithm
; /* Encryption Algorithm type */
328 } DPSECURITYDESC
, *LPDPSECURITYDESC
;
330 typedef const DPSECURITYDESC
*LPCDPSECURITYDESC
;
332 typedef struct tagDPCREDENTIALS
334 DWORD dwSize
; /* Size of structure */
335 DWORD dwFlags
; /* Not used. Must be zero. */
337 { /* User name of the account */
338 LPWSTR lpszUsername
; /* Unicode */
339 LPSTR lpszUsernameA
; /* ANSI */
342 { /* Password of the account */
343 LPWSTR lpszPassword
; /* Unicode */
344 LPSTR lpszPasswordA
; /* ANSI */
347 { /* Domain name of the account */
348 LPWSTR lpszDomain
; /* Unicode */
349 LPSTR lpszDomainA
; /* ANSI */
351 } DPCREDENTIALS
, *LPDPCREDENTIALS
;
353 typedef const DPCREDENTIALS
*LPCDPCREDENTIALS
;
357 typedef BOOL (CALLBACK
*LPDPENUMDPCALLBACKW
)(
360 DWORD dwMajorVersion
,
361 DWORD dwMinorVersion
,
364 typedef BOOL (CALLBACK
*LPDPENUMDPCALLBACKA
)(
366 LPSTR lpSPName
, /* ptr to str w/ driver description */
367 DWORD dwMajorVersion
, /* Major # of driver spec in lpguidSP */
368 DWORD dwMinorVersion
, /* Minor # of driver spec in lpguidSP */
369 LPVOID lpContext
); /* User given */
371 #ifndef __LPCGUID_DEFINED__
372 #define __LPCGUID_DEFINED__
373 typedef const GUID
*LPCGUID
;
376 typedef const DPNAME
*LPCDPNAME
;
378 typedef BOOL (CALLBACK
*LPDPENUMCONNECTIONSCALLBACK
)(
381 DWORD dwConnectionSize
,
386 typedef BOOL (CALLBACK
*LPDPENUMSESSIONSCALLBACK
)(
387 LPDPSESSIONDESC lpDPSessionDesc
,
393 extern HRESULT WINAPI
DirectPlayEnumerateA( LPDPENUMDPCALLBACKA
, LPVOID
);
394 extern HRESULT WINAPI
DirectPlayEnumerateW( LPDPENUMDPCALLBACKW
, LPVOID
);
395 extern HRESULT WINAPI
DirectPlayCreate( LPGUID lpGUID
, LPDIRECTPLAY2
*lplpDP
, IUnknown
*pUnk
);
397 typedef BOOL (CALLBACK
*LPDPENUMPLAYERSCALLBACK
)(
399 LPSTR lpFriendlyName
,
404 typedef BOOL (CALLBACK
*LPDPENUMPLAYERSCALLBACK2
)(
411 typedef BOOL (CALLBACK
*LPDPENUMSESSIONSCALLBACK2
)(
412 LPCDPSESSIONDESC2 lpThisSD
,
417 #define DPESC_TIMEDOUT 0x00000001
419 /*****************************************************************************
420 * IDirectPlay interface
422 #define INTERFACE IDirectPlay
423 #define IDirectPlay_METHODS \
425 STDMETHOD(AddPlayerToGroup)(THIS_ DPID idGroup, DPID idPlayer) PURE; \
426 STDMETHOD(Close)(THIS) PURE; \
427 STDMETHOD(CreatePlayer)(THIS_ LPDPID lpidPlayer, LPSTR lpPlayerName, LPSTR, LPHANDLE) PURE; \
428 STDMETHOD(CreateGroup)(THIS_ LPDPID lpidGroup, LPSTR lpGroupName, LPSTR) PURE; \
429 STDMETHOD(DeletePlayerFromGroup)(THIS_ DPID idGroup, DPID idPlayer) PURE; \
430 STDMETHOD(DestroyPlayer)(THIS_ DPID idPlayer) PURE; \
431 STDMETHOD(DestroyGroup)(THIS_ DPID idGroup) PURE; \
432 STDMETHOD(EnableNewPlayers)(THIS_ BOOL) PURE; \
433 STDMETHOD(EnumGroupPlayers)(THIS_ DPID idGroup, LPDPENUMPLAYERSCALLBACK lpEnumPlayersCallback, LPVOID lpContext, DWORD dwFlags) PURE; \
434 STDMETHOD(EnumGroups)(THIS_ DWORD, LPDPENUMPLAYERSCALLBACK lpEnumPlayersCallback, LPVOID lpContext, DWORD dwFlags) PURE; \
435 STDMETHOD(EnumPlayers)(THIS_ DWORD, LPDPENUMPLAYERSCALLBACK lpEnumPlayersCallback, LPVOID lpContext, DWORD dwFlags) PURE; \
436 STDMETHOD(EnumSessions)(THIS_ LPDPSESSIONDESC lpsd, DWORD dwTimeout, LPDPENUMSESSIONSCALLBACK lpEnumSessionsCallback, LPVOID lpContext, DWORD dwFlags) PURE; \
437 STDMETHOD(GetCaps)(THIS_ LPDPCAPS lpDPCaps) PURE; \
438 STDMETHOD(GetMessageCount)(THIS_ DPID idPlayer, LPDWORD lpdwCount) PURE; \
439 STDMETHOD(GetPlayerCaps)(THIS_ DPID idPlayer, LPDPCAPS lpPlayerCaps) PURE; \
440 STDMETHOD(GetPlayerName)(THIS_ DPID idPlayer, LPSTR, LPDWORD, LPSTR, LPDWORD) PURE; \
441 STDMETHOD(Initialize)(THIS_ LPGUID lpGUID) PURE; \
442 STDMETHOD(Open)(THIS_ LPDPSESSIONDESC lpsd) PURE; \
443 STDMETHOD(Receive)(THIS_ LPDPID lpidFrom, LPDPID lpidTo, DWORD dwFlags, LPVOID lpData, LPDWORD lpdwDataSize) PURE; \
444 STDMETHOD(SaveSession)(THIS_ LPSTR) PURE; \
445 STDMETHOD(Send)(THIS_ DPID idFrom, DPID idTo, DWORD dwFlags, LPVOID lpData, DWORD dwDataSize) PURE; \
446 STDMETHOD(SetPlayerName)(THIS_ DPID idPlayer, LPSTR lpPlayerName, LPSTR) PURE;
447 DECLARE_INTERFACE_(IDirectPlay
,IUnknown
) { IDirectPlay_METHODS
};
451 /*** IUnknown methods ***/
452 #define IDirectPlay_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
453 #define IDirectPlay_AddRef(p) (p)->lpVtbl->AddRef(p)
454 #define IDirectPlay_Release(p) (p)->lpVtbl->Release(p)
455 /*** IDirectPlay methods ***/
456 #define IDirectPlay_AddPlayerToGroup(p,a,b) (p)->lpVtbl->AddPlayerToGroup(p,a,b)
457 #define IDirectPlay_Close(p) (p)->lpVtbl->Close(p)
458 #define IDirectPlay_CreatePlayer(p,a,b,c,d) (p)->lpVtbl->CreatePlayer(p,a,b,c,d)
459 #define IDirectPlay_CreateGroup(p,a,b,c) (p)->lpVtbl->CreateGroup(p,a,b,c)
460 #define IDirectPlay_DeletePlayerFromGroup(p,a,b) (p)->lpVtbl->DeletePlayerFromGroup(p,a,b)
461 #define IDirectPlay_DestroyPlayer(p,a) (p)->lpVtbl->DestroyPlayer(p,a)
462 #define IDirectPlay_DestroyGroup(p,a) (p)->lpVtbl->DestroyGroup(p,a)
463 #define IDirectPlay_EnableNewPlayers(p,a) (p)->lpVtbl->EnableNewPlayers(p,a)
464 #define IDirectPlay_EnumGroupPlayers(p,a,b,c,d) (p)->lpVtbl->EnumGroupPlayers(p,a,b,c,d)
465 #define IDirectPlay_EnumGroups(p,a,b,c,d) (p)->lpVtbl->EnumGroups(p,a,b,c,d)
466 #define IDirectPlay_EnumPlayers(p,a,b,c,d) (p)->lpVtbl->EnumPlayers(p,a,b,c,d)
467 #define IDirectPlay_EnumSessions(p,a,b,c,d,e) (p)->lpVtbl->EnumSessions(p,a,b,c,d,e)
468 #define IDirectPlay_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a)
469 #define IDirectPlay_GetMessageCount(p,a,b) (p)->lpVtbl->GetMessageCount(p,a,b)
470 #define IDirectPlay_GetPlayerCaps(p,a,b) (p)->lpVtbl->GetPlayerCaps(p,a,b)
471 #define IDirectPlay_GetPlayerName(p,a,b,c,d,e) (p)->lpVtbl->GetPlayerName(p,a,b,c,d,e)
472 #define IDirectPlay_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
473 #define IDirectPlay_Open(p,a) (p)->lpVtbl->Open(p,a)
474 #define IDirectPlay_Receive(p,a,b,c,d,e) (p)->lpVtbl->Receive(p,a,b,c,d,e)
475 #define IDirectPlay_SaveSession(p,a) (p)->lpVtbl->SaveSession(p,a)
476 #define IDirectPlay_Send(p,a,b,c,d,e) (p)->lpVtbl->Send(p,a,b,c,d,e)
477 #define IDirectPlay_SetPlayerName(p,a,b,c) (p)->lpVtbl->SetPlayerName(p,a,b,c)
481 /*****************************************************************************
482 * IDirectPlay2 and IDirectPlay2A interface
484 #define INTERFACE IDirectPlay2
485 #define IDirectPlay2_METHODS \
487 STDMETHOD(AddPlayerToGroup)(THIS_ DPID idGroup, DPID idPlayer) PURE; \
488 STDMETHOD(Close)(THIS) PURE; \
489 STDMETHOD(CreateGroup)(THIS_ LPDPID lpidGroup, LPDPNAME lpGroupName, LPVOID lpData, DWORD dwDataSize, DWORD dwFlags) PURE; \
490 STDMETHOD(CreatePlayer)(THIS_ LPDPID lpidPlayer, LPDPNAME lpPlayerName, HANDLE hEvent, LPVOID lpData, DWORD dwDataSize, DWORD dwFlags) PURE; \
491 STDMETHOD(DeletePlayerFromGroup)(THIS_ DPID idGroup, DPID idPlayer) PURE; \
492 STDMETHOD(DestroyGroup)(THIS_ DPID idGroup) PURE; \
493 STDMETHOD(DestroyPlayer)(THIS_ DPID idPlayer) PURE; \
494 STDMETHOD(EnumGroupPlayers)(THIS_ DPID idGroup, LPGUID lpguidInstance, LPDPENUMPLAYERSCALLBACK2 lpEnumPlayersCallback2, LPVOID lpContext, DWORD dwFlags) PURE; \
495 STDMETHOD(EnumGroups)(THIS_ LPGUID lpguidInstance, LPDPENUMPLAYERSCALLBACK2 lpEnumPlayersCallback2, LPVOID lpContext, DWORD dwFlags) PURE; \
496 STDMETHOD(EnumPlayers)(THIS_ LPGUID lpguidInstance, LPDPENUMPLAYERSCALLBACK2 lpEnumPlayersCallback2, LPVOID lpContext, DWORD dwFlags) PURE; \
497 STDMETHOD(EnumSessions)(THIS_ LPDPSESSIONDESC2 lpsd, DWORD dwTimeout, LPDPENUMSESSIONSCALLBACK2 lpEnumSessionsCallback2, LPVOID lpContext, DWORD dwFlags) PURE; \
498 STDMETHOD(GetCaps)(THIS_ LPDPCAPS lpDPCaps, DWORD dwFlags) PURE; \
499 STDMETHOD(GetGroupData)(THIS_ DPID idGroup, LPVOID lpData, LPDWORD lpdwDataSize, DWORD dwFlags) PURE; \
500 STDMETHOD(GetGroupName)(THIS_ DPID idGroup, LPVOID lpData, LPDWORD lpdwDataSize) PURE; \
501 STDMETHOD(GetMessageCount)(THIS_ DPID idPlayer, LPDWORD lpdwCount) PURE; \
502 STDMETHOD(GetPlayerAddress)(THIS_ DPID idPlayer, LPVOID lpData, LPDWORD lpdwDataSize) PURE; \
503 STDMETHOD(GetPlayerCaps)(THIS_ DPID idPlayer, LPDPCAPS lpPlayerCaps, DWORD dwFlags) PURE; \
504 STDMETHOD(GetPlayerData)(THIS_ DPID idPlayer, LPVOID lpData, LPDWORD lpdwDataSize, DWORD dwFlags) PURE; \
505 STDMETHOD(GetPlayerName)(THIS_ DPID idPlayer, LPVOID lpData, LPDWORD lpdwDataSize) PURE; \
506 STDMETHOD(GetSessionDesc)(THIS_ LPVOID lpData, LPDWORD lpdwDataSize) PURE; \
507 STDMETHOD(Initialize)(THIS_ LPGUID lpGUID) PURE; \
508 STDMETHOD(Open)(THIS_ LPDPSESSIONDESC2 lpsd, DWORD dwFlags) PURE; \
509 STDMETHOD(Receive)(THIS_ LPDPID lpidFrom, LPDPID lpidTo, DWORD dwFlags, LPVOID lpData, LPDWORD lpdwDataSize) PURE; \
510 STDMETHOD(Send)(THIS_ DPID idFrom, DPID idTo, DWORD dwFlags, LPVOID lpData, DWORD dwDataSize) PURE; \
511 STDMETHOD(SetGroupData)(THIS_ DPID idGroup, LPVOID lpData, DWORD dwDataSize, DWORD dwFlags) PURE; \
512 STDMETHOD(SetGroupName)(THIS_ DPID idGroup, LPDPNAME lpGroupName, DWORD dwFlags) PURE; \
513 STDMETHOD(SetPlayerData)(THIS_ DPID idPlayer, LPVOID lpData, DWORD dwDataSize, DWORD dwFlags) PURE; \
514 STDMETHOD(SetPlayerName)(THIS_ DPID idPlayer, LPDPNAME lpPlayerName, DWORD dwFlags) PURE; \
515 STDMETHOD(SetSessionDesc)(THIS_ LPDPSESSIONDESC2 lpSessDesc, DWORD dwFlags) PURE;
516 DECLARE_INTERFACE_(IDirectPlay2
,IUnknown
) { IDirectPlay2_METHODS
};
520 /*** IUnknown methods ***/
521 #define IDirectPlay2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
522 #define IDirectPlay2_AddRef(p) (p)->lpVtbl->AddRef(p)
523 #define IDirectPlay2_Release(p) (p)->lpVtbl->Release(p)
524 /*** IDirectPlay2 methods ***/
525 #define IDirectPlay2_AddPlayerToGroup(p,a,b) (p)->lpVtbl->AddPlayerToGroup(p,a,b)
526 #define IDirectPlay2_Close(p) (p)->lpVtbl->Close(p)
527 #define IDirectPlay2_CreateGroup(p,a,b,c,d,e) (p)->lpVtbl->CreateGroup(p,a,b,c,d,e)
528 #define IDirectPlay2_CreatePlayer(p,a,b,c,d,e,f) (p)->lpVtbl->CreatePlayer(p,a,b,c,d,e,f)
529 #define IDirectPlay2_DeletePlayerFromGroup(p,a,b) (p)->lpVtbl->DeletePlayerFromGroup(p,a,b)
530 #define IDirectPlay2_DestroyGroup(p,a) (p)->lpVtbl->DestroyGroup(p,a)
531 #define IDirectPlay2_DestroyPlayer(p,a) (p)->lpVtbl->DestroyPlayer(p,a)
532 #define IDirectPlay2_EnumGroupPlayers(p,a,b,c,d,e) (p)->lpVtbl->EnumGroupPlayers(p,a,b,c,d,e)
533 #define IDirectPlay2_EnumGroups(p,a,b,c,d) (p)->lpVtbl->EnumGroups(p,a,b,c,d)
534 #define IDirectPlay2_EnumPlayers(p,a,b,c,d) (p)->lpVtbl->EnumPlayers(p,a,b,c,d)
535 #define IDirectPlay2_EnumSessions(p,a,b,c,d,e) (p)->lpVtbl->EnumSessions(p,a,b,c,d,e)
536 #define IDirectPlay2_GetCaps(p,a,b) (p)->lpVtbl->GetCaps(p,a,b)
537 #define IDirectPlay2_GetGroupData(p,a,b,c,d) (p)->lpVtbl->GetGroupData(p,a,b,c,d)
538 #define IDirectPlay2_GetGroupName(p,a,b,c) (p)->lpVtbl->GetGroupName(p,a,b,c)
539 #define IDirectPlay2_GetMessageCount(p,a,b) (p)->lpVtbl->GetMessageCount(p,a,b)
540 #define IDirectPlay2_GetPlayerAddress(p,a,b,c) (p)->lpVtbl->GetPlayerAddress(p,a,b,c)
541 #define IDirectPlay2_GetPlayerCaps(p,a,b,c) (p)->lpVtbl->GetPlayerCaps(p,a,b,c)
542 #define IDirectPlay2_GetPlayerData(p,a,b,c,d) (p)->lpVtbl->GetPlayerData(p,a,b,c,d)
543 #define IDirectPlay2_GetPlayerName(p,a,b,c) (p)->lpVtbl->GetPlayerName(p,a,b,c)
544 #define IDirectPlay2_GetSessionDesc(p,a,b) (p)->lpVtbl->GetSessionDesc(p,a,b)
545 #define IDirectPlay2_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
546 #define IDirectPlay2_Open(p,a,b) (p)->lpVtbl->Open(p,a,b)
547 #define IDirectPlay2_Receive(p,a,b,c,d,e) (p)->lpVtbl->Receive(p,a,b,c,d,e)
548 #define IDirectPlay2_Send(p,a,b,c,d,e) (p)->lpVtbl->Send(p,a,b,c,d,e)
549 #define IDirectPlay2_SetGroupData(p,a,b,c,d) (p)->lpVtbl->SetGroupData(p,a,b,c,d)
550 #define IDirectPlay2_SetGroupName(p,a,b,c) (p)->lpVtbl->SetGroupName(p,a,b,c)
551 #define IDirectPlay2_SetPlayerData(p,a,b,c,d) (p)->lpVtbl->SetPlayerData(p,a,b,c,d)
552 #define IDirectPlay2_SetPlayerName(p,a,b,c) (p)->lpVtbl->SetPlayerName(p,a,b,c)
553 #define IDirectPlay2_SetSessionDesc(p,a,b) (p)->lpVtbl->SetSessionDesc(p,a,b)
557 /*****************************************************************************
558 * IDirectPlay3 and IDirectPlay3A interface
560 #define INTERFACE IDirectPlay3
561 #define IDirectPlay3_METHODS \
562 IDirectPlay2_METHODS \
563 STDMETHOD(AddGroupToGroup)(THIS_ DPID idParentGroup, DPID idGroup) PURE; \
564 STDMETHOD(CreateGroupInGroup)(THIS_ DPID idParentGroup, LPDPID lpidGroup, LPDPNAME lpGroupName, LPVOID lpData, DWORD dwDataSize, DWORD dwFlags) PURE; \
565 STDMETHOD(DeleteGroupFromGroup)(THIS_ DPID idParentGroup, DPID idGroup) PURE; \
566 STDMETHOD(EnumConnections)(THIS_ LPCGUID lpguidApplication, LPDPENUMCONNECTIONSCALLBACK lpEnumCallback, LPVOID lpContext, DWORD dwFlags) PURE; \
567 STDMETHOD(EnumGroupsInGroup)(THIS_ DPID idGroup, LPGUID lpguidInstance, LPDPENUMPLAYERSCALLBACK2 lpEnumCallback, LPVOID lpContext, DWORD dwFlags) PURE; \
568 STDMETHOD(GetGroupConnectionSettings)(THIS_ DWORD dwFlags, DPID idGroup, LPVOID lpData, LPDWORD lpdwDataSize) PURE; \
569 STDMETHOD(InitializeConnection)(THIS_ LPVOID lpConnection, DWORD dwFlags) PURE; \
570 STDMETHOD(SecureOpen)(THIS_ LPCDPSESSIONDESC2 lpsd, DWORD dwFlags, LPCDPSECURITYDESC lpSecurity, LPCDPCREDENTIALS lpCredentials) PURE; \
571 STDMETHOD(SendChatMessage)(THIS_ DPID idFrom, DPID idTo, DWORD dwFlags, LPDPCHAT lpChatMessage) PURE; \
572 STDMETHOD(SetGroupConnectionSettings)(THIS_ DWORD dwFlags, DPID idGroup, LPDPLCONNECTION lpConnection) PURE; \
573 STDMETHOD(StartSession)(THIS_ DWORD dwFlags, DPID idGroup) PURE; \
574 STDMETHOD(GetGroupFlags)(THIS_ DPID idGroup, LPDWORD lpdwFlags) PURE; \
575 STDMETHOD(GetGroupParent)(THIS_ DPID idGroup, LPDPID lpidParent) PURE; \
576 STDMETHOD(GetPlayerAccount)(THIS_ DPID idPlayer, DWORD dwFlags, LPVOID lpData, LPDWORD lpdwDataSize) PURE; \
577 STDMETHOD(GetPlayerFlags)(THIS_ DPID idPlayer, LPDWORD lpdwFlags) PURE;
578 DECLARE_INTERFACE_(IDirectPlay3
,IDirectPlay2
) { IDirectPlay3_METHODS
};
582 /*** IUnknown methods ***/
583 #define IDirectPlay3_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
584 #define IDirectPlay3_AddRef(p) (p)->lpVtbl->AddRef(p)
585 #define IDirectPlay3_Release(p) (p)->lpVtbl->Release(p)
586 /*** IDirectPlay2 methods ***/
587 #define IDirectPlay3_AddPlayerToGroup(p,a,b) (p)->lpVtbl->AddPlayerToGroup(p,a,b)
588 #define IDirectPlay3_Close(p) (p)->lpVtbl->Close(p)
589 #define IDirectPlay3_CreateGroup(p,a,b,c,d,e) (p)->lpVtbl->CreateGroup(p,a,b,c,d,e)
590 #define IDirectPlay3_CreatePlayer(p,a,b,c,d,e,f) (p)->lpVtbl->CreatePlayer(p,a,b,c,d,e,f)
591 #define IDirectPlay3_DeletePlayerFromGroup(p,a,b) (p)->lpVtbl->DeletePlayerFromGroup(p,a,b)
592 #define IDirectPlay3_DestroyGroup(p,a) (p)->lpVtbl->DestroyGroup(p,a)
593 #define IDirectPlay3_DestroyPlayer(p,a) (p)->lpVtbl->DestroyPlayer(p,a)
594 #define IDirectPlay3_EnumGroupPlayers(p,a,b,c,d,e) (p)->lpVtbl->EnumGroupPlayers(p,a,b,c,d,e)
595 #define IDirectPlay3_EnumGroups(p,a,b,c,d) (p)->lpVtbl->EnumGroups(p,a,b,c,d)
596 #define IDirectPlay3_EnumPlayers(p,a,b,c,d) (p)->lpVtbl->EnumPlayers(p,a,b,c,d)
597 #define IDirectPlay3_EnumSessions(p,a,b,c,d,e) (p)->lpVtbl->EnumSessions(p,a,b,c,d,e)
598 #define IDirectPlay3_GetCaps(p,a,b) (p)->lpVtbl->GetCaps(p,a,b)
599 #define IDirectPlay3_GetGroupData(p,a,b,c,d) (p)->lpVtbl->GetGroupData(p,a,b,c,d)
600 #define IDirectPlay3_GetGroupName(p,a,b,c) (p)->lpVtbl->GetGroupName(p,a,b,c)
601 #define IDirectPlay3_GetMessageCount(p,a,b) (p)->lpVtbl->GetMessageCount(p,a,b)
602 #define IDirectPlay3_GetPlayerAddress(p,a,b,c) (p)->lpVtbl->GetPlayerAddress(p,a,b,c)
603 #define IDirectPlay3_GetPlayerCaps(p,a,b,c) (p)->lpVtbl->GetPlayerCaps(p,a,b,c)
604 #define IDirectPlay3_GetPlayerData(p,a,b,c,d) (p)->lpVtbl->GetPlayerData(p,a,b,c,d)
605 #define IDirectPlay3_GetPlayerName(p,a,b,c) (p)->lpVtbl->GetPlayerName(p,a,b,c)
606 #define IDirectPlay3_GetSessionDesc(p,a,b) (p)->lpVtbl->GetSessionDesc(p,a,b)
607 #define IDirectPlay3_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
608 #define IDirectPlay3_Open(p,a,b) (p)->lpVtbl->Open(p,a,b)
609 #define IDirectPlay3_Receive(p,a,b,c,d,e) (p)->lpVtbl->Receive(p,a,b,c,d,e)
610 #define IDirectPlay3_Send(p,a,b,c,d,e) (p)->lpVtbl->Send(p,a,b,c,d,e)
611 #define IDirectPlay3_SetGroupData(p,a,b,c,d) (p)->lpVtbl->SetGroupData(p,a,b,c,d)
612 #define IDirectPlay3_SetGroupName(p,a,b,c) (p)->lpVtbl->SetGroupName(p,a,b,c)
613 #define IDirectPlay3_SetPlayerData(p,a,b,c,d) (p)->lpVtbl->SetPlayerData(p,a,b,c,d)
614 #define IDirectPlay3_SetPlayerName(p,a,b,c) (p)->lpVtbl->SetPlayerName(p,a,b,c)
615 #define IDirectPlay3_SetSessionDesc(p,a,b) (p)->lpVtbl->SetSessionDesc(p,a,b)
616 /*** IDirectPlay3 methods ***/
617 #define IDirectPlay3_AddGroupToGroup(p,a,b) (p)->lpVtbl->AddGroupToGroup(p,a,b)
618 #define IDirectPlay3_CreateGroupInGroup(p,a,b,c,d,e,f) (p)->lpVtbl->CreateGroupInGroup(p,a,b,c,d,e,f)
619 #define IDirectPlay3_DeleteGroupFromGroup(p,a,b) (p)->lpVtbl->DeleteGroupFromGroup(p,a,b)
620 #define IDirectPlay3_EnumConnections(p,a,b,c,d) (p)->lpVtbl->EnumConnections(p,a,b,c,d)
621 #define IDirectPlay3_EnumGroupsInGroup(p,a,b,c,d,e) (p)->lpVtbl->EnumGroupsInGroup(p,a,b,c,d,e)
622 #define IDirectPlay3_GetGroupConnectionSettings(p,a,b,c,d) (p)->lpVtbl->GetGroupConnectionSettings(p,a,b,c,d)
623 #define IDirectPlay3_InitializeConnection(p,a,b) (p)->lpVtbl->InitializeConnection(p,a,b)
624 #define IDirectPlay3_SecureOpen(p,a,b,c,d) (p)->lpVtbl->SecureOpen(p,a,b,c,d)
625 #define IDirectPlay3_SendChatMessage(p,a,b,c,d) (p)->lpVtbl->SendChatMessage(p,a,b,c,d)
626 #define IDirectPlay3_SetGroupConnectionSettings(p,a,b,c) (p)->lpVtbl->SetGroupConnectionSettings(p,a,b,c)
627 #define IDirectPlay3_StartSession(p,a,b) (p)->lpVtbl->StartSession(p,a,b)
628 #define IDirectPlay3_GetGroupFlags(p,a,b) (p)->lpVtbl->GetGroupFlags(p,a,b)
629 #define IDirectPlay3_GetGroupParent(p,a,b) (p)->lpVtbl->GetGroupParent(p,a,b)
630 #define IDirectPlay3_GetPlayerAccount(p,a,b,c,d) (p)->lpVtbl->GetPlayerAccount(p,a,b,c,d)
631 #define IDirectPlay3_GetPlayerFlags(p,a,b) (p)->lpVtbl->GetPlayerFlags(p,a,b)
634 /*****************************************************************************
635 * IDirectPlay4 and IDirectPlay4A interface
637 #define INTERFACE IDirectPlay4
638 #define IDirectPlay4_METHODS \
639 IDirectPlay3_METHODS \
640 STDMETHOD(GetGroupOwner)(THIS_ DPID , LPDPID ) PURE; \
641 STDMETHOD(SetGroupOwner)(THIS_ DPID , DPID ) PURE; \
642 STDMETHOD(SendEx)(THIS_ DPID , DPID , DWORD , LPVOID , DWORD , DWORD , DWORD , LPVOID , LPDWORD ) PURE; \
643 STDMETHOD(GetMessageQueue)(THIS_ DPID , DPID , DWORD , LPDWORD , LPDWORD ) PURE; \
644 STDMETHOD(CancelMessage)(THIS_ DWORD , DWORD ) PURE; \
645 STDMETHOD(CancelPriority)(THIS_ DWORD , DWORD , DWORD ) PURE;
646 DECLARE_INTERFACE_(IDirectPlay4
,IDirectPlay3
) { IDirectPlay4_METHODS
};
650 /*** IUnknown methods ***/
651 #define IDirectPlayX_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
652 #define IDirectPlayX_AddRef(p) (p)->lpVtbl->AddRef(p)
653 #define IDirectPlayX_Release(p) (p)->lpVtbl->Release(p)
654 /*** IDirectPlay2 methods ***/
655 #define IDirectPlayX_AddPlayerToGroup(p,a,b) (p)->lpVtbl->AddPlayerToGroup(p,a,b)
656 #define IDirectPlayX_Close(p) (p)->lpVtbl->Close(p)
657 #define IDirectPlayX_CreateGroup(p,a,b,c,d,e) (p)->lpVtbl->CreateGroup(p,a,b,c,d,e)
658 #define IDirectPlayX_CreatePlayer(p,a,b,c,d,e,f) (p)->lpVtbl->CreatePlayer(p,a,b,c,d,e,f)
659 #define IDirectPlayX_DeletePlayerFromGroup(p,a,b) (p)->lpVtbl->DeletePlayerFromGroup(p,a,b)
660 #define IDirectPlayX_DestroyGroup(p,a) (p)->lpVtbl->DestroyGroup(p,a)
661 #define IDirectPlayX_DestroyPlayer(p,a) (p)->lpVtbl->DestroyPlayer(p,a)
662 #define IDirectPlayX_EnumGroupPlayers(p,a,b,c,d,e) (p)->lpVtbl->EnumGroupPlayers(p,a,b,c,d,e)
663 #define IDirectPlayX_EnumGroups(p,a,b,c,d) (p)->lpVtbl->EnumGroups(p,a,b,c,d)
664 #define IDirectPlayX_EnumPlayers(p,a,b,c,d) (p)->lpVtbl->EnumPlayers(p,a,b,c,d)
665 #define IDirectPlayX_EnumSessions(p,a,b,c,d,e) (p)->lpVtbl->EnumSessions(p,a,b,c,d,e)
666 #define IDirectPlayX_GetCaps(p,a,b) (p)->lpVtbl->GetCaps(p,a,b)
667 #define IDirectPlayX_GetGroupData(p,a,b,c,d) (p)->lpVtbl->GetGroupData(p,a,b,c,d)
668 #define IDirectPlayX_GetGroupName(p,a,b,c) (p)->lpVtbl->GetGroupName(p,a,b,c)
669 #define IDirectPlayX_GetMessageCount(p,a,b) (p)->lpVtbl->GetMessageCount(p,a,b)
670 #define IDirectPlayX_GetPlayerAddress(p,a,b,c) (p)->lpVtbl->GetPlayerAddress(p,a,b,c)
671 #define IDirectPlayX_GetPlayerCaps(p,a,b,c) (p)->lpVtbl->GetPlayerCaps(p,a,b,c)
672 #define IDirectPlayX_GetPlayerData(p,a,b,c,d) (p)->lpVtbl->GetPlayerData(p,a,b,c,d)
673 #define IDirectPlayX_GetPlayerName(p,a,b,c) (p)->lpVtbl->GetPlayerName(p,a,b,c)
674 #define IDirectPlayX_GetSessionDesc(p,a,b) (p)->lpVtbl->GetSessionDesc(p,a,b)
675 #define IDirectPlayX_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
676 #define IDirectPlayX_Open(p,a,b) (p)->lpVtbl->Open(p,a,b)
677 #define IDirectPlayX_Receive(p,a,b,c,d,e) (p)->lpVtbl->Receive(p,a,b,c,d,e)
678 #define IDirectPlayX_Send(p,a,b,c,d,e) (p)->lpVtbl->Send(p,a,b,c,d,e)
679 #define IDirectPlayX_SetGroupData(p,a,b,c,d) (p)->lpVtbl->SetGroupData(p,a,b,c,d)
680 #define IDirectPlayX_SetGroupName(p,a,b,c) (p)->lpVtbl->SetGroupName(p,a,b,c)
681 #define IDirectPlayX_SetPlayerData(p,a,b,c,d) (p)->lpVtbl->SetPlayerData(p,a,b,c,d)
682 #define IDirectPlayX_SetPlayerName(p,a,b,c) (p)->lpVtbl->SetPlayerName(p,a,b,c)
683 #define IDirectPlayX_SetSessionDesc(p,a,b) (p)->lpVtbl->SetSessionDesc(p,a,b)
684 /*** IDirectPlay3 methods ***/
685 #define IDirectPlayX_AddGroupToGroup(p,a,b) (p)->lpVtbl->AddGroupToGroup(p,a,b)
686 #define IDirectPlayX_CreateGroupInGroup(p,a,b,c,d,e,f) (p)->lpVtbl->CreateGroupInGroup(p,a,b,c,d,e,f)
687 #define IDirectPlayX_DeleteGroupFromGroup(p,a,b) (p)->lpVtbl->DeleteGroupFromGroup(p,a,b)
688 #define IDirectPlayX_EnumConnections(p,a,b,c,d) (p)->lpVtbl->EnumConnections(p,a,b,c,d)
689 #define IDirectPlayX_EnumGroupsInGroup(p,a,b,c,d,e) (p)->lpVtbl->EnumGroupsInGroup(p,a,b,c,d,e)
690 #define IDirectPlayX_GetGroupConnectionSettings(p,a,b,c,d) (p)->lpVtbl->GetGroupConnectionSettings(p,a,b,c,d)
691 #define IDirectPlayX_InitializeConnection(p,a,b) (p)->lpVtbl->InitializeConnection(p,a,b)
692 #define IDirectPlayX_SecureOpen(p,a,b,c,d) (p)->lpVtbl->SecureOpen(p,a,b,c,d)
693 #define IDirectPlayX_SendChatMessage(p,a,b,c,d) (p)->lpVtbl->SendChatMessage(p,a,b,c,d)
694 #define IDirectPlayX_SetGroupConnectionSettings(p,a,b,c) (p)->lpVtbl->SetGroupConnectionSettings(p,a,b,c)
695 #define IDirectPlayX_StartSession(p,a,b) (p)->lpVtbl->StartSession(p,a,b)
696 #define IDirectPlayX_GetGroupFlags(p,a,b) (p)->lpVtbl->GetGroupFlags(p,a,b)
697 #define IDirectPlayX_GetGroupParent(p,a,b) (p)->lpVtbl->GetGroupParent(p,a,b)
698 #define IDirectPlayX_GetPlayerAccount(p,a,b,c,d) (p)->lpVtbl->GetPlayerAccount(p,a,b,c,d)
699 #define IDirectPlayX_GetPlayerFlags(p,a,b) (p)->lpVtbl->GetPlayerFlags(p,a,b)
700 /*** IDirectPlay4 methods ***/
701 #define IDirectPlayX_GetGroupOwner(p,a,b) (p)->lpVtbl->GetGroupOwner(p,a,b)
702 #define IDirectPlayX_SetGroupOwner(p,a,b) (p)->lpVtbl->SetGroupOwner(p,a,b)
703 #define IDirectPlayX_SendEx(p,a,b,c,d,e,f,g,h,i) (a)->lpVtbl->SendEx(a,b,c,d,e,f,g,h,i)
704 #define IDirectPlayX_GetMessageQueue(p,a,b,c,d,e) (a)->lpVtbl->GetMessageQueue(a,b,c,d,e)
705 #define IDirectPlayX_CancelMessage(p,a,b) (a)->lpVtbl->CancelMessage(a,b)
706 #define IDirectPlayX_CancelPriority(p,a,b,c) (a)->lpVtbl->CancelPriority(a,b,c)
710 /* For DirectPlay::EnumConnections */
711 #define DPCONNECTION_DIRECTPLAY 0x00000001
712 #define DPCONNECTION_DIRECTPLAYLOBBY 0x00000002
714 /* For DirectPlay::EnumPlayers and DirectPlay::EnumGroups */
715 #define DPENUMPLAYERS_ALL 0x00000000
716 #define DPENUMPLAYERS_LOCAL 0x00000008
717 #define DPENUMPLAYERS_REMOTE 0x00000010
718 #define DPENUMPLAYERS_GROUP 0x00000020
719 #define DPENUMPLAYERS_SESSION 0x00000080
720 #define DPENUMPLAYERS_SERVERPLAYER 0x00000100
721 #define DPENUMPLAYERS_SPECTATOR 0x00000200
722 #define DPENUMPLAYERS_OWNER 0x00002000
724 #define DPENUMGROUPS_ALL DPENUMPLAYERS_ALL
725 #define DPENUMGROUPS_LOCAL DPENUMPLAYERS_LOCAL
726 #define DPENUMGROUPS_REMOTE DPENUMPLAYERS_REMOTE
727 #define DPENUMGROUPS_SESSION DPENUMPLAYERS_SESSION
728 #define DPENUMGROUPS_SHORTCUT 0x00000400
729 #define DPENUMGROUPS_STAGINGAREA 0x00000800
730 #define DPENUMGROUPS_HIDDEN 0x00001000
733 /* For DirectPlay::CreatePlayer */
734 #define DPPLAYER_SERVERPLAYER DPENUMPLAYERS_SERVERPLAYER
735 #define DPPLAYER_SPECTATOR DPENUMPLAYERS_SPECTATOR
736 #define DPPLAYER_LOCAL DPENUMPLAYERS_LOCAL
737 #define DPPLAYER_OWNER DPENUMPLAYERS_OWNER
739 /* For DirectPlay::CreateGroup */
740 #define DPGROUP_STAGINGAREA DPENUMGROUPS_STAGINGAREA
741 #define DPGROUP_LOCAL DPENUMGROUPS_LOCAL
742 #define DPGROUP_HIDDEN DPENUMGROUPS_HIDDEN
744 /* For DirectPlay::EnumSessions */
745 #define DPENUMSESSIONS_AVAILABLE 0x00000001
746 #define DPENUMSESSIONS_ALL 0x00000002
747 #define DPENUMSESSIONS_ASYNC 0x00000010
748 #define DPENUMSESSIONS_STOPASYNC 0x00000020
749 #define DPENUMSESSIONS_PASSWORDREQUIRED 0x00000040
750 #define DPENUMSESSIONS_RETURNSTATUS 0x00000080
752 /* For DirectPlay::GetCaps and DirectPlay::GetPlayerCaps */
753 #define DPGETCAPS_GUARANTEED 0x00000001
755 /* For DirectPlay::GetGroupData and DirectPlay::GetPlayerData */
756 #define DPGET_REMOTE 0x00000000
757 #define DPGET_LOCAL 0x00000001
759 /* For DirectPlay::Receive */
760 #define DPRECEIVE_ALL 0x00000001
761 #define DPRECEIVE_TOPLAYER 0x00000002
762 #define DPRECEIVE_FROMPLAYER 0x00000004
763 #define DPRECEIVE_PEEK 0x00000008
765 /* For DirectPlay::Send */
766 #define DPSEND_NONGUARANTEED 0x00000000
767 #define DPSEND_GUARANTEED 0x00000001
768 #define DPSEND_HIGHPRIORITY 0x00000002
769 #define DPSEND_OPENSTREAM 0x00000008
770 #define DPSEND_CLOSESTREAM 0x00000010
771 #define DPSEND_SIGNED 0x00000020
772 #define DPSEND_ENCRYPTED 0x00000040
773 #define DPSEND_LOBBYSYSTEMMESSAGE 0x00000080
774 #define DPSEND_ASYNC 0x00000200
775 #define DPSEND_NOSENDCOMPLETEMSG 0x00000400
777 #define DPSEND_MAX_PRI 0x0000FFFF
778 #define DPSEND_MAX_PRIORITY DPSEND_MAX_PRI
781 /* For DirectPlay::SetGroupData, DirectPlay::SetGroupName,
782 * DirectPlay::SetPlayerData, DirectPlay::SetPlayerName and
783 * DirectPlay::SetSessionDesc.
785 #define DPSET_REMOTE 0x00000000
786 #define DPSET_LOCAL 0x00000001
787 #define DPSET_GUARANTEED 0x00000002
789 /* For DirectPlay::GetMessageQueue */
790 #define DPMESSAGEQUEUE_SEND 0x00000001
791 #define DPMESSAGEQUEUE_RECEIVE 0x00000002
793 /* DirectPlay::Connect */
794 #define DPCONNECT_RETURNSTATUS (DPENUMSESSIONS_RETURNSTATUS)
797 /** DirectPlay system messages **/
799 /* A new player or group has been created in the session */
800 #define DPSYS_CREATEPLAYERORGROUP 0x0003
802 /* A player or group has been deleted from the session */
803 #define DPSYS_DESTROYPLAYERORGROUP 0x0005
805 /* A player has been added to a group */
806 #define DPSYS_ADDPLAYERTOGROUP 0x0007
808 /* A player has been deleted from a group */
809 #define DPSYS_DELETEPLAYERFROMGROUP 0x0021
811 /* Session lost for this object - ie lost contact with all players */
812 #define DPSYS_SESSIONLOST 0x0031
814 /* The current host has left the session */
815 #define DPSYS_HOST 0x0101
817 /* Player or group data has changed */
818 #define DPSYS_SETPLAYERORGROUPDATA 0x0102
820 /* The name of a player or group has changed */
821 #define DPSYS_SETPLAYERORGROUPNAME 0x0103
823 /* The session description has changed */
824 #define DPSYS_SETSESSIONDESC 0x0104
826 /* A group has been added to a group */
827 #define DPSYS_ADDGROUPTOGROUP 0x0105
829 /* A group has been deleted from a group */
830 #define DPSYS_DELETEGROUPFROMGROUP 0x0106
832 /* A secure player to player message has arrived */
833 #define DPSYS_SECUREMESSAGE 0x0107
835 /* Start a new session */
836 #define DPSYS_STARTSESSION 0x0108
838 /* A chat message has arrived */
839 #define DPSYS_CHAT 0x0109
841 /* The owner of a group has changed */
842 #define DPSYS_SETGROUPOWNER 0x010A
844 /* An async send is done (finished normally, failed or cancelled) */
845 #define DPSYS_SENDCOMPLETE 0x010d
847 /** DirectPlay System Messages **/
849 #define DPPLAYERTYPE_GROUP 0x00000000
850 #define DPPLAYERTYPE_PLAYER 0x00000001
853 /* NOTE: DPMSG_HOST and DPMSG_GENERIC share the same format */
854 typedef struct tagDPMSG_GENERIC
856 DWORD dwType
; /* Use message type as described above */
857 } DPMSG_GENERIC
, *LPDPMSG_GENERIC
,
858 DPMSG_HOST
, *LPDPMSG_HOST
,
859 DPMSG_SESSIONLOST
, *LPDPMSG_SESSIONLOST
;
861 typedef struct tagDPMSG_CREATEPLAYERORGROUP
863 DWORD dwType
; /* Use message type as described above */
864 DWORD dwPlayerType
; /* Use DPPLAYERTYPE_GROUP or DPPLAYERTYPE_PLAYER */
865 DPID dpId
; /* ID of the player/group */
866 DWORD dwCurrentPlayers
; /* Current number of players/groups in session */
867 LPVOID lpData
; /* Pointer to data */
868 DWORD dwDataSize
; /* Size of data */
869 DPNAME dpnName
; /* Name info */
871 /* dpIdParent and dwFlags are only valid in DirectPlay3 and later. What
872 * does that mean about the message size before? -PH */
873 DPID dpIdParent
; /* id of parent group */
874 DWORD dwFlags
; /* Flags for the player/group */
875 } DPMSG_CREATEPLAYERORGROUP
, *LPDPMSG_CREATEPLAYERORGROUP
;
877 typedef struct tagDPMSG_DESTROYPLAYERORGROUP
879 DWORD dwType
; /* Use message type as described above */
880 DWORD dwPlayerType
; /* Use DPPLAYERTYPE_GROUP or DPPLAYERTYPE_PLAYER */
881 DPID dpId
; /* ID of player/group to be deleted */
882 LPVOID lpLocalData
; /* Pointer to local data */
883 DWORD dwLocalDataSize
; /* Sizeof local data */
884 LPVOID lpRemoteData
; /* Pointer to remote data */
885 DWORD dwRemoteDataSize
; /* Sizeof remote data */
887 /* dpnName, dpIdParent and dwFlags are only valid in DirectPlay3 and later. What
888 * does that mean about the message size before? -PH */
889 DPNAME dpnName
; /* Name info */
890 DPID dpIdParent
; /* id of parent group */
891 DWORD dwFlags
; /* Flags for the player/group */
892 } DPMSG_DESTROYPLAYERORGROUP
, *LPDPMSG_DESTROYPLAYERORGROUP
;
894 /* NOTE: DPMSG_ADDPLAYERTOGROUP and DPMSG_DELETEPLAYERFROMGROUP are the same */
895 typedef struct tagDPMSG_ADDPLAYERTOGROUP
897 DWORD dwType
; /* Use message type as described above */
898 DPID dpIdGroup
; /* Group ID to add player into */
899 DPID dpIdPlayer
; /* ID of player to add */
900 } DPMSG_ADDPLAYERTOGROUP
, *LPDPMSG_ADDPLAYERTOGROUP
,
901 DPMSG_DELETEPLAYERFROMGROUP
, *LPDPMSG_DELETEPLAYERFROMGROUP
;
903 /* NOTE: DPMSG_ADDGROUPTOGROUP and DPMSG_DELETEGROUPFROMGROUP are the same */
904 typedef struct tagDPMSG_ADDGROUPTOGROUP
906 DWORD dwType
; /* Use message type as described above */
907 DPID dpIdParentGroup
; /* Group ID to add group into */
908 DPID dpIdGroup
; /* ID of group to add */
909 } DPMSG_ADDGROUPTOGROUP
, *LPDPMSG_ADDGROUPTOGROUP
,
910 DPMSG_DELETEGROUPFROMGROUP
, *LPDPMSG_DELETEGROUPFROMGROUP
;
912 typedef struct tagDPMSG_SETPLAYERORGROUPDATA
914 DWORD dwType
; /* Use message type as described above */
915 DWORD dwPlayerType
; /* Use DPPLAYERTYPE_GROUP or DPPLAYERTYPE_PLAYER */
916 DPID dpId
; /* ID of player/group */
917 LPVOID lpData
; /* Pointer to data */
918 DWORD dwDataSize
; /* Size of data */
919 } DPMSG_SETPLAYERORGROUPDATA
, *LPDPMSG_SETPLAYERORGROUPDATA
;
921 typedef struct tagDPMSG_SETPLAYERORGROUPNAME
923 DWORD dwType
; /* Use message type as described above */
924 DWORD dwPlayerType
; /* Use DPPLAYERTYPE_GROUP or DPPLAYERTYPE_PLAYER */
925 DPID dpId
; /* ID of player/group */
926 DPNAME dpnName
; /* New name */
927 } DPMSG_SETPLAYERORGROUPNAME
, *LPDPMSG_SETPLAYERORGROUPNAME
;
929 typedef struct tagDPMSG_SETSESSIONDESC
931 DWORD dwType
; /* Use message type as described above */
932 DPSESSIONDESC2 dpDesc
; /* New session desc */
933 } DPMSG_SETSESSIONDESC
, *LPDPMSG_SETSESSIONDESC
;
935 typedef struct tagDPMSG_SECUREMESSAGE
937 DWORD dwType
; /* Use message type as described above */
938 DWORD dwFlags
; /* Signed/Encrypted */
939 DPID dpIdFrom
; /* ID of from player */
940 LPVOID lpData
; /* Message sent */
941 DWORD dwDataSize
; /* Size of message */
942 } DPMSG_SECUREMESSAGE
, *LPDPMSG_SECUREMESSAGE
;
944 typedef struct tagDPMSG_STARTSESSION
946 DWORD dwType
; /* Use message type as described above */
947 LPDPLCONNECTION lpConn
; /* DPLCONNECTION structure */
948 } DPMSG_STARTSESSION
, *LPDPMSG_STARTSESSION
;
950 typedef struct tagDPMSG_CHAT
952 DWORD dwType
; /* Use message type as described above */
953 DWORD dwFlags
; /* Message flags */
954 DPID idFromPlayer
; /* ID of sender */
955 DPID idToPlayer
; /* ID of who msg is for */
956 DPID idToGroup
; /* ID of what group msg is for */
957 LPDPCHAT lpChat
; /* Chat message */
958 } DPMSG_CHAT
, *LPDPMSG_CHAT
;
960 typedef struct tagDPMSG_SETGROUPOWNER
962 DWORD dwType
; /* Use message type as described above */
963 DPID idGroup
; /* Group ID */
964 DPID idNewOwner
; /* ID of player who now owns group */
965 DPID idOldOwner
; /* ID of player who used to own group */
966 } DPMSG_SETGROUPOWNER
, *LPDPMSG_SETGROUPOWNER
;
970 DWORD dwType
; /* Use message type as described above */
971 DPID idFrom
; /* ID from */
972 DPID idTo
; /* ID to */
979 DWORD dwSendTime
; /* When sent ? */
980 } DPMSG_SENDCOMPLETE
, *LPDPMSG_SENDCOMPLETE
;
986 #endif /* defined(__cplusplus) */
988 #endif /* __WINE_DPLAY_H */