Added an unknown VxD error code.
[wine/wine64.git] / include / dplay.h
blob31e11c822b9677aeace744590a8f0cf51e4c3c4d
1 #ifndef __WINE_DPLAY_H
2 #define __WINE_DPLAY_H
4 #include "ole2.h"
5 #include "wine/obj_base.h"
7 #ifdef __cplusplus
8 extern "C" {
9 #endif /* defined(__cplusplus) */
11 #include "pshpack1.h"
13 typedef LPVOID (*LPRGLPVOID)[];
14 typedef LPRGLPVOID PRGPVOID, LPRGPVOID, PRGLPVOID, PAPVOID, LPAPVOID, PALPVOID, LPALPVOID;
16 #define VOL volatile
17 typedef VOID *VOL LPVOIDV;
20 /*****************************************************************************
21 * Predeclare the interfaces
23 DEFINE_GUID(CLSID_DirectPlay,0xd1eb6d20, 0x8923, 0x11d0, 0x9d, 0x97, 0x0, 0xa0, 0xc9, 0xa, 0x43, 0xcb);
25 DEFINE_GUID(IID_IDirectPlay, 0x5454e9a0, 0xdb65, 0x11ce, 0x92, 0x1c, 0x00, 0xaa, 0x00, 0x6c, 0x49, 0x72);
26 typedef struct IDirectPlay IDirectPlay,*LPDIRECTPLAY;
28 DEFINE_GUID(IID_IDirectPlay2, 0x2b74f7c0, 0x9154, 0x11cf, 0xa9, 0xcd, 0x0, 0xaa, 0x0, 0x68, 0x86, 0xe3);
29 typedef struct IDirectPlay2 IDirectPlay2,*LPDIRECTPLAY2;
31 DEFINE_GUID(IID_IDirectPlay2A,0x9d460580, 0xa822, 0x11cf, 0x96, 0xc, 0x0, 0x80, 0xc7, 0x53, 0x4e, 0x82);
32 typedef struct IDirectPlay2 IDirectPlay2A,*LPDIRECTPLAY2A;
34 DEFINE_GUID(IID_IDirectPlay3, 0x133efe40, 0x32dc, 0x11d0, 0x9c, 0xfb, 0x0, 0xa0, 0xc9, 0xa, 0x43, 0xcb);
35 typedef struct IDirectPlay3 IDirectPlay3,*LPDIRECTPLAY3;
37 DEFINE_GUID(IID_IDirectPlay3A,0x133efe41, 0x32dc, 0x11d0, 0x9c, 0xfb, 0x0, 0xa0, 0xc9, 0xa, 0x43, 0xcb);
38 typedef struct IDirectPlay3 IDirectPlay3A,*LPDIRECTPLAY3A;
40 DEFINE_GUID(IID_IDirectPlay4, 0xab1c530, 0x4745, 0x11d1, 0xa7, 0xa1, 0x0, 0x0, 0xf8, 0x3, 0xab, 0xfc);
41 typedef struct IDirectPlay4 IDirectPlay4,*LPDIRECTPLAY4;
43 DEFINE_GUID(IID_IDirectPlay4A,0xab1c531, 0x4745, 0x11d1, 0xa7, 0xa1, 0x0, 0x0, 0xf8, 0x3, 0xab, 0xfc);
44 typedef struct IDirectPlay4 IDirectPlay4A,*LPDIRECTPLAY4A;
48 * GUIDS used by Service Providers shipped with DirectPlay
49 * Use these to identify Service Provider returned by EnumConnections
52 /* GUID for IPX service provider {685BC400-9D2C-11cf-A9CD-00AA006886E3} */
53 DEFINE_GUID(DPSPGUID_IPX, 0x685bc400, 0x9d2c, 0x11cf, 0xa9, 0xcd, 0x0, 0xaa, 0x0, 0x68, 0x86, 0xe3);
55 /* GUID for TCP/IP service provider {36E95EE0-8577-11cf-960C-0080C7534E82} */
56 DEFINE_GUID(DPSPGUID_TCPIP, 0x36E95EE0, 0x8577, 0x11cf, 0x96, 0xc, 0x0, 0x80, 0xc7, 0x53, 0x4e, 0x82);
58 /* GUID for Serial service provider {0F1D6860-88D9-11cf-9C4E-00A0C905425E} */
59 DEFINE_GUID(DPSPGUID_SERIAL, 0xf1d6860, 0x88d9, 0x11cf, 0x9c, 0x4e, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e);
61 /* GUID for Modem service provider {44EAA760-CB68-11cf-9C4E-00A0C905425E} */
62 DEFINE_GUID(DPSPGUID_MODEM, 0x44eaa760, 0xcb68, 0x11cf, 0x9c, 0x4e, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e);
65 /*****************************************************************************
66 * Miscellaneous
69 /* Return Values for Direct Play */
70 #define _FACDP 0x877
71 #define MAKE_DPHRESULT( code ) MAKE_HRESULT( 1, _FACDP, code )
73 #define DP_OK S_OK
74 #define DPERR_ALREADYINITIALIZED MAKE_DPHRESULT( 5 )
75 #define DPERR_ACCESSDENIED MAKE_DPHRESULT( 10 )
76 #define DPERR_ACTIVEPLAYERS MAKE_DPHRESULT( 20 )
77 #define DPERR_BUFFERTOOSMALL MAKE_DPHRESULT( 30 )
78 #define DPERR_CANTADDPLAYER MAKE_DPHRESULT( 40 )
79 #define DPERR_CANTCREATEGROUP MAKE_DPHRESULT( 50 )
80 #define DPERR_CANTCREATEPLAYER MAKE_DPHRESULT( 60 )
81 #define DPERR_CANTCREATESESSION MAKE_DPHRESULT( 70 )
82 #define DPERR_CAPSNOTAVAILABLEYET MAKE_DPHRESULT( 80 )
83 #define DPERR_EXCEPTION MAKE_DPHRESULT( 90 )
84 #define DPERR_GENERIC E_FAIL
85 #define DPERR_INVALIDFLAGS MAKE_DPHRESULT( 120 )
86 #define DPERR_INVALIDOBJECT MAKE_DPHRESULT( 130 )
87 #define DPERR_INVALIDPARAM E_INVALIDARG
88 #define DPERR_INVALIDPARAMS DPERR_INVALIDPARAM
89 #define DPERR_INVALIDPLAYER MAKE_DPHRESULT( 150 )
90 #define DPERR_INVALIDGROUP MAKE_DPHRESULT( 155 )
91 #define DPERR_NOCAPS MAKE_DPHRESULT( 160 )
92 #define DPERR_NOCONNECTION MAKE_DPHRESULT( 170 )
93 #define DPERR_NOMEMORY E_OUTOFMEMORY
94 #define DPERR_OUTOFMEMORY DPERR_NOMEMORY
95 #define DPERR_NOMESSAGES MAKE_DPHRESULT( 190 )
96 #define DPERR_NONAMESERVERFOUND MAKE_DPHRESULT( 200 )
97 #define DPERR_NOPLAYERS MAKE_DPHRESULT( 210 )
98 #define DPERR_NOSESSIONS MAKE_DPHRESULT( 220 )
99 #define DPERR_PENDING E_PENDING
100 #define DPERR_SENDTOOBIG MAKE_DPHRESULT( 230 )
101 #define DPERR_TIMEOUT MAKE_DPHRESULT( 240 )
102 #define DPERR_UNAVAILABLE MAKE_DPHRESULT( 250 )
103 #define DPERR_UNSUPPORTED E_NOTIMPL
104 #define DPERR_BUSY MAKE_DPHRESULT( 270 )
105 #define DPERR_USERCANCEL MAKE_DPHRESULT( 280 )
106 #define DPERR_NOINTERFACE E_NOINTERFACE
107 #define DPERR_CANNOTCREATESERVER MAKE_DPHRESULT( 290 )
108 #define DPERR_PLAYERLOST MAKE_DPHRESULT( 300 )
109 #define DPERR_SESSIONLOST MAKE_DPHRESULT( 310 )
110 #define DPERR_UNINITIALIZED MAKE_DPHRESULT( 320 )
111 #define DPERR_NONEWPLAYERS MAKE_DPHRESULT( 330 )
112 #define DPERR_INVALIDPASSWORD MAKE_DPHRESULT( 340 )
113 #define DPERR_CONNECTING MAKE_DPHRESULT( 350 )
114 #define DPERR_CONNECTIONLOST MAKE_DPHRESULT( 360 )
115 #define DPERR_UNKNOWNMESSAGE MAKE_DPHRESULT( 370 )
116 #define DPERR_CANCELFAILED MAKE_DPHRESULT( 380 )
117 #define DPERR_INVALIDPRIORITY MAKE_DPHRESULT( 390 )
118 #define DPERR_NOTHANDLED MAKE_DPHRESULT( 400 )
119 #define DPERR_CANCELLED MAKE_DPHRESULT( 410 )
120 #define DPERR_ABORTED MAKE_DPHRESULT( 420 )
121 #define DPERR_BUFFERTOOLARGE MAKE_DPHRESULT( 1000 )
122 #define DPERR_CANTCREATEPROCESS MAKE_DPHRESULT( 1010 )
123 #define DPERR_APPNOTSTARTED MAKE_DPHRESULT( 1020 )
124 #define DPERR_INVALIDINTERFACE MAKE_DPHRESULT( 1030 )
125 #define DPERR_NOSERVICEPROVIDER MAKE_DPHRESULT( 1040 )
126 #define DPERR_UNKNOWNAPPLICATION MAKE_DPHRESULT( 1050 )
127 #define DPERR_NOTLOBBIED MAKE_DPHRESULT( 1070 )
128 #define DPERR_SERVICEPROVIDERLOADED MAKE_DPHRESULT( 1080 )
129 #define DPERR_ALREADYREGISTERED MAKE_DPHRESULT( 1090 )
130 #define DPERR_NOTREGISTERED MAKE_DPHRESULT( 1100 )
131 #define DPERR_AUTHENTICATIONFAILED MAKE_DPHRESULT( 2000 )
132 #define DPERR_CANTLOADSSPI MAKE_DPHRESULT( 2010 )
133 #define DPERR_ENCRYPTIONFAILED MAKE_DPHRESULT( 2020 )
134 #define DPERR_SIGNFAILED MAKE_DPHRESULT( 2030 )
135 #define DPERR_CANTLOADSECURITYPACKAGE MAKE_DPHRESULT( 2040 )
136 #define DPERR_ENCRYPTIONNOTSUPPORTED MAKE_DPHRESULT( 2050 )
137 #define DPERR_CANTLOADCAPI MAKE_DPHRESULT( 2060 )
138 #define DPERR_NOTLOGGEDIN MAKE_DPHRESULT( 2070 )
139 #define DPERR_LOGONDENIED MAKE_DPHRESULT( 2080 )
142 /* DPID - DirectPlay player and group ID */
143 typedef DWORD DPID, *LPDPID;
145 /* DPID from whence originate messages - just an ID */
146 #define DPID_SYSMSG 0 /* DPID of system */
147 #define DPID_ALLPLAYERS 0 /* DPID of all players */
148 #define DPID_SERVERPLAYER 1 /* DPID of the server player */
149 #define DPID_UNKNOWN 0xFFFFFFFF /* Player ID is unknown */
151 /* DPCAPS - Used to obtain the capabilities of a DirectPlay object */
152 typedef struct tagDPCAPS
154 DWORD dwSize; /* Size of structure in bytes */
155 DWORD dwFlags;
156 DWORD dwMaxBufferSize;
157 DWORD dwMaxQueueSize; /* Obsolete. */
158 DWORD dwMaxPlayers; /* Maximum players/groups (local + remote) */
159 DWORD dwHundredBaud; /* Bandwidth in 100 bits per second units;
160 * i.e. 24 is 2400, 96 is 9600, etc.
162 DWORD dwLatency; /* Estimated latency; 0 = unknown */
163 DWORD dwMaxLocalPlayers; /* Maximum # of locally created players */
164 DWORD dwHeaderLength; /* Maximum header length in bytes */
165 DWORD dwTimeout; /* Service provider's suggested timeout value
166 * This is how long DirectPlay will wait for
167 * responses to system messages
169 } DPCAPS, *LPDPCAPS;
171 typedef struct tagDPNAME
173 DWORD dwSize;
174 DWORD dwFlags; /* Not used must be 0 */
176 union /*playerShortName */ /* Player's Handle? */
178 LPWSTR lpszShortName;
179 LPSTR lpszShortNameA;
180 } DUMMYUNIONNAME1;
182 union /*playerLongName */ /* Player's formal/real name */
184 LPWSTR lpszLongName;
185 LPSTR lpszLongNameA;
186 } DUMMYUNIONNAME2;
188 } DPNAME, *LPDPNAME;
190 #define DPLONGNAMELEN 52
191 #define DPSHORTNAMELEN 20
192 #define DPSESSIONNAMELEN 32
193 #define DPPASSWORDLEN 16
194 #define DPUSERRESERVED 16
196 typedef struct tagDPSESSIONDESC
198 DWORD dwSize;
199 GUID guidSession;
200 DWORD dwSession;
201 DWORD dwMaxPlayers;
202 DWORD dwCurrentPlayers;
203 DWORD dwFlags;
204 char szSessionName[ DPSESSIONNAMELEN ];
205 char szUserField[ DPUSERRESERVED ];
206 DWORD dwReserved1;
207 char szPassword[ DPPASSWORDLEN ];
208 DWORD dwReserved2;
209 DWORD dwUser1;
210 DWORD dwUser2;
211 DWORD dwUser3;
212 DWORD dwUser4;
213 } DPSESSIONDESC, *LPDPSESSIONDESC;
215 typedef struct tagDPSESSIONDESC2
217 DWORD dwSize;
218 DWORD dwFlags;
219 GUID guidInstance;
220 GUID guidApplication; /* GUID of the DP application, GUID_NULL if
221 * all applications! */
223 DWORD dwMaxPlayers;
224 DWORD dwCurrentPlayers; /* (read only value) */
226 union /* Session name */
228 LPWSTR lpszSessionName;
229 LPSTR lpszSessionNameA;
230 } DUMMYUNIONNAME1;
232 union /* Optional password */
234 LPWSTR lpszPassword;
235 LPSTR lpszPasswordA;
236 } DUMMYUNIONNAME2;
238 DWORD dwReserved1;
239 DWORD dwReserved2;
241 DWORD dwUser1; /* For use by the application */
242 DWORD dwUser2;
243 DWORD dwUser3;
244 DWORD dwUser4;
245 } DPSESSIONDESC2, *LPDPSESSIONDESC2;
246 typedef const DPSESSIONDESC2* LPCDPSESSIONDESC2;
248 #define DPOPEN_JOIN 0x00000001
249 #define DPOPEN_CREATE 0x00000002
250 #define DPOPEN_RETURNSTATUS DPENUMSESSIONS_RETURNSTATUS
252 #define DPSESSION_NEWPLAYERSDISABLED 0x00000001
253 #define DPSESSION_MIGRATEHOST 0x00000004
254 #define DPSESSION_NOMESSAGEID 0x00000008
255 #define DPSESSION_JOINDISABLED 0x00000020
256 #define DPSESSION_KEEPALIVE 0x00000040
257 #define DPSESSION_NODATAMESSAGES 0x00000080
258 #define DPSESSION_SECURESERVER 0x00000100
259 #define DPSESSION_PRIVATE 0x00000200
260 #define DPSESSION_PASSWORDREQUIRED 0x00000400
261 #define DPSESSION_MULTICASTSERVER 0x00000800
262 #define DPSESSION_CLIENTSERVER 0x00001000
264 typedef struct tagDPLCONNECTION
266 DWORD dwSize;
267 DWORD dwFlags;
268 LPDPSESSIONDESC2 lpSessionDesc; /* Ptr to session desc to use for connect */
269 LPDPNAME lpPlayerName; /* Ptr to player name structure */
270 GUID guidSP; /* GUID of Service Provider to use */
271 LPVOID lpAddress; /* Ptr to Address of Service Provider to use */
272 DWORD dwAddressSize; /* Size of address data */
273 } DPLCONNECTION, *LPDPLCONNECTION;
275 /* DPLCONNECTION flags (for dwFlags) */
276 #define DPLCONNECTION_CREATESESSION DPOPEN_CREATE
277 #define DPLCONNECTION_JOINSESSION DPOPEN_JOIN
279 typedef struct tagDPCHAT
281 DWORD dwSize;
282 DWORD dwFlags;
283 union
284 { /* Message string */
285 LPWSTR lpszMessage; /* Unicode */
286 LPSTR lpszMessageA; /* ANSI */
287 } DUMMYUNIONNAME;
288 } DPCHAT, *LPDPCHAT;
290 typedef struct
292 UINT len;
293 PUCHAR pData;
294 } SGBUFFER, *PSGBUFFER, *LPSGBUFFER;
297 typedef struct tagDPSECURITYDESC
299 DWORD dwSize; /* Size of structure */
300 DWORD dwFlags; /* Not used. Must be zero. */
301 union
302 { /* SSPI provider name */
303 LPWSTR lpszSSPIProvider; /* Unicode */
304 LPSTR lpszSSPIProviderA; /* ANSI */
305 } DUMMYUNIONNAME1;
306 union
307 { /* CAPI provider name */
308 LPWSTR lpszCAPIProvider; /* Unicode */
309 LPSTR lpszCAPIProviderA; /* ANSI */
310 } DUMMYUNIONNAME2;
311 DWORD dwCAPIProviderType; /* Crypto Service Provider type */
312 DWORD dwEncryptionAlgorithm; /* Encryption Algorithm type */
313 } DPSECURITYDESC, *LPDPSECURITYDESC;
315 typedef const DPSECURITYDESC *LPCDPSECURITYDESC;
317 typedef struct tagDPCREDENTIALS
319 DWORD dwSize; /* Size of structure */
320 DWORD dwFlags; /* Not used. Must be zero. */
321 union
322 { /* User name of the account */
323 LPWSTR lpszUsername; /* Unicode */
324 LPSTR lpszUsernameA; /* ANSI */
325 } DUMMYUNIONNAME1;
326 union
327 { /* Password of the account */
328 LPWSTR lpszPassword; /* Unicode */
329 LPSTR lpszPasswordA; /* ANSI */
330 } DUMMYUNIONNAME2;
331 union
332 { /* Domain name of the account */
333 LPWSTR lpszDomain; /* Unicode */
334 LPSTR lpszDomainA; /* ANSI */
335 } DUMMYUNIONNAME3;
336 } DPCREDENTIALS, *LPDPCREDENTIALS;
338 typedef const DPCREDENTIALS *LPCDPCREDENTIALS;
342 typedef BOOL CALLBACK (*LPDPENUMDPCALLBACKW)(
343 LPGUID lpguidSP,
344 LPWSTR lpSPName,
345 DWORD dwMajorVersion,
346 DWORD dwMinorVersion,
347 LPVOID lpContext);
349 typedef BOOL CALLBACK (*LPDPENUMDPCALLBACKA)(
350 LPGUID lpguidSP,
351 LPSTR lpSPName, /* ptr to str w/ driver description */
352 DWORD dwMajorVersion, /* Major # of driver spec in lpguidSP */
353 DWORD dwMinorVersion, /* Minor # of driver spec in lpguidSP */
354 LPVOID lpContext); /* User given */
356 #ifndef __LPCGUID_DEFINED__
357 #define __LPCGUID_DEFINED__
358 typedef const GUID *LPCGUID;
359 #endif
361 typedef const DPNAME *LPCDPNAME;
363 typedef BOOL CALLBACK (*LPDPENUMCONNECTIONSCALLBACK)(
364 LPCGUID lpguidSP,
365 LPVOID lpConnection,
366 DWORD dwConnectionSize,
367 LPCDPNAME lpName,
368 DWORD dwFlags,
369 LPVOID lpContext);
371 typedef BOOL CALLBACK (*LPDPENUMSESSIONSCALLBACK)(
372 LPDPSESSIONDESC lpDPSessionDesc,
373 LPVOID lpContext,
374 LPDWORD lpdwTimeOut,
375 DWORD dwFlags);
378 extern HRESULT WINAPI DirectPlayEnumerateA( LPDPENUMDPCALLBACKA, LPVOID );
379 extern HRESULT WINAPI DirectPlayEnumerateW( LPDPENUMDPCALLBACKW, LPVOID );
380 extern HRESULT WINAPI DirectPlayCreate( LPGUID lpGUID, LPDIRECTPLAY2 *lplpDP, IUnknown *pUnk);
382 typedef BOOL CALLBACK (*LPDPENUMPLAYERSCALLBACK)(
383 DPID dpId,
384 LPSTR lpFriendlyName,
385 LPSTR lpFormalName,
386 DWORD dwFlags,
387 LPVOID lpContext );
389 typedef BOOL CALLBACK (*LPDPENUMPLAYERSCALLBACK2)(
390 DPID dpId,
391 DWORD dwPlayerType,
392 LPCDPNAME lpName,
393 DWORD dwFlags,
394 LPVOID lpContext );
396 typedef BOOL CALLBACK (*LPDPENUMSESSIONSCALLBACK2)(
397 LPCDPSESSIONDESC2 lpThisSD,
398 LPDWORD lpdwTimeOut,
399 DWORD dwFlags,
400 LPVOID lpContext );
402 #define DPESC_TIMEDOUT 0x00000001
404 #include "poppack.h"
406 /*****************************************************************************
407 * IDirectPlay interface
409 #define ICOM_INTERFACE IDirectPlay
410 #define IDirectPlay_METHODS \
411 ICOM_METHOD2(HRESULT,AddPlayerToGroup, DPID,idGroup, DPID,idPlayer) \
412 ICOM_METHOD (HRESULT,Close) \
413 ICOM_METHOD4(HRESULT,CreatePlayer, LPDPID,lpidPlayer, LPSTR,lpPlayerName, LPSTR,, LPHANDLE,) \
414 ICOM_METHOD3(HRESULT,CreateGroup, LPDPID,lpidGroup, LPSTR,lpGroupName, LPSTR,) \
415 ICOM_METHOD2(HRESULT,DeletePlayerFromGroup, DPID,idGroup, DPID,idPlayer) \
416 ICOM_METHOD1(HRESULT,DestroyPlayer, DPID,idPlayer) \
417 ICOM_METHOD1(HRESULT,DestroyGroup, DPID,idGroup) \
418 ICOM_METHOD1(HRESULT,EnableNewPlayers, BOOL,) \
419 ICOM_METHOD4(HRESULT,EnumGroupPlayers, DPID,idGroup, LPDPENUMPLAYERSCALLBACK,lpEnumPlayersCallback, LPVOID,lpContext, DWORD,dwFlags) \
420 ICOM_METHOD4(HRESULT,EnumGroups, DWORD,, LPDPENUMPLAYERSCALLBACK,lpEnumPlayersCallback, LPVOID,lpContext, DWORD,dwFlags) \
421 ICOM_METHOD4(HRESULT,EnumPlayers, DWORD,, LPDPENUMPLAYERSCALLBACK,lpEnumPlayersCallback, LPVOID,lpContext, DWORD,dwFlags) \
422 ICOM_METHOD5(HRESULT,EnumSessions, LPDPSESSIONDESC,lpsd, DWORD,dwTimeout, LPDPENUMSESSIONSCALLBACK,lpEnumSessionsCallback, LPVOID,lpContext, DWORD,dwFlags) \
423 ICOM_METHOD1(HRESULT,GetCaps, LPDPCAPS,lpDPCaps) \
424 ICOM_METHOD2(HRESULT,GetMessageCount, DPID,idPlayer, LPDWORD,lpdwCount) \
425 ICOM_METHOD2(HRESULT,GetPlayerCaps, DPID,idPlayer, LPDPCAPS,lpPlayerCaps) \
426 ICOM_METHOD5(HRESULT,GetPlayerName, DPID,idPlayer, LPSTR,, LPDWORD,, LPSTR,, LPDWORD,) \
427 ICOM_METHOD1(HRESULT,Initialize, LPGUID,lpGUID) \
428 ICOM_METHOD1(HRESULT,Open, LPDPSESSIONDESC,lpsd) \
429 ICOM_METHOD5(HRESULT,Receive, LPDPID,lpidFrom, LPDPID,lpidTo, DWORD,dwFlags, LPVOID,lpData, LPDWORD,lpdwDataSize) \
430 ICOM_METHOD1(HRESULT,SaveSession, LPSTR,) \
431 ICOM_METHOD5(HRESULT,Send, DPID,idFrom, DPID,idTo, DWORD,dwFlags, LPVOID,lpData, DWORD,dwDataSize) \
432 ICOM_METHOD3(HRESULT,SetPlayerName, DPID,idPlayer, LPSTR,lpPlayerName, LPSTR,)
433 #define IDirectPlay_IMETHODS \
434 IUnknown_IMETHODS \
435 IDirectPlay_METHODS
436 ICOM_DEFINE(IDirectPlay,IUnknown)
437 #undef ICOM_INTERFACE
439 /*** IUnknown methods ***/
440 #define IDirectPlay_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
441 #define IDirectPlay_AddRef(p) ICOM_CALL (AddRef,p)
442 #define IDirectPlay_Release(p) ICOM_CALL (Release,p)
443 /*** IDirectPlay methods ***/
444 #define IDirectPlay_AddPlayerToGroup(p,a,b) ICOM_CALL2(AddPlayerToGroup,p,a,b)
445 #define IDirectPlay_Close(p) ICOM_CALL (Close,p)
446 #define IDirectPlay_CreatePlayer(p,a,b,c,d) ICOM_CALL4(CreatePlayer,p,a,b,c,d)
447 #define IDirectPlay_CreateGroup(p,a,b,c) ICOM_CALL3(CreateGroup,p,a,b,c)
448 #define IDirectPlay_DeletePlayerFromGroup(p,a,b) ICOM_CALL2(DeletePlayerFromGroup,p,a,b)
449 #define IDirectPlay_DestroyPlayer(p,a) ICOM_CALL1(DestroyPlayer,p,a)
450 #define IDirectPlay_DestroyGroup(p,a) ICOM_CALL1(DestroyGroup,p,a)
451 #define IDirectPlay_EnableNewPlayers(p,a) ICOM_CALL1(EnableNewPlayers,p,a)
452 #define IDirectPlay_EnumGroupPlayers(p,a,b,c,d) ICOM_CALL4(EnumGroupPlayers,p,a,b,c,d)
453 #define IDirectPlay_EnumGroups(p,a,b,c,d) ICOM_CALL4(EnumGroups,p,a,b,c,d)
454 #define IDirectPlay_EnumPlayers(p,a,b,c,d) ICOM_CALL4(EnumPlayers,p,a,b,c,d)
455 #define IDirectPlay_EnumSessions(p,a,b,c,d,e) ICOM_CALL5(EnumSessions,p,a,b,c,d,e)
456 #define IDirectPlay_GetCaps(p,a) ICOM_CALL1(GetCaps,p,a)
457 #define IDirectPlay_GetMessageCount(p,a,b) ICOM_CALL2(GetMessageCount,p,a,b)
458 #define IDirectPlay_GetPlayerCaps(p,a,b) ICOM_CALL2(GetPlayerCaps,p,a,b)
459 #define IDirectPlay_GetPlayerName(p,a,b,c,d,e) ICOM_CALL5(GetPlayerName,p,a,b,c,d,e)
460 #define IDirectPlay_Initialize(p,a) ICOM_CALL1(Initialize,p,a)
461 #define IDirectPlay_Open(p,a) ICOM_CALL1(Open,p,a)
462 #define IDirectPlay_Receive(p,a,b,c,d,e) ICOM_CALL5(Receive,p,a,b,c,d,e)
463 #define IDirectPlay_SaveSession(p,a) ICOM_CALL1(SaveSession,p,a)
464 #define IDirectPlay_Send(p,a,b,c,d,e) ICOM_CALL5(Send,p,a,b,c,d,e)
465 #define IDirectPlay_SetPlayerName(p,a,b,c) ICOM_CALL3(SetPlayerName,p,a,b,c)
468 /*****************************************************************************
469 * IDirectPlay2 and IDirectPlay2A interface
471 #define ICOM_INTERFACE IDirectPlay2
472 #define IDirectPlay2_METHODS \
473 ICOM_METHOD2(HRESULT,AddPlayerToGroup, DPID,idGroup, DPID,idPlayer) \
474 ICOM_METHOD (HRESULT,Close) \
475 ICOM_METHOD5(HRESULT,CreateGroup, LPDPID,lpidGroup, LPDPNAME,lpGroupName, LPVOID,lpData, DWORD,dwDataSize, DWORD,dwFlags) \
476 ICOM_METHOD6(HRESULT,CreatePlayer, LPDPID,lpidPlayer, LPDPNAME,lpPlayerName, HANDLE,hEvent, LPVOID,lpData, DWORD,dwDataSize, DWORD,dwFlags) \
477 ICOM_METHOD2(HRESULT,DeletePlayerFromGroup, DPID,idGroup, DPID,idPlayer) \
478 ICOM_METHOD1(HRESULT,DestroyGroup, DPID,idGroup) \
479 ICOM_METHOD1(HRESULT,DestroyPlayer, DPID,idPlayer) \
480 ICOM_METHOD5(HRESULT,EnumGroupPlayers, DPID,idGroup, LPGUID,lpguidInstance, LPDPENUMPLAYERSCALLBACK2,lpEnumPlayersCallback2, LPVOID,lpContext, DWORD,dwFlags) \
481 ICOM_METHOD4(HRESULT,EnumGroups, LPGUID,lpguidInstance, LPDPENUMPLAYERSCALLBACK2,lpEnumPlayersCallback2, LPVOID,lpContext, DWORD,dwFlags) \
482 ICOM_METHOD4(HRESULT,EnumPlayers, LPGUID,lpguidInstance, LPDPENUMPLAYERSCALLBACK2,lpEnumPlayersCallback2, LPVOID,lpContext, DWORD,dwFlags) \
483 ICOM_METHOD5(HRESULT,EnumSessions, LPDPSESSIONDESC2,lpsd, DWORD,dwTimeout, LPDPENUMSESSIONSCALLBACK2,lpEnumSessionsCallback2, LPVOID,lpContext, DWORD,dwFlags) \
484 ICOM_METHOD2(HRESULT,GetCaps, LPDPCAPS,lpDPCaps, DWORD,dwFlags) \
485 ICOM_METHOD4(HRESULT,GetGroupData, DPID,idGroup, LPVOID,lpData, LPDWORD,lpdwDataSize, DWORD,dwFlags) \
486 ICOM_METHOD3(HRESULT,GetGroupName, DPID,idGroup, LPVOID,lpData, LPDWORD,lpdwDataSize) \
487 ICOM_METHOD2(HRESULT,GetMessageCount, DPID,idPlayer, LPDWORD,lpdwCount) \
488 ICOM_METHOD3(HRESULT,GetPlayerAddress, DPID,idPlayer, LPVOID,lpData, LPDWORD,lpdwDataSize) \
489 ICOM_METHOD3(HRESULT,GetPlayerCaps, DPID,idPlayer, LPDPCAPS,lpPlayerCaps, DWORD,dwFlags) \
490 ICOM_METHOD4(HRESULT,GetPlayerData, DPID,idPlayer, LPVOID,lpData, LPDWORD,lpdwDataSize, DWORD,dwFlags) \
491 ICOM_METHOD3(HRESULT,GetPlayerName, DPID,idPlayer, LPVOID,lpData, LPDWORD,lpdwDataSize) \
492 ICOM_METHOD2(HRESULT,GetSessionDesc, LPVOID,lpData, LPDWORD,lpdwDataSize) \
493 ICOM_METHOD1(HRESULT,Initialize, LPGUID,lpGUID) \
494 ICOM_METHOD2(HRESULT,Open, LPDPSESSIONDESC2,lpsd, DWORD,dwFlags) \
495 ICOM_METHOD5(HRESULT,Receive, LPDPID,lpidFrom, LPDPID,lpidTo, DWORD,dwFlags, LPVOID,lpData, LPDWORD,lpdwDataSize) \
496 ICOM_METHOD5(HRESULT,Send, DPID,idFrom, DPID,idTo, DWORD,dwFlags, LPVOID,lpData, DWORD,dwDataSize) \
497 ICOM_METHOD4(HRESULT,SetGroupData, DPID,idGroup, LPVOID,lpData, DWORD,dwDataSize, DWORD,dwFlags) \
498 ICOM_METHOD3(HRESULT,SetGroupName, DPID,idGroup, LPDPNAME,lpGroupName, DWORD,dwFlags) \
499 ICOM_METHOD4(HRESULT,SetPlayerData, DPID,idPlayer, LPVOID,lpData, DWORD,dwDataSize, DWORD,dwFlags) \
500 ICOM_METHOD3(HRESULT,SetPlayerName, DPID,idPlayer, LPDPNAME,lpPlayerName, DWORD,dwFlags) \
501 ICOM_METHOD2(HRESULT,SetSessionDesc, LPDPSESSIONDESC2,lpSessDesc, DWORD,dwFlags)
502 #define IDirectPlay2_IMETHODS \
503 IUnknown_IMETHODS \
504 IDirectPlay2_METHODS
505 ICOM_DEFINE(IDirectPlay2,IUnknown)
506 #undef ICOM_INTERFACE
508 /*** IUnknown methods ***/
509 #define IDirectPlay2_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
510 #define IDirectPlay2_AddRef(p) ICOM_CALL (AddRef,p)
511 #define IDirectPlay2_Release(p) ICOM_CALL (Release,p)
512 /*** IDirectPlay2 methods ***/
513 #define IDirectPlay2_AddPlayerToGroup(p,a,b) ICOM_CALL2(AddPlayerToGroup,p,a,b)
514 #define IDirectPlay2_Close(p) ICOM_CALL (Close,p)
515 #define IDirectPlay2_CreateGroup(p,a,b,c,d,e) ICOM_CALL5(CreateGroup,p,a,b,c,d,e)
516 #define IDirectPlay2_CreatePlayer(p,a,b,c,d,e,f) ICOM_CALL6(CreatePlayer,p,a,b,c,d,e,f)
517 #define IDirectPlay2_DeletePlayerFromGroup(p,a,b) ICOM_CALL2(DeletePlayerFromGroup,p,a,b)
518 #define IDirectPlay2_DestroyGroup(p,a) ICOM_CALL1(DestroyGroup,p,a)
519 #define IDirectPlay2_DestroyPlayer(p,a) ICOM_CALL1(DestroyPlayer,p,a)
520 #define IDirectPlay2_EnumGroupPlayers(p,a,b,c,d,e) ICOM_CALL5(EnumGroupPlayers,p,a,b,c,d,e)
521 #define IDirectPlay2_EnumGroups(p,a,b,c,d) ICOM_CALL4(EnumGroups,p,a,b,c,d)
522 #define IDirectPlay2_EnumPlayers(p,a,b,c,d) ICOM_CALL4(EnumPlayers,p,a,b,c,d)
523 #define IDirectPlay2_EnumSessions(p,a,b,c,d,e) ICOM_CALL5(EnumSessions,p,a,b,c,d,e)
524 #define IDirectPlay2_GetCaps(p,a,b) ICOM_CALL2(GetCaps,p,a,b)
525 #define IDirectPlay2_GetGroupData(p,a,b,c,d) ICOM_CALL4(GetGroupData,p,a,b,c,d)
526 #define IDirectPlay2_GetGroupName(p,a,b,c) ICOM_CALL3(GetGroupName,p,a,b,c)
527 #define IDirectPlay2_GetMessageCount(p,a,b) ICOM_CALL2(GetMessageCount,p,a,b)
528 #define IDirectPlay2_GetPlayerAddress(p,a,b,c) ICOM_CALL3(GetPlayerAddress,p,a,b,c)
529 #define IDirectPlay2_GetPlayerCaps(p,a,b,c) ICOM_CALL3(GetPlayerCaps,p,a,b,c)
530 #define IDirectPlay2_GetPlayerData(p,a,b,c,d) ICOM_CALL4(GetPlayerData,p,a,b,c,d)
531 #define IDirectPlay2_GetPlayerName(p,a,b,c) ICOM_CALL3(GetPlayerName,p,a,b,c)
532 #define IDirectPlay2_GetSessionDesc(p,a,b) ICOM_CALL2(GetSessionDesc,p,a,b)
533 #define IDirectPlay2_Initialize(p,a) ICOM_CALL1(Initialize,p,a)
534 #define IDirectPlay2_Open(p,a,b) ICOM_CALL2(Open,p,a,b)
535 #define IDirectPlay2_Receive(p,a,b,c,d,e) ICOM_CALL5(Receive,p,a,b,c,d,e)
536 #define IDirectPlay2_Send(p,a,b,c,d,e) ICOM_CALL5(Send,p,a,b,c,d,e)
537 #define IDirectPlay2_SetGroupData(p,a,b,c,d) ICOM_CALL4(SetGroupData,p,a,b,c,d)
538 #define IDirectPlay2_SetGroupName(p,a,b,c) ICOM_CALL3(SetGroupName,p,a,b,c)
539 #define IDirectPlay2_SetPlayerData(p,a,b,c,d) ICOM_CALL4(SetPlayerData,p,a,b,c,d)
540 #define IDirectPlay2_SetPlayerName(p,a,b,c) ICOM_CALL3(SetPlayerName,p,a,b,c)
541 #define IDirectPlay2_SetSessionDesc(p,a,b) ICOM_CALL2(SetSessionDesc,p,a,b)
544 /*****************************************************************************
545 * IDirectPlay3 and IDirectPlay3A interface
547 #define ICOM_INTERFACE IDirectPlay3
548 #define IDirectPlay3_METHODS \
549 ICOM_METHOD2(HRESULT,AddGroupToGroup, DPID,idParentGroup, DPID,idGroup) \
550 ICOM_METHOD6(HRESULT,CreateGroupInGroup, DPID,idParentGroup, LPDPID,lpidGroup, LPDPNAME,lpGroupName, LPVOID,lpData, DWORD,dwDataSize, DWORD,dwFlags) \
551 ICOM_METHOD2(HRESULT,DeleteGroupFromGroup, DPID,idParentGroup, DPID,idGroup) \
552 ICOM_METHOD4(HRESULT,EnumConnections, LPCGUID,lpguidApplication, LPDPENUMCONNECTIONSCALLBACK,lpEnumCallback, LPVOID,lpContext, DWORD,dwFlags) \
553 ICOM_METHOD5(HRESULT,EnumGroupsInGroup, DPID,idGroup, LPGUID,lpguidInstance, LPDPENUMPLAYERSCALLBACK2,lpEnumCallback, LPVOID,lpContext, DWORD,dwFlags) \
554 ICOM_METHOD4(HRESULT,GetGroupConnectionSettings, DWORD,dwFlags, DPID,idGroup, LPVOID,lpData, LPDWORD,lpdwDataSize) \
555 ICOM_METHOD2(HRESULT,InitializeConnection, LPVOID,lpConnection, DWORD,dwFlags) \
556 ICOM_METHOD4(HRESULT,SecureOpen, LPCDPSESSIONDESC2,lpsd, DWORD,dwFlags, LPCDPSECURITYDESC,lpSecurity, LPCDPCREDENTIALS,lpCredentials) \
557 ICOM_METHOD4(HRESULT,SendChatMessage, DPID,idFrom, DPID,idTo, DWORD,dwFlags, LPDPCHAT,lpChatMessage) \
558 ICOM_METHOD3(HRESULT,SetGroupConnectionSettings, DWORD,dwFlags, DPID,idGroup, LPDPLCONNECTION,lpConnection) \
559 ICOM_METHOD2(HRESULT,StartSession, DWORD,dwFlags, DPID,idGroup) \
560 ICOM_METHOD2(HRESULT,GetGroupFlags, DPID,idGroup, LPDWORD,lpdwFlags) \
561 ICOM_METHOD2(HRESULT,GetGroupParent, DPID,idGroup, LPDPID,lpidParent) \
562 ICOM_METHOD4(HRESULT,GetPlayerAccount, DPID,idPlayer, DWORD,dwFlags, LPVOID,lpData, LPDWORD,lpdwDataSize) \
563 ICOM_METHOD2(HRESULT,GetPlayerFlags, DPID,idPlayer, LPDWORD,lpdwFlags)
564 #define IDirectPlay3_IMETHODS \
565 IDirectPlay2_IMETHODS \
566 IDirectPlay3_METHODS
567 ICOM_DEFINE(IDirectPlay3,IDirectPlay2)
568 #undef ICOM_INTERFACE
570 /*** IUnknown methods ***/
571 #define IDirectPlay3_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
572 #define IDirectPlay3_AddRef(p) ICOM_CALL (AddRef,p)
573 #define IDirectPlay3_Release(p) ICOM_CALL (Release,p)
574 /*** IDirectPlay2 methods ***/
575 #define IDirectPlay3_AddPlayerToGroup(p,a,b) ICOM_CALL2(AddPlayerToGroup,p,a,b)
576 #define IDirectPlay3_Close(p) ICOM_CALL (Close,p)
577 #define IDirectPlay3_CreateGroup(p,a,b,c,d,e) ICOM_CALL5(CreateGroup,p,a,b,c,d,e)
578 #define IDirectPlay3_CreatePlayer(p,a,b,c,d,e,f) ICOM_CALL6(CreatePlayer,p,a,b,c,d,e,f)
579 #define IDirectPlay3_DeletePlayerFromGroup(p,a,b) ICOM_CALL2(DeletePlayerFromGroup,p,a,b)
580 #define IDirectPlay3_DestroyGroup(p,a) ICOM_CALL1(DestroyGroup,p,a)
581 #define IDirectPlay3_DestroyPlayer(p,a) ICOM_CALL1(DestroyPlayer,p,a)
582 #define IDirectPlay3_EnumGroupPlayers(p,a,b,c,d,e) ICOM_CALL5(EnumGroupPlayers,p,a,b,c,d,e)
583 #define IDirectPlay3_EnumGroups(p,a,b,c,d) ICOM_CALL4(EnumGroups,p,a,b,c,d)
584 #define IDirectPlay3_EnumPlayers(p,a,b,c,d) ICOM_CALL4(EnumPlayers,p,a,b,c,d)
585 #define IDirectPlay3_EnumSessions(p,a,b,c,d,e) ICOM_CALL5(EnumSessions,p,a,b,c,d,e)
586 #define IDirectPlay3_GetCaps(p,a,b) ICOM_CALL2(GetCaps,p,a,b)
587 #define IDirectPlay3_GetGroupData(p,a,b,c,d) ICOM_CALL4(GetGroupData,p,a,b,c,d)
588 #define IDirectPlay3_GetGroupName(p,a,b,c) ICOM_CALL3(GetGroupName,p,a,b,c)
589 #define IDirectPlay3_GetMessageCount(p,a,b) ICOM_CALL2(GetMessageCount,p,a,b)
590 #define IDirectPlay3_GetPlayerAddress(p,a,b,c) ICOM_CALL3(GetPlayerAddress,p,a,b,c)
591 #define IDirectPlay3_GetPlayerCaps(p,a,b,c) ICOM_CALL3(GetPlayerCaps,p,a,b,c)
592 #define IDirectPlay3_GetPlayerData(p,a,b,c,d) ICOM_CALL4(GetPlayerData,p,a,b,c,d)
593 #define IDirectPlay3_GetPlayerName(p,a,b,c) ICOM_CALL3(GetPlayerName,p,a,b,c)
594 #define IDirectPlay3_GetSessionDesc(p,a,b) ICOM_CALL2(GetSessionDesc,p,a,b)
595 #define IDirectPlay3_Initialize(p,a) ICOM_CALL1(Initialize,p,a)
596 #define IDirectPlay3_Open(p,a,b) ICOM_CALL2(Open,p,a,b)
597 #define IDirectPlay3_Receive(p,a,b,c,d,e) ICOM_CALL5(Receive,p,a,b,c,d,e)
598 #define IDirectPlay3_Send(p,a,b,c,d,e) ICOM_CALL5(Send,p,a,b,c,d,e)
599 #define IDirectPlay3_SetGroupData(p,a,b,c,d) ICOM_CALL4(SetGroupData,p,a,b,c,d)
600 #define IDirectPlay3_SetGroupName(p,a,b,c) ICOM_CALL3(SetGroupName,p,a,b,c)
601 #define IDirectPlay3_SetPlayerData(p,a,b,c,d) ICOM_CALL4(SetPlayerData,p,a,b,c,d)
602 #define IDirectPlay3_SetPlayerName(p,a,b,c) ICOM_CALL3(SetPlayerName,p,a,b,c)
603 #define IDirectPlay3_SetSessionDesc(p,a,b) ICOM_CALL2(SetSessionDesc,p,a,b)
604 /*** IDirectPlay3 methods ***/
605 #define IDirectPlay3_AddGroupToGroup(p,a,b) ICOM_CALL2(AddGroupToGroup,p,a,b)
606 #define IDirectPlay3_CreateGroupInGroup(p,a,b,c,d,e,f) ICOM_CALL6(CreateGroupInGroup,p,a,b,c,d,e,f)
607 #define IDirectPlay3_DeleteGroupFromGroup(p,a,b) ICOM_CALL2(DeleteGroupFromGroup,p,a,b)
608 #define IDirectPlay3_EnumConnections(p,a,b,c,d) ICOM_CALL4(EnumConnections,p,a,b,c,d)
609 #define IDirectPlay3_EnumGroupsInGroup(p,a,b,c,d,e) ICOM_CALL5(EnumGroupsInGroup,p,a,b,c,d,e)
610 #define IDirectPlay3_GetGroupConnectionSettings(p,a,b,c,d) ICOM_CALL4(GetGroupConnectionSettings,p,a,b,c,d)
611 #define IDirectPlay3_InitializeConnection(p,a,b) ICOM_CALL2(InitializeConnection,p,a,b)
612 #define IDirectPlay3_SecureOpen(p,a,b,c,d) ICOM_CALL4(SecureOpen,p,a,b,c,d)
613 #define IDirectPlay3_SendChatMessage(p,a,b,c,d) ICOM_CALL4(SendChatMessage,p,a,b,c,d)
614 #define IDirectPlay3_SetGroupConnectionSettings(p,a,b,c) ICOM_CALL3(SetGroupConnectionSettings,p,a,b,c)
615 #define IDirectPlay3_StartSession(p,a,b) ICOM_CALL2(StartSession,p,a,b)
616 #define IDirectPlay3_GetGroupFlags(p,a,b) ICOM_CALL2(GetGroupFlags,p,a,b)
617 #define IDirectPlay3_GetGroupParent(p,a,b) ICOM_CALL2(GetGroupParent,p,a,b)
618 #define IDirectPlay3_GetPlayerAccount(p,a,b,c,d) ICOM_CALL4(GetPlayerAccount,p,a,b,c,d)
619 #define IDirectPlay3_GetPlayerFlags(p,a,b) ICOM_CALL2(GetPlayerFlags,p,a,b)
621 /*****************************************************************************
622 * IDirectPlay4 and IDirectPlay4A interface
624 #define ICOM_INTERFACE IDirectPlay4
625 #define IDirectPlay4_METHODS \
626 ICOM_METHOD2( HRESULT, GetGroupOwner, DPID,, LPDPID, ) \
627 ICOM_METHOD2( HRESULT, SetGroupOwner, DPID,, DPID, ) \
628 ICOM_METHOD9( HRESULT, SendEx, DPID,, DPID,, DWORD,, LPVOID,, DWORD,, DWORD,, DWORD,, LPVOID,, LPDWORD, ) \
629 ICOM_METHOD5( HRESULT, GetMessageQueue, DPID,, DPID,, DWORD,, LPDWORD,, LPDWORD, ) \
630 ICOM_METHOD2( HRESULT, CancelMessage, DWORD,, DWORD, ) \
631 ICOM_METHOD3( HRESULT, CancelPriority, DWORD,, DWORD,, DWORD, )
633 #define IDirectPlay4_IMETHODS \
634 IDirectPlay3_IMETHODS \
635 IDirectPlay4_METHODS
636 ICOM_DEFINE(IDirectPlay4,IDirectPlay3)
637 #undef ICOM_INTERFACE
639 /*** IUnknown methods ***/
640 #define IDirectPlayX_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
641 #define IDirectPlayX_AddRef(p) ICOM_CALL (AddRef,p)
642 #define IDirectPlayX_Release(p) ICOM_CALL (Release,p)
643 /*** IDirectPlay2 methods ***/
644 #define IDirectPlayX_AddPlayerToGroup(p,a,b) ICOM_CALL2(AddPlayerToGroup,p,a,b)
645 #define IDirectPlayX_Close(p) ICOM_CALL (Close,p)
646 #define IDirectPlayX_CreateGroup(p,a,b,c,d,e) ICOM_CALL5(CreateGroup,p,a,b,c,d,e)
647 #define IDirectPlayX_CreatePlayer(p,a,b,c,d,e,f) ICOM_CALL6(CreatePlayer,p,a,b,c,d,e,f)
648 #define IDirectPlayX_DeletePlayerFromGroup(p,a,b) ICOM_CALL2(DeletePlayerFromGroup,p,a,b)
649 #define IDirectPlayX_DestroyGroup(p,a) ICOM_CALL1(DestroyGroup,p,a)
650 #define IDirectPlayX_DestroyPlayer(p,a) ICOM_CALL1(DestroyPlayer,p,a)
651 #define IDirectPlayX_EnumGroupPlayers(p,a,b,c,d,e) ICOM_CALL5(EnumGroupPlayers,p,a,b,c,d,e)
652 #define IDirectPlayX_EnumGroups(p,a,b,c,d) ICOM_CALL4(EnumGroups,p,a,b,c,d)
653 #define IDirectPlayX_EnumPlayers(p,a,b,c,d) ICOM_CALL4(EnumPlayers,p,a,b,c,d)
654 #define IDirectPlayX_EnumSessions(p,a,b,c,d,e) ICOM_CALL5(EnumSessions,p,a,b,c,d,e)
655 #define IDirectPlayX_GetCaps(p,a,b) ICOM_CALL2(GetCaps,p,a,b)
656 #define IDirectPlayX_GetGroupData(p,a,b,c,d) ICOM_CALL4(GetGroupData,p,a,b,c,d)
657 #define IDirectPlayX_GetGroupName(p,a,b,c) ICOM_CALL3(GetGroupName,p,a,b,c)
658 #define IDirectPlayX_GetMessageCount(p,a,b) ICOM_CALL2(GetMessageCount,p,a,b)
659 #define IDirectPlayX_GetPlayerAddress(p,a,b,c) ICOM_CALL3(GetPlayerAddress,p,a,b,c)
660 #define IDirectPlayX_GetPlayerCaps(p,a,b,c) ICOM_CALL3(GetPlayerCaps,p,a,b,c)
661 #define IDirectPlayX_GetPlayerData(p,a,b,c,d) ICOM_CALL4(GetPlayerData,p,a,b,c,d)
662 #define IDirectPlayX_GetPlayerName(p,a,b,c) ICOM_CALL3(GetPlayerName,p,a,b,c)
663 #define IDirectPlayX_GetSessionDesc(p,a,b) ICOM_CALL2(GetSessionDesc,p,a,b)
664 #define IDirectPlayX_Initialize(p,a) ICOM_CALL1(Initialize,p,a)
665 #define IDirectPlayX_Open(p,a,b) ICOM_CALL2(Open,p,a,b)
666 #define IDirectPlayX_Receive(p,a,b,c,d,e) ICOM_CALL5(Receive,p,a,b,c,d,e)
667 #define IDirectPlayX_Send(p,a,b,c,d,e) ICOM_CALL5(Send,p,a,b,c,d,e)
668 #define IDirectPlayX_SetGroupData(p,a,b,c,d) ICOM_CALL4(SetGroupData,p,a,b,c,d)
669 #define IDirectPlayX_SetGroupName(p,a,b,c) ICOM_CALL3(SetGroupName,p,a,b,c)
670 #define IDirectPlayX_SetPlayerData(p,a,b,c,d) ICOM_CALL4(SetPlayerData,p,a,b,c,d)
671 #define IDirectPlayX_SetPlayerName(p,a,b,c) ICOM_CALL3(SetPlayerName,p,a,b,c)
672 #define IDirectPlayX_SetSessionDesc(p,a,b) ICOM_CALL2(SetSessionDesc,p,a,b)
673 /*** IDirectPlay3 methods ***/
674 #define IDirectPlayX_AddGroupToGroup(p,a,b) ICOM_CALL2(AddGroupToGroup,p,a,b)
675 #define IDirectPlayX_CreateGroupInGroup(p,a,b,c,d,e,f) ICOM_CALL6(CreateGroupInGroup,p,a,b,c,d,e,f)
676 #define IDirectPlayX_DeleteGroupFromGroup(p,a,b) ICOM_CALL2(DeleteGroupFromGroup,p,a,b)
677 #define IDirectPlayX_EnumConnections(p,a,b,c,d) ICOM_CALL4(EnumConnections,p,a,b,c,d)
678 #define IDirectPlayX_EnumGroupsInGroup(p,a,b,c,d,e) ICOM_CALL5(EnumGroupsInGroup,p,a,b,c,d,e)
679 #define IDirectPlayX_GetGroupConnectionSettings(p,a,b,c,d) ICOM_CALL4(GetGroupConnectionSettings,p,a,b,c,d)
680 #define IDirectPlayX_InitializeConnection(p,a,b) ICOM_CALL2(InitializeConnection,p,a,b)
681 #define IDirectPlayX_SecureOpen(p,a,b,c,d) ICOM_CALL4(SecureOpen,p,a,b,c,d)
682 #define IDirectPlayX_SendChatMessage(p,a,b,c,d) ICOM_CALL4(SendChatMessage,p,a,b,c,d)
683 #define IDirectPlayX_SetGroupConnectionSettings(p,a,b,c) ICOM_CALL3(SetGroupConnectionSettings,p,a,b,c)
684 #define IDirectPlayX_StartSession(p,a,b) ICOM_CALL2(StartSession,p,a,b)
685 #define IDirectPlayX_GetGroupFlags(p,a,b) ICOM_CALL2(GetGroupFlags,p,a,b)
686 #define IDirectPlayX_GetGroupParent(p,a,b) ICOM_CALL2(GetGroupParent,p,a,b)
687 #define IDirectPlayX_GetPlayerAccount(p,a,b,c,d) ICOM_CALL4(GetPlayerAccount,p,a,b,c,d)
688 #define IDirectPlayX_GetPlayerFlags(p,a,b) ICOM_CALL2(GetPlayerFlags,p,a,b)
689 /*** IDirectPlay4 methods ***/
690 #define IDirectPlayX_GetGroupOwner(p,a,b) ICOM_CALL2(GetGroupOwner,p,a,b)
691 #define IDirectPlayX_SetGroupOwner(p,a,b) ICOM_CALL2(SetGroupOwner,p,a,b)
692 #define IDirectPlayX_SendEx(p,a,b,c,d,e,f,g,h,i) ICOM_CALL9(SendEx,a,b,c,d,e,f,g,h,i)
693 #define IDirectPlayX_GetMessageQueue(p,a,b,c,d,e) ICOM_CALL5(GetMessageQueue,a,b,c,d,e)
694 #define IDirectPlayX_CancelMessage(p,a,b) ICOM_CALL2(CancelMessage,a,b)
695 #define IDirectPlayX_CancelPriority(p,a,b,c) ICOM_CALL3(CancelPriority,a,b,c)
698 /* For DirectPlay::EnumConnections */
699 #define DPCONNECTION_DIRECTPLAY 0x00000001
700 #define DPCONNECTION_DIRECTPLAYLOBBY 0x00000002
702 /* For DirectPlay::EnumPlayers and DirectPlay::EnumGroups */
703 #define DPENUMPLAYERS_ALL 0x00000000
704 #define DPENUMPLAYERS_LOCAL 0x00000008
705 #define DPENUMPLAYERS_REMOTE 0x00000010
706 #define DPENUMPLAYERS_GROUP 0x00000020
707 #define DPENUMPLAYERS_SESSION 0x00000080
708 #define DPENUMPLAYERS_SERVERPLAYER 0x00000100
709 #define DPENUMPLAYERS_SPECTATOR 0x00000200
710 #define DPENUMPLAYERS_OWNER 0x00002000
712 #define DPENUMGROUPS_ALL DPENUMPLAYERS_ALL
713 #define DPENUMGROUPS_LOCAL DPENUMPLAYERS_LOCAL
714 #define DPENUMGROUPS_REMOTE DPENUMPLAYERS_REMOTE
715 #define DPENUMGROUPS_SESSION DPENUMPLAYERS_SESSION
716 #define DPENUMGROUPS_SHORTCUT 0x00000400
717 #define DPENUMGROUPS_STAGINGAREA 0x00000800
718 #define DPENUMGROUPS_HIDDEN 0x00001000
721 /* For DirectPlay::CreatePlayer */
722 #define DPPLAYER_SERVERPLAYER DPENUMPLAYERS_SERVERPLAYER
723 #define DPPLAYER_SPECTATOR DPENUMPLAYERS_SPECTATOR
724 #define DPPLAYER_LOCAL DPENUMPLAYERS_LOCAL
725 #define DPPLAYER_OWNER DPENUMPLAYERS_OWNER
727 /* For DirectPlay::CreateGroup */
728 #define DPGROUP_STAGINGAREA DPENUMGROUPS_STAGINGAREA
729 #define DPGROUP_LOCAL DPENUMGROUPS_LOCAL
730 #define DPGROUP_HIDDEN DPENUMGROUPS_HIDDEN
732 /* For DirectPlay::EnumSessions */
733 #define DPENUMSESSIONS_AVAILABLE 0x00000001
734 #define DPENUMSESSIONS_ALL 0x00000002
735 #define DPENUMSESSIONS_ASYNC 0x00000010
736 #define DPENUMSESSIONS_STOPASYNC 0x00000020
737 #define DPENUMSESSIONS_PASSWORDREQUIRED 0x00000040
738 #define DPENUMSESSIONS_RETURNSTATUS 0x00000080
740 /* For DirectPlay::GetCaps and DirectPlay::GetPlayerCaps */
741 #define DPGETCAPS_GUARANTEED 0x00000001
743 /* For DirectPlay::GetGroupData and DirectPlay::GetPlayerData */
744 #define DPGET_REMOTE 0x00000000
745 #define DPGET_LOCAL 0x00000001
747 /* For DirectPlay::Receive */
748 #define DPRECEIVE_ALL 0x00000001
749 #define DPRECEIVE_TOPLAYER 0x00000002
750 #define DPRECEIVE_FROMPLAYER 0x00000004
751 #define DPRECEIVE_PEEK 0x00000008
753 /* For DirectPlay::Send */
754 #define DPSEND_NONGUARANTEED 0x00000000
755 #define DPSEND_GUARANTEED 0x00000001
756 #define DPSEND_HIGHPRIORITY 0x00000002
757 #define DPSEND_OPENSTREAM 0x00000008
758 #define DPSEND_CLOSESTREAM 0x00000010
759 #define DPSEND_SIGNED 0x00000020
760 #define DPSEND_ENCRYPTED 0x00000040
761 #define DPSEND_LOBBYSYSTEMMESSAGE 0x00000080
762 #define DPSEND_ASYNC 0x00000200
763 #define DPSEND_NOSENDCOMPLETEMSG 0x00000400
765 #define DPSEND_MAX_PRI 0x0000FFFF
766 #define DPSEND_MAX_PRIORITY DPSEND_MAX_PRI
769 /* For DirectPlay::SetGroupData, DirectPlay::SetGroupName,
770 * DirectPlay::SetPlayerData, DirectPlay::SetPlayerName and
771 * DirectPlay::SetSessionDesc.
773 #define DPSET_REMOTE 0x00000000
774 #define DPSET_LOCAL 0x00000001
775 #define DPSET_GUARANTEED 0x00000002
777 /* For DirectPlay::GetMessageQueue */
778 #define DPMESSAGEQUEUE_SEND 0x00000001
779 #define DPMESSAGEQUEUE_RECEIVE 0x00000002
781 /* DirectPlay::Connect */
782 #define DPCONNECT_RETURNSTATUS (DPENUMSESSIONS_RETURNSTATUS)
785 /** DirectPlay system messages **/
787 /* A new player or group has been created in the session */
788 #define DPSYS_CREATEPLAYERORGROUP 0x0003
790 /* A player or group has been deleted from the session */
791 #define DPSYS_DESTROYPLAYERORGROUP 0x0005
793 /* A player has been added to a group */
794 #define DPSYS_ADDPLAYERTOGROUP 0x0007
796 /* A player has been deleted from a group */
797 #define DPSYS_DELETEPLAYERFROMGROUP 0x0021
799 /* Session lost for this object - ie lost contact with all players */
800 #define DPSYS_SESSIONLOST 0x0031
802 /* The current host has left the session */
803 #define DPSYS_HOST 0x0101
805 /* Player or group data has changed */
806 #define DPSYS_SETPLAYERORGROUPDATA 0x0102
808 /* The name of a player or group has changed */
809 #define DPSYS_SETPLAYERORGROUPNAME 0x0103
811 /* The session description has changed */
812 #define DPSYS_SETSESSIONDESC 0x0104
814 /* A group has been added to a group */
815 #define DPSYS_ADDGROUPTOGROUP 0x0105
817 /* A group has been deleted from a group */
818 #define DPSYS_DELETEGROUPFROMGROUP 0x0106
820 /* A secure player to player message has arrived */
821 #define DPSYS_SECUREMESSAGE 0x0107
823 /* Start a new session */
824 #define DPSYS_STARTSESSION 0x0108
826 /* A chat message has arrived */
827 #define DPSYS_CHAT 0x0109
829 /* The owner of a group has changed */
830 #define DPSYS_SETGROUPOWNER 0x010A
832 /* An async send is done (finished normally, failed or cancelled) */
833 #define DPSYS_SENDCOMPLETE 0x010d
835 /** DirectPlay System Messages **/
837 #define DPPLAYERTYPE_GROUP 0x00000000
838 #define DPPLAYERTYPE_PLAYER 0x00000001
841 /* NOTE: DPMSG_HOST and DPMSG_GENERIC share the same format */
842 typedef struct tagDPMSG_GENERIC
844 DWORD dwType; /* Use message type as described above */
845 } DPMSG_GENERIC, *LPDPMSG_GENERIC,
846 DPMSG_HOST, *LPDPMSG_HOST,
847 DPMSG_SESSIONLOST, *LPDPMSG_SESSIONLOST;
849 typedef struct tagDPMSG_CREATEPLAYERORGROUP
851 DWORD dwType; /* Use message type as described above */
852 DWORD dwPlayerType; /* Use DPPLAYERTYPE_GROUP or DPPLAYERTYPE_PLAYER */
853 DPID dpId; /* ID of the player/group */
854 DWORD dwCurrentPlayers; /* Current number of players/groups in session */
855 LPVOID lpData; /* Pointer to data */
856 DWORD dwDataSize; /* Size of data */
857 DPNAME dpnName; /* Name info */
859 /* dpIdParent and dwFlags are only valid in DirectPlay3 and later. What
860 * does that mean about the message size before? -PH */
861 DPID dpIdParent; /* id of parent group */
862 DWORD dwFlags; /* Flags for the player/group */
863 } DPMSG_CREATEPLAYERORGROUP, *LPDPMSG_CREATEPLAYERORGROUP;
865 typedef struct tagDPMSG_DESTROYPLAYERORGROUP
867 DWORD dwType; /* Use message type as described above */
868 DWORD dwPlayerType; /* Use DPPLAYERTYPE_GROUP or DPPLAYERTYPE_PLAYER */
869 DPID dpId; /* ID of player/group to be deleted */
870 LPVOID lpLocalData; /* Pointer to local data */
871 DWORD dwLocalDataSize; /* Sizeof local data */
872 LPVOID lpRemoteData; /* Pointer to remote data */
873 DWORD dwRemoteDataSize; /* Sizeof remote data */
875 /* dpnName, dpIdParent and dwFlags are only valid in DirectPlay3 and later. What
876 * does that mean about the message size before? -PH */
877 DPNAME dpnName; /* Name info */
878 DPID dpIdParent; /* id of parent group */
879 DWORD dwFlags; /* Flags for the player/group */
880 } DPMSG_DESTROYPLAYERORGROUP, *LPDPMSG_DESTROYPLAYERORGROUP;
882 /* NOTE: DPMSG_ADDPLAYERTOGROUP and DPMSG_DELETEPLAYERFROMGROUP are the same */
883 typedef struct tagDPMSG_ADDPLAYERTOGROUP
885 DWORD dwType; /* Use message type as described above */
886 DPID dpIdGroup; /* Group ID to add player into */
887 DPID dpIdPlayer; /* ID of player to add */
888 } DPMSG_ADDPLAYERTOGROUP, *LPDPMSG_ADDPLAYERTOGROUP,
889 DPMSG_DELETEPLAYERFROMGROUP, *LPDPMSG_DELETEPLAYERFROMGROUP;
891 /* NOTE: DPMSG_ADDGROUPTOGROUP and DPMSG_DELETEGROUPFROMGROUP are the same */
892 typedef struct tagDPMSG_ADDGROUPTOGROUP
894 DWORD dwType; /* Use message type as described above */
895 DPID dpIdParentGroup; /* Group ID to add group into */
896 DPID dpIdGroup; /* ID of group to add */
897 } DPMSG_ADDGROUPTOGROUP, *LPDPMSG_ADDGROUPTOGROUP,
898 DPMSG_DELETEGROUPFROMGROUP, *LPDPMSG_DELETEGROUPFROMGROUP;
900 typedef struct tagDPMSG_SETPLAYERORGROUPDATA
902 DWORD dwType; /* Use message type as described above */
903 DWORD dwPlayerType; /* Use DPPLAYERTYPE_GROUP or DPPLAYERTYPE_PLAYER */
904 DPID dpId; /* ID of player/group */
905 LPVOID lpData; /* Pointer to data */
906 DWORD dwDataSize; /* Size of data */
907 } DPMSG_SETPLAYERORGROUPDATA, *LPDPMSG_SETPLAYERORGROUPDATA;
909 typedef struct tagDPMSG_SETPLAYERORGROUPNAME
911 DWORD dwType; /* Use message type as described above */
912 DWORD dwPlayerType; /* Use DPPLAYERTYPE_GROUP or DPPLAYERTYPE_PLAYER */
913 DPID dpId; /* ID of player/group */
914 DPNAME dpnName; /* New name */
915 } DPMSG_SETPLAYERORGROUPNAME, *LPDPMSG_SETPLAYERORGROUPNAME;
917 typedef struct tagDPMSG_SETSESSIONDESC
919 DWORD dwType; /* Use message type as described above */
920 DPSESSIONDESC2 dpDesc; /* New session desc */
921 } DPMSG_SETSESSIONDESC, *LPDPMSG_SETSESSIONDESC;
923 typedef struct tagDPMSG_SECUREMESSAGE
925 DWORD dwType; /* Use message type as described above */
926 DWORD dwFlags; /* Signed/Encrypted */
927 DPID dpIdFrom; /* ID of from player */
928 LPVOID lpData; /* Message sent */
929 DWORD dwDataSize; /* Size of message */
930 } DPMSG_SECUREMESSAGE, *LPDPMSG_SECUREMESSAGE;
932 typedef struct tagDPMSG_STARTSESSION
934 DWORD dwType; /* Use message type as described above */
935 LPDPLCONNECTION lpConn; /* DPLCONNECTION structure */
936 } DPMSG_STARTSESSION, *LPDPMSG_STARTSESSION;
938 typedef struct tagDPMSG_CHAT
940 DWORD dwType; /* Use message type as described above */
941 DWORD dwFlags; /* Message flags */
942 DPID idFromPlayer; /* ID of sender */
943 DPID idToPlayer; /* ID of who msg is for */
944 DPID idToGroup; /* ID of what group msg is for */
945 LPDPCHAT lpChat; /* Chat message */
946 } DPMSG_CHAT, *LPDPMSG_CHAT;
948 typedef struct tagDPMSG_SETGROUPOWNER
950 DWORD dwType; /* Use message type as described above */
951 DPID idGroup; /* Group ID */
952 DPID idNewOwner; /* ID of player who now owns group */
953 DPID idOldOwner; /* ID of player who used to own group */
954 } DPMSG_SETGROUPOWNER, *LPDPMSG_SETGROUPOWNER;
956 typedef struct
958 DWORD dwType; /* Use message type as described above */
959 DPID idFrom; /* ID from */
960 DPID idTo; /* ID to */
961 DWORD dwFlags;
962 DWORD dwPriority;
963 DWORD dwTimeout;
964 LPVOID lpvContext;
965 DWORD dwMsgID;
966 HRESULT hr;
967 DWORD dwSendTime; /* When sent ? */
968 } DPMSG_SENDCOMPLETE, *LPDPMSG_SENDCOMPLETE;
972 #ifdef __cplusplus
973 } /* extern "C" */
974 #endif /* defined(__cplusplus) */
976 #endif /* __WINE_DPLAY_H */