1 #undef INTERFACE
2 /*
3 * Copyright (C) the Wine project
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
18 */
19
20 #ifndef __WINE_DPLAY_H
21 #define __WINE_DPLAY_H
22
23 #include <ole2.h>
24
25 #ifdef __cplusplus
26 extern "C" {
27 #endif /* defined(__cplusplus) */
28
29 typedef LPVOID (*LPRGLPVOID)[];
30 typedef LPRGLPVOID PRGPVOID, LPRGPVOID, PRGLPVOID, PAPVOID, LPAPVOID, PALPVOID, LPALPVOID;
31
32 #define VOL volatile
33 typedef VOID * volatile LPVOIDV;
34
35
36 /*****************************************************************************
37 * Predeclare the interfaces
38 */
39 DEFINE_GUID(CLSID_DirectPlay,0xd1eb6d20, 0x8923, 0x11d0, 0x9d, 0x97, 0x0, 0xa0, 0xc9, 0xa, 0x43, 0xcb);
40
41 DEFINE_GUID(IID_IDirectPlay, 0x5454e9a0, 0xdb65, 0x11ce, 0x92, 0x1c, 0x00, 0xaa, 0x00, 0x6c, 0x49, 0x72);
42 typedef struct IDirectPlay *LPDIRECTPLAY;
43
44 DEFINE_GUID(IID_IDirectPlay2, 0x2b74f7c0, 0x9154, 0x11cf, 0xa9, 0xcd, 0x0, 0xaa, 0x0, 0x68, 0x86, 0xe3);
45 typedef struct IDirectPlay2 *LPDIRECTPLAY2;
46
47 DEFINE_GUID(IID_IDirectPlay2A,0x9d460580, 0xa822, 0x11cf, 0x96, 0xc, 0x0, 0x80, 0xc7, 0x53, 0x4e, 0x82);
48 typedef struct IDirectPlay2 IDirectPlay2A,*LPDIRECTPLAY2A;
49
50 DEFINE_GUID(IID_IDirectPlay3, 0x133efe40, 0x32dc, 0x11d0, 0x9c, 0xfb, 0x0, 0xa0, 0xc9, 0xa, 0x43, 0xcb);
51 typedef struct IDirectPlay3 *LPDIRECTPLAY3;
52
53 DEFINE_GUID(IID_IDirectPlay3A,0x133efe41, 0x32dc, 0x11d0, 0x9c, 0xfb, 0x0, 0xa0, 0xc9, 0xa, 0x43, 0xcb);
54 typedef struct IDirectPlay3 IDirectPlay3A,*LPDIRECTPLAY3A;
55
56 DEFINE_GUID(IID_IDirectPlay4, 0xab1c530, 0x4745, 0x11d1, 0xa7, 0xa1, 0x0, 0x0, 0xf8, 0x3, 0xab, 0xfc);
57 typedef struct IDirectPlay4 *LPDIRECTPLAY4;
58
59 DEFINE_GUID(IID_IDirectPlay4A,0xab1c531, 0x4745, 0x11d1, 0xa7, 0xa1, 0x0, 0x0, 0xf8, 0x3, 0xab, 0xfc);
60 typedef struct IDirectPlay4 IDirectPlay4A,*LPDIRECTPLAY4A;
61
62
63 /*
64 * GUIDS used by Service Providers shipped with DirectPlay
65 * Use these to identify Service Provider returned by EnumConnections
66 */
67
68 /* GUID for IPX service provider {685BC400-9D2C-11cf-A9CD-00AA006886E3} */
69 DEFINE_GUID(DPSPGUID_IPX, 0x685bc400, 0x9d2c, 0x11cf, 0xa9, 0xcd, 0x0, 0xaa, 0x0, 0x68, 0x86, 0xe3);
70
71 /* GUID for TCP/IP service provider {36E95EE0-8577-11cf-960C-0080C7534E82} */
72 DEFINE_GUID(DPSPGUID_TCPIP, 0x36E95EE0, 0x8577, 0x11cf, 0x96, 0xc, 0x0, 0x80, 0xc7, 0x53, 0x4e, 0x82);
73
74 /* GUID for Serial service provider {0F1D6860-88D9-11cf-9C4E-00A0C905425E} */
75 DEFINE_GUID(DPSPGUID_SERIAL, 0xf1d6860, 0x88d9, 0x11cf, 0x9c, 0x4e, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e);
76
77 /* GUID for Modem service provider {44EAA760-CB68-11cf-9C4E-00A0C905425E} */
78 DEFINE_GUID(DPSPGUID_MODEM, 0x44eaa760, 0xcb68, 0x11cf, 0x9c, 0x4e, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e);
79
80
81 /*****************************************************************************
82 * Miscellaneous
83 */
84
85 /* Return Values for Direct Play */
86 #define _FACDP 0x877
87 #define MAKE_DPHRESULT( code ) MAKE_HRESULT( 1, _FACDP, code )
88
89 #define DP_OK S_OK
90 #define DPERR_ALREADYINITIALIZED MAKE_DPHRESULT( 5 )
91 #define DPERR_ACCESSDENIED MAKE_DPHRESULT( 10 )
92 #define DPERR_ACTIVEPLAYERS MAKE_DPHRESULT( 20 )
93 #define DPERR_BUFFERTOOSMALL MAKE_DPHRESULT( 30 )
94 #define DPERR_CANTADDPLAYER MAKE_DPHRESULT( 40 )
95 #define DPERR_CANTCREATEGROUP MAKE_DPHRESULT( 50 )
96 #define DPERR_CANTCREATEPLAYER MAKE_DPHRESULT( 60 )
97 #define DPERR_CANTCREATESESSION MAKE_DPHRESULT( 70 )
98 #define DPERR_CAPSNOTAVAILABLEYET MAKE_DPHRESULT( 80 )
99 #define DPERR_EXCEPTION MAKE_DPHRESULT( 90 )
100 #define DPERR_GENERIC E_FAIL
101 #define DPERR_INVALIDFLAGS MAKE_DPHRESULT( 120 )
102 #define DPERR_INVALIDOBJECT MAKE_DPHRESULT( 130 )
103 #define DPERR_INVALIDPARAM E_INVALIDARG
104 #define DPERR_INVALIDPARAMS DPERR_INVALIDPARAM
105 #define DPERR_INVALIDPLAYER MAKE_DPHRESULT( 150 )
106 #define DPERR_INVALIDGROUP MAKE_DPHRESULT( 155 )
107 #define DPERR_NOCAPS MAKE_DPHRESULT( 160 )
108 #define DPERR_NOCONNECTION MAKE_DPHRESULT( 170 )
109 #define DPERR_NOMEMORY E_OUTOFMEMORY
110 #define DPERR_OUTOFMEMORY DPERR_NOMEMORY
111 #define DPERR_NOMESSAGES MAKE_DPHRESULT( 190 )
112 #define DPERR_NONAMESERVERFOUND MAKE_DPHRESULT( 200 )
113 #define DPERR_NOPLAYERS MAKE_DPHRESULT( 210 )
114 #define DPERR_NOSESSIONS MAKE_DPHRESULT( 220 )
115 #define DPERR_PENDING E_PENDING
116 #define DPERR_SENDTOOBIG MAKE_DPHRESULT( 230 )
117 #define DPERR_TIMEOUT MAKE_DPHRESULT( 240 )
118 #define DPERR_UNAVAILABLE MAKE_DPHRESULT( 250 )
119 #define DPERR_UNSUPPORTED E_NOTIMPL
120 #define DPERR_BUSY MAKE_DPHRESULT( 270 )
121 #define DPERR_USERCANCEL MAKE_DPHRESULT( 280 )
122 #define DPERR_NOINTERFACE E_NOINTERFACE
123 #define DPERR_CANNOTCREATESERVER MAKE_DPHRESULT( 290 )
124 #define DPERR_PLAYERLOST MAKE_DPHRESULT( 300 )
125 #define DPERR_SESSIONLOST MAKE_DPHRESULT( 310 )
126 #define DPERR_UNINITIALIZED MAKE_DPHRESULT( 320 )
127 #define DPERR_NONEWPLAYERS MAKE_DPHRESULT( 330 )
128 #define DPERR_INVALIDPASSWORD MAKE_DPHRESULT( 340 )
129 #define DPERR_CONNECTING MAKE_DPHRESULT( 350 )
130 #define DPERR_CONNECTIONLOST MAKE_DPHRESULT( 360 )
131 #define DPERR_UNKNOWNMESSAGE MAKE_DPHRESULT( 370 )
132 #define DPERR_CANCELFAILED MAKE_DPHRESULT( 380 )
133 #define DPERR_INVALIDPRIORITY MAKE_DPHRESULT( 390 )
134 #define DPERR_NOTHANDLED MAKE_DPHRESULT( 400 )
135 #define DPERR_CANCELLED MAKE_DPHRESULT( 410 )
136 #define DPERR_ABORTED MAKE_DPHRESULT( 420 )
137 #define DPERR_BUFFERTOOLARGE MAKE_DPHRESULT( 1000 )
138 #define DPERR_CANTCREATEPROCESS MAKE_DPHRESULT( 1010 )
139 #define DPERR_APPNOTSTARTED MAKE_DPHRESULT( 1020 )
140 #define DPERR_INVALIDINTERFACE MAKE_DPHRESULT( 1030 )
141 #define DPERR_NOSERVICEPROVIDER MAKE_DPHRESULT( 1040 )
142 #define DPERR_UNKNOWNAPPLICATION MAKE_DPHRESULT( 1050 )
143 #define DPERR_NOTLOBBIED MAKE_DPHRESULT( 1070 )
144 #define DPERR_SERVICEPROVIDERLOADED MAKE_DPHRESULT( 1080 )
145 #define DPERR_ALREADYREGISTERED MAKE_DPHRESULT( 1090 )
146 #define DPERR_NOTREGISTERED MAKE_DPHRESULT( 1100 )
147 #define DPERR_AUTHENTICATIONFAILED MAKE_DPHRESULT( 2000 )
148 #define DPERR_CANTLOADSSPI MAKE_DPHRESULT( 2010 )
149 #define DPERR_ENCRYPTIONFAILED MAKE_DPHRESULT( 2020 )
150 #define DPERR_SIGNFAILED MAKE_DPHRESULT( 2030 )
151 #define DPERR_CANTLOADSECURITYPACKAGE MAKE_DPHRESULT( 2040 )
152 #define DPERR_ENCRYPTIONNOTSUPPORTED MAKE_DPHRESULT( 2050 )
153 #define DPERR_CANTLOADCAPI MAKE_DPHRESULT( 2060 )
154 #define DPERR_NOTLOGGEDIN MAKE_DPHRESULT( 2070 )
155 #define DPERR_LOGONDENIED MAKE_DPHRESULT( 2080 )
156
157
158 /* DPID - DirectPlay player and group ID */
159 typedef DWORD DPID, *LPDPID;
160
161 /* DPID from whence originate messages - just an ID */
162 #define DPID_SYSMSG 0 /* DPID of system */
163 #define DPID_ALLPLAYERS 0 /* DPID of all players */
164 #define DPID_SERVERPLAYER 1 /* DPID of the server player */
165 #define DPID_UNKNOWN 0xFFFFFFFF /* Player ID is unknown */
166
167 /* DPCAPS - Used to obtain the capabilities of a DirectPlay object */
168 typedef struct tagDPCAPS
169 {
170 DWORD dwSize; /* Size of structure in bytes */
171 DWORD dwFlags;
172 DWORD dwMaxBufferSize;
173 DWORD dwMaxQueueSize; /* Obsolete. */
174 DWORD dwMaxPlayers; /* Maximum players/groups (local + remote) */
175 DWORD dwHundredBaud; /* Bandwidth in 100 bits per second units;
176 * i.e. 24 is 2400, 96 is 9600, etc.
177 */
178 DWORD dwLatency; /* Estimated latency; 0 = unknown */
179 DWORD dwMaxLocalPlayers; /* Maximum # of locally created players */
180 DWORD dwHeaderLength; /* Maximum header length in bytes */
181 DWORD dwTimeout; /* Service provider's suggested timeout value
182 * This is how long DirectPlay will wait for
183 * responses to system messages
184 */
185 } DPCAPS, *LPDPCAPS;
186
187 typedef struct tagDPNAME
188 {
189 DWORD dwSize;
190 DWORD dwFlags; /* Not used must be 0 */
191
192 union /*playerShortName */ /* Player's Handle? */
193 {
194 LPWSTR lpszShortName;
195 LPSTR lpszShortNameA;
196 } DUMMYUNIONNAME1;
197
198 union /*playerLongName */ /* Player's formal/real name */
199 {
200 LPWSTR lpszLongName;
201 LPSTR lpszLongNameA;
202 } DUMMYUNIONNAME2;
203
204 } DPNAME, *LPDPNAME;
205
206 #define DPLONGNAMELEN 52
207 #define DPSHORTNAMELEN 20
208 #define DPSESSIONNAMELEN 32
209 #define DPPASSWORDLEN 16
210 #define DPUSERRESERVED 16
211
212 typedef struct tagDPSESSIONDESC
213 {
214 DWORD dwSize;
215 GUID guidSession;
216 DWORD dwSession;
217 DWORD dwMaxPlayers;
218 DWORD dwCurrentPlayers;
219 DWORD dwFlags;
220 char szSessionName[ DPSESSIONNAMELEN ];
221 char szUserField[ DPUSERRESERVED ];
222 DWORD dwReserved1;
223 char szPassword[ DPPASSWORDLEN ];
224 DWORD dwReserved2;
225 DWORD dwUser1;
226 DWORD dwUser2;
227 DWORD dwUser3;
228 DWORD dwUser4;
229 } DPSESSIONDESC, *LPDPSESSIONDESC;
230
231 typedef struct tagDPSESSIONDESC2
232 {
233 DWORD dwSize;
234 DWORD dwFlags;
235 GUID guidInstance;
236 GUID guidApplication; /* GUID of the DP application, GUID_NULL if
237 * all applications! */
238
239 DWORD dwMaxPlayers;
240 DWORD dwCurrentPlayers; /* (read only value) */
241
242 union /* Session name */
243 {
244 LPWSTR lpszSessionName;
245 LPSTR lpszSessionNameA;
246 } DUMMYUNIONNAME1;
247
248 union /* Optional password */
249 {
250 LPWSTR lpszPassword;
251 LPSTR lpszPasswordA;
252 } DUMMYUNIONNAME2;
253
254 DWORD dwReserved1;
255 DWORD dwReserved2;
256
257 DWORD dwUser1; /* For use by the application */
258 DWORD dwUser2;
259 DWORD dwUser3;
260 DWORD dwUser4;
261 } DPSESSIONDESC2, *LPDPSESSIONDESC2;
262 typedef const DPSESSIONDESC2* LPCDPSESSIONDESC2;
263
264 #define DPOPEN_JOIN 0x00000001
265 #define DPOPEN_CREATE 0x00000002
266 #define DPOPEN_RETURNSTATUS DPENUMSESSIONS_RETURNSTATUS
267
268 #define DPSESSION_NEWPLAYERSDISABLED 0x00000001
269 #define DPSESSION_MIGRATEHOST 0x00000004
270 #define DPSESSION_NOMESSAGEID 0x00000008
271 #define DPSESSION_JOINDISABLED 0x00000020
272 #define DPSESSION_KEEPALIVE 0x00000040
273 #define DPSESSION_NODATAMESSAGES 0x00000080
274 #define DPSESSION_SECURESERVER 0x00000100
275 #define DPSESSION_PRIVATE 0x00000200
276 #define DPSESSION_PASSWORDREQUIRED 0x00000400
277 #define DPSESSION_MULTICASTSERVER 0x00000800
278 #define DPSESSION_CLIENTSERVER 0x00001000
279 #define DPSESSION_DIRECTPLAYPROTOCOL 0x00002000
280 #define DPSESSION_NOPRESERVEORDER 0x00004000
281 #define DPSESSION_OPTIMIZELATENCY 0x00008000
282
283 typedef struct tagDPLCONNECTION
284 {
285 DWORD dwSize;
286 DWORD dwFlags;
287 LPDPSESSIONDESC2 lpSessionDesc; /* Ptr to session desc to use for connect */
288 LPDPNAME lpPlayerName; /* Ptr to player name structure */
289 GUID guidSP; /* GUID of Service Provider to use */
290 LPVOID lpAddress; /* Ptr to Address of Service Provider to use */
291 DWORD dwAddressSize; /* Size of address data */
292 } DPLCONNECTION, *LPDPLCONNECTION;
293
294 /* DPLCONNECTION flags (for dwFlags) */
295 #define DPLCONNECTION_CREATESESSION DPOPEN_CREATE
296 #define DPLCONNECTION_JOINSESSION DPOPEN_JOIN
297
298 typedef struct tagDPCHAT
299 {
300 DWORD dwSize;
301 DWORD dwFlags;
302 union
303 { /* Message string */
304 LPWSTR lpszMessage; /* Unicode */
305 LPSTR lpszMessageA; /* ANSI */
306 } DUMMYUNIONNAME;
307 } DPCHAT, *LPDPCHAT;
308
309 typedef struct
310 {
311 UINT len;
312 PUCHAR pData;
313 } SGBUFFER, *PSGBUFFER, *LPSGBUFFER;
314
315
316 typedef struct tagDPSECURITYDESC
317 {
318 DWORD dwSize; /* Size of structure */
319 DWORD dwFlags; /* Not used. Must be zero. */
320 union
321 { /* SSPI provider name */
322 LPWSTR lpszSSPIProvider; /* Unicode */
323 LPSTR lpszSSPIProviderA; /* ANSI */
324 } DUMMYUNIONNAME1;
325 union
326 { /* CAPI provider name */
327 LPWSTR lpszCAPIProvider; /* Unicode */
328 LPSTR lpszCAPIProviderA; /* ANSI */
329 } DUMMYUNIONNAME2;
330 DWORD dwCAPIProviderType; /* Crypto Service Provider type */
331 DWORD dwEncryptionAlgorithm; /* Encryption Algorithm type */
332 } DPSECURITYDESC, *LPDPSECURITYDESC;
333
334 typedef const DPSECURITYDESC *LPCDPSECURITYDESC;
335
336 typedef struct tagDPCREDENTIALS
337 {
338 DWORD dwSize; /* Size of structure */
339 DWORD dwFlags; /* Not used. Must be zero. */
340 union
341 { /* User name of the account */
342 LPWSTR lpszUsername; /* Unicode */
343 LPSTR lpszUsernameA; /* ANSI */
344 } DUMMYUNIONNAME1;
345 union
346 { /* Password of the account */
347 LPWSTR lpszPassword; /* Unicode */
348 LPSTR lpszPasswordA; /* ANSI */
349 } DUMMYUNIONNAME2;
350 union
351 { /* Domain name of the account */
352 LPWSTR lpszDomain; /* Unicode */
353 LPSTR lpszDomainA; /* ANSI */
354 } DUMMYUNIONNAME3;
355 } DPCREDENTIALS, *LPDPCREDENTIALS;
356
357 typedef const DPCREDENTIALS *LPCDPCREDENTIALS;
358
359
360
361 typedef WINBOOL (CALLBACK *LPDPENUMDPCALLBACKW)(
362 LPGUID lpguidSP,
363 LPWSTR lpSPName,
364 DWORD dwMajorVersion,
365 DWORD dwMinorVersion,
366 LPVOID lpContext);
367
368 typedef WINBOOL (CALLBACK *LPDPENUMDPCALLBACKA)(
369 LPGUID lpguidSP,
370 LPSTR lpSPName, /* ptr to str w/ driver description */
371 DWORD dwMajorVersion, /* Major # of driver spec in lpguidSP */
372 DWORD dwMinorVersion, /* Minor # of driver spec in lpguidSP */
373 LPVOID lpContext); /* User given */
374
375 #ifndef __LPCGUID_DEFINED__
376 #define __LPCGUID_DEFINED__
377 typedef const GUID *LPCGUID;
378 #endif
379
380 typedef const DPNAME *LPCDPNAME;
381
382 typedef WINBOOL (CALLBACK *LPDPENUMCONNECTIONSCALLBACK)(
383 LPCGUID lpguidSP,
384 LPVOID lpConnection,
385 DWORD dwConnectionSize,
386 LPCDPNAME lpName,
387 DWORD dwFlags,
388 LPVOID lpContext);
389
390 typedef WINBOOL (CALLBACK *LPDPENUMSESSIONSCALLBACK)(
391 LPDPSESSIONDESC lpDPSessionDesc,
392 LPVOID lpContext,
393 LPDWORD lpdwTimeOut,
394 DWORD dwFlags);
395
396
397 extern HRESULT WINAPI DirectPlayEnumerateA( LPDPENUMDPCALLBACKA, LPVOID );
398 extern HRESULT WINAPI DirectPlayEnumerateW( LPDPENUMDPCALLBACKW, LPVOID );
399 extern HRESULT WINAPI DirectPlayCreate( LPGUID lpGUID, LPDIRECTPLAY *lplpDP, IUnknown *pUnk );
400
401 typedef WINBOOL (CALLBACK *LPDPENUMPLAYERSCALLBACK)(
402 DPID dpId,
403 LPSTR lpFriendlyName,
404 LPSTR lpFormalName,
405 DWORD dwFlags,
406 LPVOID lpContext );
407
408 typedef WINBOOL (CALLBACK *LPDPENUMPLAYERSCALLBACK2)(
409 DPID dpId,
410 DWORD dwPlayerType,
411 LPCDPNAME lpName,
412 DWORD dwFlags,
413 LPVOID lpContext );
414
415 typedef WINBOOL (CALLBACK *LPDPENUMSESSIONSCALLBACK2)(
416 LPCDPSESSIONDESC2 lpThisSD,
417 LPDWORD lpdwTimeOut,
418 DWORD dwFlags,
419 LPVOID lpContext );
420
421 #define DPESC_TIMEDOUT 0x00000001
422
423 /*****************************************************************************
424 * IDirectPlay interface
425 */
426 #define INTERFACE IDirectPlay
DECLARE_INTERFACE_(IDirectPlay,IUnknown)427 DECLARE_INTERFACE_(IDirectPlay,IUnknown)
428 {
429 /*** IUnknown methods ***/
430 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
431 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
432 STDMETHOD_(ULONG,Release)(THIS) PURE;
433 /*** IDirectPlay methods ***/
434 STDMETHOD(AddPlayerToGroup)(THIS_ DPID idGroup, DPID idPlayer) PURE;
435 STDMETHOD(Close)(THIS) PURE;
436 STDMETHOD(CreatePlayer)(THIS_ LPDPID lpidPlayer, LPSTR lpPlayerName, LPSTR, LPHANDLE) PURE;
437 STDMETHOD(CreateGroup)(THIS_ LPDPID lpidGroup, LPSTR lpGroupName, LPSTR) PURE;
438 STDMETHOD(DeletePlayerFromGroup)(THIS_ DPID idGroup, DPID idPlayer) PURE;
439 STDMETHOD(DestroyPlayer)(THIS_ DPID idPlayer) PURE;
440 STDMETHOD(DestroyGroup)(THIS_ DPID idGroup) PURE;
441 STDMETHOD(EnableNewPlayers)(THIS_ WINBOOL) PURE;
442 STDMETHOD(EnumGroupPlayers)(THIS_ DPID idGroup, LPDPENUMPLAYERSCALLBACK lpEnumPlayersCallback, LPVOID lpContext, DWORD dwFlags) PURE;
443 STDMETHOD(EnumGroups)(THIS_ DWORD, LPDPENUMPLAYERSCALLBACK lpEnumPlayersCallback, LPVOID lpContext, DWORD dwFlags) PURE;
444 STDMETHOD(EnumPlayers)(THIS_ DWORD, LPDPENUMPLAYERSCALLBACK lpEnumPlayersCallback, LPVOID lpContext, DWORD dwFlags) PURE;
445 STDMETHOD(EnumSessions)(THIS_ LPDPSESSIONDESC lpsd, DWORD dwTimeout, LPDPENUMSESSIONSCALLBACK lpEnumSessionsCallback, LPVOID lpContext, DWORD dwFlags) PURE;
446 STDMETHOD(GetCaps)(THIS_ LPDPCAPS lpDPCaps) PURE;
447 STDMETHOD(GetMessageCount)(THIS_ DPID idPlayer, LPDWORD lpdwCount) PURE;
448 STDMETHOD(GetPlayerCaps)(THIS_ DPID idPlayer, LPDPCAPS lpPlayerCaps) PURE;
449 STDMETHOD(GetPlayerName)(THIS_ DPID idPlayer, LPSTR, LPDWORD, LPSTR, LPDWORD) PURE;
450 STDMETHOD(Initialize)(THIS_ LPGUID lpGUID) PURE;
451 STDMETHOD(Open)(THIS_ LPDPSESSIONDESC lpsd) PURE;
452 STDMETHOD(Receive)(THIS_ LPDPID lpidFrom, LPDPID lpidTo, DWORD dwFlags, LPVOID lpData, LPDWORD lpdwDataSize) PURE;
453 STDMETHOD(SaveSession)(THIS_ LPSTR) PURE;
454 STDMETHOD(Send)(THIS_ DPID idFrom, DPID idTo, DWORD dwFlags, LPVOID lpData, DWORD dwDataSize) PURE;
455 STDMETHOD(SetPlayerName)(THIS_ DPID idPlayer, LPSTR lpPlayerName, LPSTR) PURE;
456 };
457 #undef INTERFACE
458
459 #if !defined(__cplusplus) || defined(CINTERFACE)
460 /*** IUnknown methods ***/
461 #define IDirectPlay_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
462 #define IDirectPlay_AddRef(p) (p)->lpVtbl->AddRef(p)
463 #define IDirectPlay_Release(p) (p)->lpVtbl->Release(p)
464 /*** IDirectPlay methods ***/
465 #define IDirectPlay_AddPlayerToGroup(p,a,b) (p)->lpVtbl->AddPlayerToGroup(p,a,b)
466 #define IDirectPlay_Close(p) (p)->lpVtbl->Close(p)
467 #define IDirectPlay_CreatePlayer(p,a,b,c,d) (p)->lpVtbl->CreatePlayer(p,a,b,c,d)
468 #define IDirectPlay_CreateGroup(p,a,b,c) (p)->lpVtbl->CreateGroup(p,a,b,c)
469 #define IDirectPlay_DeletePlayerFromGroup(p,a,b) (p)->lpVtbl->DeletePlayerFromGroup(p,a,b)
470 #define IDirectPlay_DestroyPlayer(p,a) (p)->lpVtbl->DestroyPlayer(p,a)
471 #define IDirectPlay_DestroyGroup(p,a) (p)->lpVtbl->DestroyGroup(p,a)
472 #define IDirectPlay_EnableNewPlayers(p,a) (p)->lpVtbl->EnableNewPlayers(p,a)
473 #define IDirectPlay_EnumGroupPlayers(p,a,b,c,d) (p)->lpVtbl->EnumGroupPlayers(p,a,b,c,d)
474 #define IDirectPlay_EnumGroups(p,a,b,c,d) (p)->lpVtbl->EnumGroups(p,a,b,c,d)
475 #define IDirectPlay_EnumPlayers(p,a,b,c,d) (p)->lpVtbl->EnumPlayers(p,a,b,c,d)
476 #define IDirectPlay_EnumSessions(p,a,b,c,d,e) (p)->lpVtbl->EnumSessions(p,a,b,c,d,e)
477 #define IDirectPlay_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a)
478 #define IDirectPlay_GetMessageCount(p,a,b) (p)->lpVtbl->GetMessageCount(p,a,b)
479 #define IDirectPlay_GetPlayerCaps(p,a,b) (p)->lpVtbl->GetPlayerCaps(p,a,b)
480 #define IDirectPlay_GetPlayerName(p,a,b,c,d,e) (p)->lpVtbl->GetPlayerName(p,a,b,c,d,e)
481 #define IDirectPlay_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
482 #define IDirectPlay_Open(p,a) (p)->lpVtbl->Open(p,a)
483 #define IDirectPlay_Receive(p,a,b,c,d,e) (p)->lpVtbl->Receive(p,a,b,c,d,e)
484 #define IDirectPlay_SaveSession(p,a) (p)->lpVtbl->SaveSession(p,a)
485 #define IDirectPlay_Send(p,a,b,c,d,e) (p)->lpVtbl->Send(p,a,b,c,d,e)
486 #define IDirectPlay_SetPlayerName(p,a,b,c) (p)->lpVtbl->SetPlayerName(p,a,b,c)
487 #else
488 /*** IUnknown methods ***/
489 #define IDirectPlay_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
490 #define IDirectPlay_AddRef(p) (p)->AddRef()
491 #define IDirectPlay_Release(p) (p)->Release()
492 /*** IDirectPlay methods ***/
493 #define IDirectPlay_AddPlayerToGroup(p,a,b) (p)->AddPlayerToGroup(a,b)
494 #define IDirectPlay_Close(p) (p)->Close()
495 #define IDirectPlay_CreatePlayer(p,a,b,c,d) (p)->CreatePlayer(a,b,c,d)
496 #define IDirectPlay_CreateGroup(p,a,b,c) (p)->CreateGroup(a,b,c)
497 #define IDirectPlay_DeletePlayerFromGroup(p,a,b) (p)->DeletePlayerFromGroup(a,b)
498 #define IDirectPlay_DestroyPlayer(p,a) (p)->DestroyPlayer(a)
499 #define IDirectPlay_DestroyGroup(p,a) (p)->DestroyGroup(a)
500 #define IDirectPlay_EnableNewPlayers(p,a) (p)->EnableNewPlayers(a)
501 #define IDirectPlay_EnumGroupPlayers(p,a,b,c,d) (p)->EnumGroupPlayers(a,b,c,d)
502 #define IDirectPlay_EnumGroups(p,a,b,c,d) (p)->EnumGroups(a,b,c,d)
503 #define IDirectPlay_EnumPlayers(p,a,b,c,d) (p)->EnumPlayers(a,b,c,d)
504 #define IDirectPlay_EnumSessions(p,a,b,c,d,e) (p)->EnumSessions(a,b,c,d,e)
505 #define IDirectPlay_GetCaps(p,a) (p)->GetCaps(a)
506 #define IDirectPlay_GetMessageCount(p,a,b) (p)->GetMessageCount(a,b)
507 #define IDirectPlay_GetPlayerCaps(p,a,b) (p)->GetPlayerCaps(a,b)
508 #define IDirectPlay_GetPlayerName(p,a,b,c,d,e) (p)->GetPlayerName(a,b,c,d,e)
509 #define IDirectPlay_Initialize(p,a) (p)->Initialize(a)
510 #define IDirectPlay_Open(p,a) (p)->Open(a)
511 #define IDirectPlay_Receive(p,a,b,c,d,e) (p)->Receive(a,b,c,d,e)
512 #define IDirectPlay_SaveSession(p,a) (p)->SaveSession(a)
513 #define IDirectPlay_Send(p,a,b,c,d,e) (p)->Send(a,b,c,d,e)
514 #define IDirectPlay_SetPlayerName(p,a,b,c) (p)->SetPlayerName(a,b,c)
515 #endif
516
517
518 /*****************************************************************************
519 * IDirectPlay2 and IDirectPlay2A interface
520 */
521 #define INTERFACE IDirectPlay2
DECLARE_INTERFACE_(IDirectPlay2,IUnknown)522 DECLARE_INTERFACE_(IDirectPlay2,IUnknown)
523 {
524 /*** IUnknown methods ***/
525 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
526 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
527 STDMETHOD_(ULONG,Release)(THIS) PURE;
528 /*** IDirectPlay2 methods ***/
529 STDMETHOD(AddPlayerToGroup)(THIS_ DPID idGroup, DPID idPlayer) PURE;
530 STDMETHOD(Close)(THIS) PURE;
531 STDMETHOD(CreateGroup)(THIS_ LPDPID lpidGroup, LPDPNAME lpGroupName, LPVOID lpData, DWORD dwDataSize, DWORD dwFlags) PURE;
532 STDMETHOD(CreatePlayer)(THIS_ LPDPID lpidPlayer, LPDPNAME lpPlayerName, HANDLE hEvent, LPVOID lpData, DWORD dwDataSize, DWORD dwFlags) PURE;
533 STDMETHOD(DeletePlayerFromGroup)(THIS_ DPID idGroup, DPID idPlayer) PURE;
534 STDMETHOD(DestroyGroup)(THIS_ DPID idGroup) PURE;
535 STDMETHOD(DestroyPlayer)(THIS_ DPID idPlayer) PURE;
536 STDMETHOD(EnumGroupPlayers)(THIS_ DPID idGroup, LPGUID lpguidInstance, LPDPENUMPLAYERSCALLBACK2 lpEnumPlayersCallback2, LPVOID lpContext, DWORD dwFlags) PURE;
537 STDMETHOD(EnumGroups)(THIS_ LPGUID lpguidInstance, LPDPENUMPLAYERSCALLBACK2 lpEnumPlayersCallback2, LPVOID lpContext, DWORD dwFlags) PURE;
538 STDMETHOD(EnumPlayers)(THIS_ LPGUID lpguidInstance, LPDPENUMPLAYERSCALLBACK2 lpEnumPlayersCallback2, LPVOID lpContext, DWORD dwFlags) PURE;
539 STDMETHOD(EnumSessions)(THIS_ LPDPSESSIONDESC2 lpsd, DWORD dwTimeout, LPDPENUMSESSIONSCALLBACK2 lpEnumSessionsCallback2, LPVOID lpContext, DWORD dwFlags) PURE;
540 STDMETHOD(GetCaps)(THIS_ LPDPCAPS lpDPCaps, DWORD dwFlags) PURE;
541 STDMETHOD(GetGroupData)(THIS_ DPID idGroup, LPVOID lpData, LPDWORD lpdwDataSize, DWORD dwFlags) PURE;
542 STDMETHOD(GetGroupName)(THIS_ DPID idGroup, LPVOID lpData, LPDWORD lpdwDataSize) PURE;
543 STDMETHOD(GetMessageCount)(THIS_ DPID idPlayer, LPDWORD lpdwCount) PURE;
544 STDMETHOD(GetPlayerAddress)(THIS_ DPID idPlayer, LPVOID lpData, LPDWORD lpdwDataSize) PURE;
545 STDMETHOD(GetPlayerCaps)(THIS_ DPID idPlayer, LPDPCAPS lpPlayerCaps, DWORD dwFlags) PURE;
546 STDMETHOD(GetPlayerData)(THIS_ DPID idPlayer, LPVOID lpData, LPDWORD lpdwDataSize, DWORD dwFlags) PURE;
547 STDMETHOD(GetPlayerName)(THIS_ DPID idPlayer, LPVOID lpData, LPDWORD lpdwDataSize) PURE;
548 STDMETHOD(GetSessionDesc)(THIS_ LPVOID lpData, LPDWORD lpdwDataSize) PURE;
549 STDMETHOD(Initialize)(THIS_ LPGUID lpGUID) PURE;
550 STDMETHOD(Open)(THIS_ LPDPSESSIONDESC2 lpsd, DWORD dwFlags) PURE;
551 STDMETHOD(Receive)(THIS_ LPDPID lpidFrom, LPDPID lpidTo, DWORD dwFlags, LPVOID lpData, LPDWORD lpdwDataSize) PURE;
552 STDMETHOD(Send)(THIS_ DPID idFrom, DPID idTo, DWORD dwFlags, LPVOID lpData, DWORD dwDataSize) PURE;
553 STDMETHOD(SetGroupData)(THIS_ DPID idGroup, LPVOID lpData, DWORD dwDataSize, DWORD dwFlags) PURE;
554 STDMETHOD(SetGroupName)(THIS_ DPID idGroup, LPDPNAME lpGroupName, DWORD dwFlags) PURE;
555 STDMETHOD(SetPlayerData)(THIS_ DPID idPlayer, LPVOID lpData, DWORD dwDataSize, DWORD dwFlags) PURE;
556 STDMETHOD(SetPlayerName)(THIS_ DPID idPlayer, LPDPNAME lpPlayerName, DWORD dwFlags) PURE;
557 STDMETHOD(SetSessionDesc)(THIS_ LPDPSESSIONDESC2 lpSessDesc, DWORD dwFlags) PURE;
558 };
559 #undef INTERFACE
560
561 #if !defined(__cplusplus) || defined(CINTERFACE)
562 /*** IUnknown methods ***/
563 #define IDirectPlay2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
564 #define IDirectPlay2_AddRef(p) (p)->lpVtbl->AddRef(p)
565 #define IDirectPlay2_Release(p) (p)->lpVtbl->Release(p)
566 /*** IDirectPlay2 methods ***/
567 #define IDirectPlay2_AddPlayerToGroup(p,a,b) (p)->lpVtbl->AddPlayerToGroup(p,a,b)
568 #define IDirectPlay2_Close(p) (p)->lpVtbl->Close(p)
569 #define IDirectPlay2_CreateGroup(p,a,b,c,d,e) (p)->lpVtbl->CreateGroup(p,a,b,c,d,e)
570 #define IDirectPlay2_CreatePlayer(p,a,b,c,d,e,f) (p)->lpVtbl->CreatePlayer(p,a,b,c,d,e,f)
571 #define IDirectPlay2_DeletePlayerFromGroup(p,a,b) (p)->lpVtbl->DeletePlayerFromGroup(p,a,b)
572 #define IDirectPlay2_DestroyGroup(p,a) (p)->lpVtbl->DestroyGroup(p,a)
573 #define IDirectPlay2_DestroyPlayer(p,a) (p)->lpVtbl->DestroyPlayer(p,a)
574 #define IDirectPlay2_EnumGroupPlayers(p,a,b,c,d,e) (p)->lpVtbl->EnumGroupPlayers(p,a,b,c,d,e)
575 #define IDirectPlay2_EnumGroups(p,a,b,c,d) (p)->lpVtbl->EnumGroups(p,a,b,c,d)
576 #define IDirectPlay2_EnumPlayers(p,a,b,c,d) (p)->lpVtbl->EnumPlayers(p,a,b,c,d)
577 #define IDirectPlay2_EnumSessions(p,a,b,c,d,e) (p)->lpVtbl->EnumSessions(p,a,b,c,d,e)
578 #define IDirectPlay2_GetCaps(p,a,b) (p)->lpVtbl->GetCaps(p,a,b)
579 #define IDirectPlay2_GetGroupData(p,a,b,c,d) (p)->lpVtbl->GetGroupData(p,a,b,c,d)
580 #define IDirectPlay2_GetGroupName(p,a,b,c) (p)->lpVtbl->GetGroupName(p,a,b,c)
581 #define IDirectPlay2_GetMessageCount(p,a,b) (p)->lpVtbl->GetMessageCount(p,a,b)
582 #define IDirectPlay2_GetPlayerAddress(p,a,b,c) (p)->lpVtbl->GetPlayerAddress(p,a,b,c)
583 #define IDirectPlay2_GetPlayerCaps(p,a,b,c) (p)->lpVtbl->GetPlayerCaps(p,a,b,c)
584 #define IDirectPlay2_GetPlayerData(p,a,b,c,d) (p)->lpVtbl->GetPlayerData(p,a,b,c,d)
585 #define IDirectPlay2_GetPlayerName(p,a,b,c) (p)->lpVtbl->GetPlayerName(p,a,b,c)
586 #define IDirectPlay2_GetSessionDesc(p,a,b) (p)->lpVtbl->GetSessionDesc(p,a,b)
587 #define IDirectPlay2_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
588 #define IDirectPlay2_Open(p,a,b) (p)->lpVtbl->Open(p,a,b)
589 #define IDirectPlay2_Receive(p,a,b,c,d,e) (p)->lpVtbl->Receive(p,a,b,c,d,e)
590 #define IDirectPlay2_Send(p,a,b,c,d,e) (p)->lpVtbl->Send(p,a,b,c,d,e)
591 #define IDirectPlay2_SetGroupData(p,a,b,c,d) (p)->lpVtbl->SetGroupData(p,a,b,c,d)
592 #define IDirectPlay2_SetGroupName(p,a,b,c) (p)->lpVtbl->SetGroupName(p,a,b,c)
593 #define IDirectPlay2_SetPlayerData(p,a,b,c,d) (p)->lpVtbl->SetPlayerData(p,a,b,c,d)
594 #define IDirectPlay2_SetPlayerName(p,a,b,c) (p)->lpVtbl->SetPlayerName(p,a,b,c)
595 #define IDirectPlay2_SetSessionDesc(p,a,b) (p)->lpVtbl->SetSessionDesc(p,a,b)
596 #else
597 /*** IUnknown methods ***/
598 #define IDirectPlay2_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
599 #define IDirectPlay2_AddRef(p) (p)->AddRef()
600 #define IDirectPlay2_Release(p) (p)->Release()
601 /*** IDirectPlay2 methods ***/
602 #define IDirectPlay2_AddPlayerToGroup(p,a,b) (p)->AddPlayerToGroup(a,b)
603 #define IDirectPlay2_Close(p) (p)->Close()
604 #define IDirectPlay2_CreateGroup(p,a,b,c,d,e) (p)->CreateGroup(a,b,c,d,e)
605 #define IDirectPlay2_CreatePlayer(p,a,b,c,d,e,f) (p)->CreatePlayer(a,b,c,d,e,f)
606 #define IDirectPlay2_DeletePlayerFromGroup(p,a,b) (p)->DeletePlayerFromGroup(a,b)
607 #define IDirectPlay2_DestroyGroup(p,a) (p)->DestroyGroup(a)
608 #define IDirectPlay2_DestroyPlayer(p,a) (p)->DestroyPlayer(a)
609 #define IDirectPlay2_EnumGroupPlayers(p,a,b,c,d,e) (p)->EnumGroupPlayers(a,b,c,d,e)
610 #define IDirectPlay2_EnumGroups(p,a,b,c,d) (p)->EnumGroups(a,b,c,d)
611 #define IDirectPlay2_EnumPlayers(p,a,b,c,d) (p)->EnumPlayers(a,b,c,d)
612 #define IDirectPlay2_EnumSessions(p,a,b,c,d,e) (p)->EnumSessions(a,b,c,d,e)
613 #define IDirectPlay2_GetCaps(p,a,b) (p)->GetCaps(a,b)
614 #define IDirectPlay2_GetGroupData(p,a,b,c,d) (p)->GetGroupData(a,b,c,d)
615 #define IDirectPlay2_GetGroupName(p,a,b,c) (p)->GetGroupName(a,b,c)
616 #define IDirectPlay2_GetMessageCount(p,a,b) (p)->GetMessageCount(a,b)
617 #define IDirectPlay2_GetPlayerAddress(p,a,b,c) (p)->GetPlayerAddress(a,b,c)
618 #define IDirectPlay2_GetPlayerCaps(p,a,b,c) (p)->GetPlayerCaps(a,b,c)
619 #define IDirectPlay2_GetPlayerData(p,a,b,c,d) (p)->GetPlayerData(a,b,c,d)
620 #define IDirectPlay2_GetPlayerName(p,a,b,c) (p)->GetPlayerName(a,b,c)
621 #define IDirectPlay2_GetSessionDesc(p,a,b) (p)->GetSessionDesc(a,b)
622 #define IDirectPlay2_Initialize(p,a) (p)->Initialize(a)
623 #define IDirectPlay2_Open(p,a,b) (p)->Open(a,b)
624 #define IDirectPlay2_Receive(p,a,b,c,d,e) (p)->Receive(a,b,c,d,e)
625 #define IDirectPlay2_Send(p,a,b,c,d,e) (p)->Send(a,b,c,d,e)
626 #define IDirectPlay2_SetGroupData(p,a,b,c,d) (p)->SetGroupData(a,b,c,d)
627 #define IDirectPlay2_SetGroupName(p,a,b,c) (p)->SetGroupName(a,b,c)
628 #define IDirectPlay2_SetPlayerData(p,a,b,c,d) (p)->SetPlayerData(a,b,c,d)
629 #define IDirectPlay2_SetPlayerName(p,a,b,c) (p)->SetPlayerName(a,b,c)
630 #define IDirectPlay2_SetSessionDesc(p,a,b) (p)->SetSessionDesc(a,b)
631 #endif
632
633
634 /*****************************************************************************
635 * IDirectPlay3 and IDirectPlay3A interface
636 */
637 #define INTERFACE IDirectPlay3
DECLARE_INTERFACE_(IDirectPlay3,IDirectPlay2)638 DECLARE_INTERFACE_(IDirectPlay3,IDirectPlay2)
639 {
640 /*** IUnknown methods ***/
641 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
642 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
643 STDMETHOD_(ULONG,Release)(THIS) PURE;
644 /*** IDirectPlay2 methods ***/
645 STDMETHOD(AddPlayerToGroup)(THIS_ DPID idGroup, DPID idPlayer) PURE;
646 STDMETHOD(Close)(THIS) PURE;
647 STDMETHOD(CreateGroup)(THIS_ LPDPID lpidGroup, LPDPNAME lpGroupName, LPVOID lpData, DWORD dwDataSize, DWORD dwFlags) PURE;
648 STDMETHOD(CreatePlayer)(THIS_ LPDPID lpidPlayer, LPDPNAME lpPlayerName, HANDLE hEvent, LPVOID lpData, DWORD dwDataSize, DWORD dwFlags) PURE;
649 STDMETHOD(DeletePlayerFromGroup)(THIS_ DPID idGroup, DPID idPlayer) PURE;
650 STDMETHOD(DestroyGroup)(THIS_ DPID idGroup) PURE;
651 STDMETHOD(DestroyPlayer)(THIS_ DPID idPlayer) PURE;
652 STDMETHOD(EnumGroupPlayers)(THIS_ DPID idGroup, LPGUID lpguidInstance, LPDPENUMPLAYERSCALLBACK2 lpEnumPlayersCallback2, LPVOID lpContext, DWORD dwFlags) PURE;
653 STDMETHOD(EnumGroups)(THIS_ LPGUID lpguidInstance, LPDPENUMPLAYERSCALLBACK2 lpEnumPlayersCallback2, LPVOID lpContext, DWORD dwFlags) PURE;
654 STDMETHOD(EnumPlayers)(THIS_ LPGUID lpguidInstance, LPDPENUMPLAYERSCALLBACK2 lpEnumPlayersCallback2, LPVOID lpContext, DWORD dwFlags) PURE;
655 STDMETHOD(EnumSessions)(THIS_ LPDPSESSIONDESC2 lpsd, DWORD dwTimeout, LPDPENUMSESSIONSCALLBACK2 lpEnumSessionsCallback2, LPVOID lpContext, DWORD dwFlags) PURE;
656 STDMETHOD(GetCaps)(THIS_ LPDPCAPS lpDPCaps, DWORD dwFlags) PURE;
657 STDMETHOD(GetGroupData)(THIS_ DPID idGroup, LPVOID lpData, LPDWORD lpdwDataSize, DWORD dwFlags) PURE;
658 STDMETHOD(GetGroupName)(THIS_ DPID idGroup, LPVOID lpData, LPDWORD lpdwDataSize) PURE;
659 STDMETHOD(GetMessageCount)(THIS_ DPID idPlayer, LPDWORD lpdwCount) PURE;
660 STDMETHOD(GetPlayerAddress)(THIS_ DPID idPlayer, LPVOID lpData, LPDWORD lpdwDataSize) PURE;
661 STDMETHOD(GetPlayerCaps)(THIS_ DPID idPlayer, LPDPCAPS lpPlayerCaps, DWORD dwFlags) PURE;
662 STDMETHOD(GetPlayerData)(THIS_ DPID idPlayer, LPVOID lpData, LPDWORD lpdwDataSize, DWORD dwFlags) PURE;
663 STDMETHOD(GetPlayerName)(THIS_ DPID idPlayer, LPVOID lpData, LPDWORD lpdwDataSize) PURE;
664 STDMETHOD(GetSessionDesc)(THIS_ LPVOID lpData, LPDWORD lpdwDataSize) PURE;
665 STDMETHOD(Initialize)(THIS_ LPGUID lpGUID) PURE;
666 STDMETHOD(Open)(THIS_ LPDPSESSIONDESC2 lpsd, DWORD dwFlags) PURE;
667 STDMETHOD(Receive)(THIS_ LPDPID lpidFrom, LPDPID lpidTo, DWORD dwFlags, LPVOID lpData, LPDWORD lpdwDataSize) PURE;
668 STDMETHOD(Send)(THIS_ DPID idFrom, DPID idTo, DWORD dwFlags, LPVOID lpData, DWORD dwDataSize) PURE;
669 STDMETHOD(SetGroupData)(THIS_ DPID idGroup, LPVOID lpData, DWORD dwDataSize, DWORD dwFlags) PURE;
670 STDMETHOD(SetGroupName)(THIS_ DPID idGroup, LPDPNAME lpGroupName, DWORD dwFlags) PURE;
671 STDMETHOD(SetPlayerData)(THIS_ DPID idPlayer, LPVOID lpData, DWORD dwDataSize, DWORD dwFlags) PURE;
672 STDMETHOD(SetPlayerName)(THIS_ DPID idPlayer, LPDPNAME lpPlayerName, DWORD dwFlags) PURE;
673 STDMETHOD(SetSessionDesc)(THIS_ LPDPSESSIONDESC2 lpSessDesc, DWORD dwFlags) PURE;
674 /*** IDirectPlay3 methods ***/
675 STDMETHOD(AddGroupToGroup)(THIS_ DPID idParentGroup, DPID idGroup) PURE;
676 STDMETHOD(CreateGroupInGroup)(THIS_ DPID idParentGroup, LPDPID lpidGroup, LPDPNAME lpGroupName, LPVOID lpData, DWORD dwDataSize, DWORD dwFlags) PURE;
677 STDMETHOD(DeleteGroupFromGroup)(THIS_ DPID idParentGroup, DPID idGroup) PURE;
678 STDMETHOD(EnumConnections)(THIS_ LPCGUID lpguidApplication, LPDPENUMCONNECTIONSCALLBACK lpEnumCallback, LPVOID lpContext, DWORD dwFlags) PURE;
679 STDMETHOD(EnumGroupsInGroup)(THIS_ DPID idGroup, LPGUID lpguidInstance, LPDPENUMPLAYERSCALLBACK2 lpEnumCallback, LPVOID lpContext, DWORD dwFlags) PURE;
680 STDMETHOD(GetGroupConnectionSettings)(THIS_ DWORD dwFlags, DPID idGroup, LPVOID lpData, LPDWORD lpdwDataSize) PURE;
681 STDMETHOD(InitializeConnection)(THIS_ LPVOID lpConnection, DWORD dwFlags) PURE;
682 STDMETHOD(SecureOpen)(THIS_ LPCDPSESSIONDESC2 lpsd, DWORD dwFlags, LPCDPSECURITYDESC lpSecurity, LPCDPCREDENTIALS lpCredentials) PURE;
683 STDMETHOD(SendChatMessage)(THIS_ DPID idFrom, DPID idTo, DWORD dwFlags, LPDPCHAT lpChatMessage) PURE;
684 STDMETHOD(SetGroupConnectionSettings)(THIS_ DWORD dwFlags, DPID idGroup, LPDPLCONNECTION lpConnection) PURE;
685 STDMETHOD(StartSession)(THIS_ DWORD dwFlags, DPID idGroup) PURE;
686 STDMETHOD(GetGroupFlags)(THIS_ DPID idGroup, LPDWORD lpdwFlags) PURE;
687 STDMETHOD(GetGroupParent)(THIS_ DPID idGroup, LPDPID lpidParent) PURE;
688 STDMETHOD(GetPlayerAccount)(THIS_ DPID idPlayer, DWORD dwFlags, LPVOID lpData, LPDWORD lpdwDataSize) PURE;
689 STDMETHOD(GetPlayerFlags)(THIS_ DPID idPlayer, LPDWORD lpdwFlags) PURE;
690 };
691 #undef INTERFACE
692
693 #if !defined(__cplusplus) || defined(CINTERFACE)
694 /*** IUnknown methods ***/
695 #define IDirectPlay3_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
696 #define IDirectPlay3_AddRef(p) (p)->lpVtbl->AddRef(p)
697 #define IDirectPlay3_Release(p) (p)->lpVtbl->Release(p)
698 /*** IDirectPlay2 methods ***/
699 #define IDirectPlay3_AddPlayerToGroup(p,a,b) (p)->lpVtbl->AddPlayerToGroup(p,a,b)
700 #define IDirectPlay3_Close(p) (p)->lpVtbl->Close(p)
701 #define IDirectPlay3_CreateGroup(p,a,b,c,d,e) (p)->lpVtbl->CreateGroup(p,a,b,c,d,e)
702 #define IDirectPlay3_CreatePlayer(p,a,b,c,d,e,f) (p)->lpVtbl->CreatePlayer(p,a,b,c,d,e,f)
703 #define IDirectPlay3_DeletePlayerFromGroup(p,a,b) (p)->lpVtbl->DeletePlayerFromGroup(p,a,b)
704 #define IDirectPlay3_DestroyGroup(p,a) (p)->lpVtbl->DestroyGroup(p,a)
705 #define IDirectPlay3_DestroyPlayer(p,a) (p)->lpVtbl->DestroyPlayer(p,a)
706 #define IDirectPlay3_EnumGroupPlayers(p,a,b,c,d,e) (p)->lpVtbl->EnumGroupPlayers(p,a,b,c,d,e)
707 #define IDirectPlay3_EnumGroups(p,a,b,c,d) (p)->lpVtbl->EnumGroups(p,a,b,c,d)
708 #define IDirectPlay3_EnumPlayers(p,a,b,c,d) (p)->lpVtbl->EnumPlayers(p,a,b,c,d)
709 #define IDirectPlay3_EnumSessions(p,a,b,c,d,e) (p)->lpVtbl->EnumSessions(p,a,b,c,d,e)
710 #define IDirectPlay3_GetCaps(p,a,b) (p)->lpVtbl->GetCaps(p,a,b)
711 #define IDirectPlay3_GetGroupData(p,a,b,c,d) (p)->lpVtbl->GetGroupData(p,a,b,c,d)
712 #define IDirectPlay3_GetGroupName(p,a,b,c) (p)->lpVtbl->GetGroupName(p,a,b,c)
713 #define IDirectPlay3_GetMessageCount(p,a,b) (p)->lpVtbl->GetMessageCount(p,a,b)
714 #define IDirectPlay3_GetPlayerAddress(p,a,b,c) (p)->lpVtbl->GetPlayerAddress(p,a,b,c)
715 #define IDirectPlay3_GetPlayerCaps(p,a,b,c) (p)->lpVtbl->GetPlayerCaps(p,a,b,c)
716 #define IDirectPlay3_GetPlayerData(p,a,b,c,d) (p)->lpVtbl->GetPlayerData(p,a,b,c,d)
717 #define IDirectPlay3_GetPlayerName(p,a,b,c) (p)->lpVtbl->GetPlayerName(p,a,b,c)
718 #define IDirectPlay3_GetSessionDesc(p,a,b) (p)->lpVtbl->GetSessionDesc(p,a,b)
719 #define IDirectPlay3_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
720 #define IDirectPlay3_Open(p,a,b) (p)->lpVtbl->Open(p,a,b)
721 #define IDirectPlay3_Receive(p,a,b,c,d,e) (p)->lpVtbl->Receive(p,a,b,c,d,e)
722 #define IDirectPlay3_Send(p,a,b,c,d,e) (p)->lpVtbl->Send(p,a,b,c,d,e)
723 #define IDirectPlay3_SetGroupData(p,a,b,c,d) (p)->lpVtbl->SetGroupData(p,a,b,c,d)
724 #define IDirectPlay3_SetGroupName(p,a,b,c) (p)->lpVtbl->SetGroupName(p,a,b,c)
725 #define IDirectPlay3_SetPlayerData(p,a,b,c,d) (p)->lpVtbl->SetPlayerData(p,a,b,c,d)
726 #define IDirectPlay3_SetPlayerName(p,a,b,c) (p)->lpVtbl->SetPlayerName(p,a,b,c)
727 #define IDirectPlay3_SetSessionDesc(p,a,b) (p)->lpVtbl->SetSessionDesc(p,a,b)
728 /*** IDirectPlay3 methods ***/
729 #define IDirectPlay3_AddGroupToGroup(p,a,b) (p)->lpVtbl->AddGroupToGroup(p,a,b)
730 #define IDirectPlay3_CreateGroupInGroup(p,a,b,c,d,e,f) (p)->lpVtbl->CreateGroupInGroup(p,a,b,c,d,e,f)
731 #define IDirectPlay3_DeleteGroupFromGroup(p,a,b) (p)->lpVtbl->DeleteGroupFromGroup(p,a,b)
732 #define IDirectPlay3_EnumConnections(p,a,b,c,d) (p)->lpVtbl->EnumConnections(p,a,b,c,d)
733 #define IDirectPlay3_EnumGroupsInGroup(p,a,b,c,d,e) (p)->lpVtbl->EnumGroupsInGroup(p,a,b,c,d,e)
734 #define IDirectPlay3_GetGroupConnectionSettings(p,a,b,c,d) (p)->lpVtbl->GetGroupConnectionSettings(p,a,b,c,d)
735 #define IDirectPlay3_InitializeConnection(p,a,b) (p)->lpVtbl->InitializeConnection(p,a,b)
736 #define IDirectPlay3_SecureOpen(p,a,b,c,d) (p)->lpVtbl->SecureOpen(p,a,b,c,d)
737 #define IDirectPlay3_SendChatMessage(p,a,b,c,d) (p)->lpVtbl->SendChatMessage(p,a,b,c,d)
738 #define IDirectPlay3_SetGroupConnectionSettings(p,a,b,c) (p)->lpVtbl->SetGroupConnectionSettings(p,a,b,c)
739 #define IDirectPlay3_StartSession(p,a,b) (p)->lpVtbl->StartSession(p,a,b)
740 #define IDirectPlay3_GetGroupFlags(p,a,b) (p)->lpVtbl->GetGroupFlags(p,a,b)
741 #define IDirectPlay3_GetGroupParent(p,a,b) (p)->lpVtbl->GetGroupParent(p,a,b)
742 #define IDirectPlay3_GetPlayerAccount(p,a,b,c,d) (p)->lpVtbl->GetPlayerAccount(p,a,b,c,d)
743 #define IDirectPlay3_GetPlayerFlags(p,a,b) (p)->lpVtbl->GetPlayerFlags(p,a,b)
744 #else
745 /*** IUnknown methods ***/
746 #define IDirectPlay3_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
747 #define IDirectPlay3_AddRef(p) (p)->AddRef()
748 #define IDirectPlay3_Release(p) (p)->Release()
749 /*** IDirectPlay2 methods ***/
750 #define IDirectPlay3_AddPlayerToGroup(p,a,b) (p)->AddPlayerToGroup(a,b)
751 #define IDirectPlay3_Close(p) (p)->Close()
752 #define IDirectPlay3_CreateGroup(p,a,b,c,d,e) (p)->CreateGroup(a,b,c,d,e)
753 #define IDirectPlay3_CreatePlayer(p,a,b,c,d,e,f) (p)->CreatePlayer(a,b,c,d,e,f)
754 #define IDirectPlay3_DeletePlayerFromGroup(p,a,b) (p)->DeletePlayerFromGroup(a,b)
755 #define IDirectPlay3_DestroyGroup(p,a) (p)->DestroyGroup(a)
756 #define IDirectPlay3_DestroyPlayer(p,a) (p)->DestroyPlayer(a)
757 #define IDirectPlay3_EnumGroupPlayers(p,a,b,c,d,e) (p)->EnumGroupPlayers(a,b,c,d,e)
758 #define IDirectPlay3_EnumGroups(p,a,b,c,d) (p)->EnumGroups(a,b,c,d)
759 #define IDirectPlay3_EnumPlayers(p,a,b,c,d) (p)->EnumPlayers(a,b,c,d)
760 #define IDirectPlay3_EnumSessions(p,a,b,c,d,e) (p)->EnumSessions(a,b,c,d,e)
761 #define IDirectPlay3_GetCaps(p,a,b) (p)->GetCaps(a,b)
762 #define IDirectPlay3_GetGroupData(p,a,b,c,d) (p)->GetGroupData(a,b,c,d)
763 #define IDirectPlay3_GetGroupName(p,a,b,c) (p)->GetGroupName(a,b,c)
764 #define IDirectPlay3_GetMessageCount(p,a,b) (p)->GetMessageCount(a,b)
765 #define IDirectPlay3_GetPlayerAddress(p,a,b,c) (p)->GetPlayerAddress(a,b,c)
766 #define IDirectPlay3_GetPlayerCaps(p,a,b,c) (p)->GetPlayerCaps(a,b,c)
767 #define IDirectPlay3_GetPlayerData(p,a,b,c,d) (p)->GetPlayerData(a,b,c,d)
768 #define IDirectPlay3_GetPlayerName(p,a,b,c) (p)->GetPlayerName(a,b,c)
769 #define IDirectPlay3_GetSessionDesc(p,a,b) (p)->GetSessionDesc(a,b)
770 #define IDirectPlay3_Initialize(p,a) (p)->Initialize(a)
771 #define IDirectPlay3_Open(p,a,b) (p)->Open(a,b)
772 #define IDirectPlay3_Receive(p,a,b,c,d,e) (p)->Receive(a,b,c,d,e)
773 #define IDirectPlay3_Send(p,a,b,c,d,e) (p)->Send(a,b,c,d,e)
774 #define IDirectPlay3_SetGroupData(p,a,b,c,d) (p)->SetGroupData(a,b,c,d)
775 #define IDirectPlay3_SetGroupName(p,a,b,c) (p)->SetGroupName(a,b,c)
776 #define IDirectPlay3_SetPlayerData(p,a,b,c,d) (p)->SetPlayerData(a,b,c,d)
777 #define IDirectPlay3_SetPlayerName(p,a,b,c) (p)->SetPlayerName(a,b,c)
778 #define IDirectPlay3_SetSessionDesc(p,a,b) (p)->SetSessionDesc(a,b)
779 /*** IDirectPlay3 methods ***/
780 #define IDirectPlay3_AddGroupToGroup(p,a,b) (p)->AddGroupToGroup(a,b)
781 #define IDirectPlay3_CreateGroupInGroup(p,a,b,c,d,e,f) (p)->CreateGroupInGroup(a,b,c,d,e,f)
782 #define IDirectPlay3_DeleteGroupFromGroup(p,a,b) (p)->DeleteGroupFromGroup(a,b)
783 #define IDirectPlay3_EnumConnections(p,a,b,c,d) (p)->EnumConnections(a,b,c,d)
784 #define IDirectPlay3_EnumGroupsInGroup(p,a,b,c,d,e) (p)->EnumGroupsInGroup(a,b,c,d,e)
785 #define IDirectPlay3_GetGroupConnectionSettings(p,a,b,c,d) (p)->GetGroupConnectionSettings(a,b,c,d)
786 #define IDirectPlay3_InitializeConnection(p,a,b) (p)->InitializeConnection(a,b)
787 #define IDirectPlay3_SecureOpen(p,a,b,c,d) (p)->SecureOpen(a,b,c,d)
788 #define IDirectPlay3_SendChatMessage(p,a,b,c,d) (p)->SendChatMessage(a,b,c,d)
789 #define IDirectPlay3_SetGroupConnectionSettings(p,a,b,c) (p)->SetGroupConnectionSettings(a,b,c)
790 #define IDirectPlay3_StartSession(p,a,b) (p)->StartSession(a,b)
791 #define IDirectPlay3_GetGroupFlags(p,a,b) (p)->GetGroupFlags(a,b)
792 #define IDirectPlay3_GetGroupParent(p,a,b) (p)->GetGroupParent(a,b)
793 #define IDirectPlay3_GetPlayerAccount(p,a,b,c,d) (p)->GetPlayerAccount(a,b,c,d)
794 #define IDirectPlay3_GetPlayerFlags(p,a,b) (p)->GetPlayerFlags(a,b)
795 #endif
796
797 /*****************************************************************************
798 * IDirectPlay4 and IDirectPlay4A interface
799 */
800 #define INTERFACE IDirectPlay4
DECLARE_INTERFACE_(IDirectPlay4,IDirectPlay3)801 DECLARE_INTERFACE_(IDirectPlay4,IDirectPlay3)
802 {
803 /*** IUnknown methods ***/
804 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
805 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
806 STDMETHOD_(ULONG,Release)(THIS) PURE;
807 /*** IDirectPlay2 methods ***/
808 STDMETHOD(AddPlayerToGroup)(THIS_ DPID idGroup, DPID idPlayer) PURE;
809 STDMETHOD(Close)(THIS) PURE;
810 STDMETHOD(CreateGroup)(THIS_ LPDPID lpidGroup, LPDPNAME lpGroupName, LPVOID lpData, DWORD dwDataSize, DWORD dwFlags) PURE;
811 STDMETHOD(CreatePlayer)(THIS_ LPDPID lpidPlayer, LPDPNAME lpPlayerName, HANDLE hEvent, LPVOID lpData, DWORD dwDataSize, DWORD dwFlags) PURE;
812 STDMETHOD(DeletePlayerFromGroup)(THIS_ DPID idGroup, DPID idPlayer) PURE;
813 STDMETHOD(DestroyGroup)(THIS_ DPID idGroup) PURE;
814 STDMETHOD(DestroyPlayer)(THIS_ DPID idPlayer) PURE;
815 STDMETHOD(EnumGroupPlayers)(THIS_ DPID idGroup, LPGUID lpguidInstance, LPDPENUMPLAYERSCALLBACK2 lpEnumPlayersCallback2, LPVOID lpContext, DWORD dwFlags) PURE;
816 STDMETHOD(EnumGroups)(THIS_ LPGUID lpguidInstance, LPDPENUMPLAYERSCALLBACK2 lpEnumPlayersCallback2, LPVOID lpContext, DWORD dwFlags) PURE;
817 STDMETHOD(EnumPlayers)(THIS_ LPGUID lpguidInstance, LPDPENUMPLAYERSCALLBACK2 lpEnumPlayersCallback2, LPVOID lpContext, DWORD dwFlags) PURE;
818 STDMETHOD(EnumSessions)(THIS_ LPDPSESSIONDESC2 lpsd, DWORD dwTimeout, LPDPENUMSESSIONSCALLBACK2 lpEnumSessionsCallback2, LPVOID lpContext, DWORD dwFlags) PURE;
819 STDMETHOD(GetCaps)(THIS_ LPDPCAPS lpDPCaps, DWORD dwFlags) PURE;
820 STDMETHOD(GetGroupData)(THIS_ DPID idGroup, LPVOID lpData, LPDWORD lpdwDataSize, DWORD dwFlags) PURE;
821 STDMETHOD(GetGroupName)(THIS_ DPID idGroup, LPVOID lpData, LPDWORD lpdwDataSize) PURE;
822 STDMETHOD(GetMessageCount)(THIS_ DPID idPlayer, LPDWORD lpdwCount) PURE;
823 STDMETHOD(GetPlayerAddress)(THIS_ DPID idPlayer, LPVOID lpData, LPDWORD lpdwDataSize) PURE;
824 STDMETHOD(GetPlayerCaps)(THIS_ DPID idPlayer, LPDPCAPS lpPlayerCaps, DWORD dwFlags) PURE;
825 STDMETHOD(GetPlayerData)(THIS_ DPID idPlayer, LPVOID lpData, LPDWORD lpdwDataSize, DWORD dwFlags) PURE;
826 STDMETHOD(GetPlayerName)(THIS_ DPID idPlayer, LPVOID lpData, LPDWORD lpdwDataSize) PURE;
827 STDMETHOD(GetSessionDesc)(THIS_ LPVOID lpData, LPDWORD lpdwDataSize) PURE;
828 STDMETHOD(Initialize)(THIS_ LPGUID lpGUID) PURE;
829 STDMETHOD(Open)(THIS_ LPDPSESSIONDESC2 lpsd, DWORD dwFlags) PURE;
830 STDMETHOD(Receive)(THIS_ LPDPID lpidFrom, LPDPID lpidTo, DWORD dwFlags, LPVOID lpData, LPDWORD lpdwDataSize) PURE;
831 STDMETHOD(Send)(THIS_ DPID idFrom, DPID idTo, DWORD dwFlags, LPVOID lpData, DWORD dwDataSize) PURE;
832 STDMETHOD(SetGroupData)(THIS_ DPID idGroup, LPVOID lpData, DWORD dwDataSize, DWORD dwFlags) PURE;
833 STDMETHOD(SetGroupName)(THIS_ DPID idGroup, LPDPNAME lpGroupName, DWORD dwFlags) PURE;
834 STDMETHOD(SetPlayerData)(THIS_ DPID idPlayer, LPVOID lpData, DWORD dwDataSize, DWORD dwFlags) PURE;
835 STDMETHOD(SetPlayerName)(THIS_ DPID idPlayer, LPDPNAME lpPlayerName, DWORD dwFlags) PURE;
836 STDMETHOD(SetSessionDesc)(THIS_ LPDPSESSIONDESC2 lpSessDesc, DWORD dwFlags) PURE;
837 /*** IDirectPlay3 methods ***/
838 STDMETHOD(AddGroupToGroup)(THIS_ DPID idParentGroup, DPID idGroup) PURE;
839 STDMETHOD(CreateGroupInGroup)(THIS_ DPID idParentGroup, LPDPID lpidGroup, LPDPNAME lpGroupName, LPVOID lpData, DWORD dwDataSize, DWORD dwFlags) PURE;
840 STDMETHOD(DeleteGroupFromGroup)(THIS_ DPID idParentGroup, DPID idGroup) PURE;
841 STDMETHOD(EnumConnections)(THIS_ LPCGUID lpguidApplication, LPDPENUMCONNECTIONSCALLBACK lpEnumCallback, LPVOID lpContext, DWORD dwFlags) PURE;
842 STDMETHOD(EnumGroupsInGroup)(THIS_ DPID idGroup, LPGUID lpguidInstance, LPDPENUMPLAYERSCALLBACK2 lpEnumCallback, LPVOID lpContext, DWORD dwFlags) PURE;
843 STDMETHOD(GetGroupConnectionSettings)(THIS_ DWORD dwFlags, DPID idGroup, LPVOID lpData, LPDWORD lpdwDataSize) PURE;
844 STDMETHOD(InitializeConnection)(THIS_ LPVOID lpConnection, DWORD dwFlags) PURE;
845 STDMETHOD(SecureOpen)(THIS_ LPCDPSESSIONDESC2 lpsd, DWORD dwFlags, LPCDPSECURITYDESC lpSecurity, LPCDPCREDENTIALS lpCredentials) PURE;
846 STDMETHOD(SendChatMessage)(THIS_ DPID idFrom, DPID idTo, DWORD dwFlags, LPDPCHAT lpChatMessage) PURE;
847 STDMETHOD(SetGroupConnectionSettings)(THIS_ DWORD dwFlags, DPID idGroup, LPDPLCONNECTION lpConnection) PURE;
848 STDMETHOD(StartSession)(THIS_ DWORD dwFlags, DPID idGroup) PURE;
849 STDMETHOD(GetGroupFlags)(THIS_ DPID idGroup, LPDWORD lpdwFlags) PURE;
850 STDMETHOD(GetGroupParent)(THIS_ DPID idGroup, LPDPID lpidParent) PURE;
851 STDMETHOD(GetPlayerAccount)(THIS_ DPID idPlayer, DWORD dwFlags, LPVOID lpData, LPDWORD lpdwDataSize) PURE;
852 STDMETHOD(GetPlayerFlags)(THIS_ DPID idPlayer, LPDWORD lpdwFlags) PURE;
853 /*** IDirectPlay4 methods ***/
854 STDMETHOD(GetGroupOwner)(THIS_ DPID , LPDPID ) PURE;
855 STDMETHOD(SetGroupOwner)(THIS_ DPID , DPID ) PURE;
856 STDMETHOD(SendEx)(THIS_ DPID , DPID , DWORD , LPVOID , DWORD , DWORD , DWORD , LPVOID , LPDWORD ) PURE;
857 STDMETHOD(GetMessageQueue)(THIS_ DPID , DPID , DWORD , LPDWORD , LPDWORD ) PURE;
858 STDMETHOD(CancelMessage)(THIS_ DWORD , DWORD ) PURE;
859 STDMETHOD(CancelPriority)(THIS_ DWORD , DWORD , DWORD ) PURE;
860 };
861 #undef INTERFACE
862
863 #if !defined(__cplusplus) || defined(CINTERFACE)
864 /*** IUnknown methods ***/
865 #define IDirectPlayX_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
866 #define IDirectPlayX_AddRef(p) (p)->lpVtbl->AddRef(p)
867 #define IDirectPlayX_Release(p) (p)->lpVtbl->Release(p)
868 /*** IDirectPlay2 methods ***/
869 #define IDirectPlayX_AddPlayerToGroup(p,a,b) (p)->lpVtbl->AddPlayerToGroup(p,a,b)
870 #define IDirectPlayX_Close(p) (p)->lpVtbl->Close(p)
871 #define IDirectPlayX_CreateGroup(p,a,b,c,d,e) (p)->lpVtbl->CreateGroup(p,a,b,c,d,e)
872 #define IDirectPlayX_CreatePlayer(p,a,b,c,d,e,f) (p)->lpVtbl->CreatePlayer(p,a,b,c,d,e,f)
873 #define IDirectPlayX_DeletePlayerFromGroup(p,a,b) (p)->lpVtbl->DeletePlayerFromGroup(p,a,b)
874 #define IDirectPlayX_DestroyGroup(p,a) (p)->lpVtbl->DestroyGroup(p,a)
875 #define IDirectPlayX_DestroyPlayer(p,a) (p)->lpVtbl->DestroyPlayer(p,a)
876 #define IDirectPlayX_EnumGroupPlayers(p,a,b,c,d,e) (p)->lpVtbl->EnumGroupPlayers(p,a,b,c,d,e)
877 #define IDirectPlayX_EnumGroups(p,a,b,c,d) (p)->lpVtbl->EnumGroups(p,a,b,c,d)
878 #define IDirectPlayX_EnumPlayers(p,a,b,c,d) (p)->lpVtbl->EnumPlayers(p,a,b,c,d)
879 #define IDirectPlayX_EnumSessions(p,a,b,c,d,e) (p)->lpVtbl->EnumSessions(p,a,b,c,d,e)
880 #define IDirectPlayX_GetCaps(p,a,b) (p)->lpVtbl->GetCaps(p,a,b)
881 #define IDirectPlayX_GetGroupData(p,a,b,c,d) (p)->lpVtbl->GetGroupData(p,a,b,c,d)
882 #define IDirectPlayX_GetGroupName(p,a,b,c) (p)->lpVtbl->GetGroupName(p,a,b,c)
883 #define IDirectPlayX_GetMessageCount(p,a,b) (p)->lpVtbl->GetMessageCount(p,a,b)
884 #define IDirectPlayX_GetPlayerAddress(p,a,b,c) (p)->lpVtbl->GetPlayerAddress(p,a,b,c)
885 #define IDirectPlayX_GetPlayerCaps(p,a,b,c) (p)->lpVtbl->GetPlayerCaps(p,a,b,c)
886 #define IDirectPlayX_GetPlayerData(p,a,b,c,d) (p)->lpVtbl->GetPlayerData(p,a,b,c,d)
887 #define IDirectPlayX_GetPlayerName(p,a,b,c) (p)->lpVtbl->GetPlayerName(p,a,b,c)
888 #define IDirectPlayX_GetSessionDesc(p,a,b) (p)->lpVtbl->GetSessionDesc(p,a,b)
889 #define IDirectPlayX_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
890 #define IDirectPlayX_Open(p,a,b) (p)->lpVtbl->Open(p,a,b)
891 #define IDirectPlayX_Receive(p,a,b,c,d,e) (p)->lpVtbl->Receive(p,a,b,c,d,e)
892 #define IDirectPlayX_Send(p,a,b,c,d,e) (p)->lpVtbl->Send(p,a,b,c,d,e)
893 #define IDirectPlayX_SetGroupData(p,a,b,c,d) (p)->lpVtbl->SetGroupData(p,a,b,c,d)
894 #define IDirectPlayX_SetGroupName(p,a,b,c) (p)->lpVtbl->SetGroupName(p,a,b,c)
895 #define IDirectPlayX_SetPlayerData(p,a,b,c,d) (p)->lpVtbl->SetPlayerData(p,a,b,c,d)
896 #define IDirectPlayX_SetPlayerName(p,a,b,c) (p)->lpVtbl->SetPlayerName(p,a,b,c)
897 #define IDirectPlayX_SetSessionDesc(p,a,b) (p)->lpVtbl->SetSessionDesc(p,a,b)
898 /*** IDirectPlay3 methods ***/
899 #define IDirectPlayX_AddGroupToGroup(p,a,b) (p)->lpVtbl->AddGroupToGroup(p,a,b)
900 #define IDirectPlayX_CreateGroupInGroup(p,a,b,c,d,e,f) (p)->lpVtbl->CreateGroupInGroup(p,a,b,c,d,e,f)
901 #define IDirectPlayX_DeleteGroupFromGroup(p,a,b) (p)->lpVtbl->DeleteGroupFromGroup(p,a,b)
902 #define IDirectPlayX_EnumConnections(p,a,b,c,d) (p)->lpVtbl->EnumConnections(p,a,b,c,d)
903 #define IDirectPlayX_EnumGroupsInGroup(p,a,b,c,d,e) (p)->lpVtbl->EnumGroupsInGroup(p,a,b,c,d,e)
904 #define IDirectPlayX_GetGroupConnectionSettings(p,a,b,c,d) (p)->lpVtbl->GetGroupConnectionSettings(p,a,b,c,d)
905 #define IDirectPlayX_InitializeConnection(p,a,b) (p)->lpVtbl->InitializeConnection(p,a,b)
906 #define IDirectPlayX_SecureOpen(p,a,b,c,d) (p)->lpVtbl->SecureOpen(p,a,b,c,d)
907 #define IDirectPlayX_SendChatMessage(p,a,b,c,d) (p)->lpVtbl->SendChatMessage(p,a,b,c,d)
908 #define IDirectPlayX_SetGroupConnectionSettings(p,a,b,c) (p)->lpVtbl->SetGroupConnectionSettings(p,a,b,c)
909 #define IDirectPlayX_StartSession(p,a,b) (p)->lpVtbl->StartSession(p,a,b)
910 #define IDirectPlayX_GetGroupFlags(p,a,b) (p)->lpVtbl->GetGroupFlags(p,a,b)
911 #define IDirectPlayX_GetGroupParent(p,a,b) (p)->lpVtbl->GetGroupParent(p,a,b)
912 #define IDirectPlayX_GetPlayerAccount(p,a,b,c,d) (p)->lpVtbl->GetPlayerAccount(p,a,b,c,d)
913 #define IDirectPlayX_GetPlayerFlags(p,a,b) (p)->lpVtbl->GetPlayerFlags(p,a,b)
914 /*** IDirectPlay4 methods ***/
915 #define IDirectPlayX_GetGroupOwner(p,a,b) (p)->lpVtbl->GetGroupOwner(p,a,b)
916 #define IDirectPlayX_SetGroupOwner(p,a,b) (p)->lpVtbl->SetGroupOwner(p,a,b)
917 #define IDirectPlayX_SendEx(p,a,b,c,d,e,f,g,h,i) (p)->lpVtbl->SendEx(p,a,b,c,d,e,f,g,h,i)
918 #define IDirectPlayX_GetMessageQueue(p,a,b,c,d,e) (p)->lpVtbl->GetMessageQueue(p,a,b,c,d,e)
919 #define IDirectPlayX_CancelMessage(p,a,b) (p)->lpVtbl->CancelMessage(p,a,b)
920 #define IDirectPlayX_CancelPriority(p,a,b,c) (p)->lpVtbl->CancelPriority(p,a,b,c)
921 #else
922 /*** IUnknown methods ***/
923 #define IDirectPlayX_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
924 #define IDirectPlayX_AddRef(p) (p)->AddRef()
925 #define IDirectPlayX_Release(p) (p)->Release()
926 /*** IDirectPlay2 methods ***/
927 #define IDirectPlayX_AddPlayerToGroup(p,a,b) (p)->AddPlayerToGroup(a,b)
928 #define IDirectPlayX_Close(p) (p)->Close()
929 #define IDirectPlayX_CreateGroup(p,a,b,c,d,e) (p)->CreateGroup(a,b,c,d,e)
930 #define IDirectPlayX_CreatePlayer(p,a,b,c,d,e,f) (p)->CreatePlayer(a,b,c,d,e,f)
931 #define IDirectPlayX_DeletePlayerFromGroup(p,a,b) (p)->DeletePlayerFromGroup(a,b)
932 #define IDirectPlayX_DestroyGroup(p,a) (p)->DestroyGroup(a)
933 #define IDirectPlayX_DestroyPlayer(p,a) (p)->DestroyPlayer(a)
934 #define IDirectPlayX_EnumGroupPlayers(p,a,b,c,d,e) (p)->EnumGroupPlayers(a,b,c,d,e)
935 #define IDirectPlayX_EnumGroups(p,a,b,c,d) (p)->EnumGroups(a,b,c,d)
936 #define IDirectPlayX_EnumPlayers(p,a,b,c,d) (p)->EnumPlayers(a,b,c,d)
937 #define IDirectPlayX_EnumSessions(p,a,b,c,d,e) (p)->EnumSessions(a,b,c,d,e)
938 #define IDirectPlayX_GetCaps(p,a,b) (p)->GetCaps(a,b)
939 #define IDirectPlayX_GetGroupData(p,a,b,c,d) (p)->GetGroupData(a,b,c,d)
940 #define IDirectPlayX_GetGroupName(p,a,b,c) (p)->GetGroupName(a,b,c)
941 #define IDirectPlayX_GetMessageCount(p,a,b) (p)->GetMessageCount(a,b)
942 #define IDirectPlayX_GetPlayerAddress(p,a,b,c) (p)->GetPlayerAddress(a,b,c)
943 #define IDirectPlayX_GetPlayerCaps(p,a,b,c) (p)->GetPlayerCaps(a,b,c)
944 #define IDirectPlayX_GetPlayerData(p,a,b,c,d) (p)->GetPlayerData(a,b,c,d)
945 #define IDirectPlayX_GetPlayerName(p,a,b,c) (p)->GetPlayerName(a,b,c)
946 #define IDirectPlayX_GetSessionDesc(p,a,b) (p)->GetSessionDesc(a,b)
947 #define IDirectPlayX_Initialize(p,a) (p)->Initialize(a)
948 #define IDirectPlayX_Open(p,a,b) (p)->Open(a,b)
949 #define IDirectPlayX_Receive(p,a,b,c,d,e) (p)->Receive(a,b,c,d,e)
950 #define IDirectPlayX_Send(p,a,b,c,d,e) (p)->Send(a,b,c,d,e)
951 #define IDirectPlayX_SetGroupData(p,a,b,c,d) (p)->SetGroupData(a,b,c,d)
952 #define IDirectPlayX_SetGroupName(p,a,b,c) (p)->SetGroupName(a,b,c)
953 #define IDirectPlayX_SetPlayerData(p,a,b,c,d) (p)->SetPlayerData(a,b,c,d)
954 #define IDirectPlayX_SetPlayerName(p,a,b,c) (p)->SetPlayerName(a,b,c)
955 #define IDirectPlayX_SetSessionDesc(p,a,b) (p)->SetSessionDesc(a,b)
956 /*** IDirectPlay3 methods ***/
957 #define IDirectPlayX_AddGroupToGroup(p,a,b) (p)->AddGroupToGroup(a,b)
958 #define IDirectPlayX_CreateGroupInGroup(p,a,b,c,d,e,f) (p)->CreateGroupInGroup(a,b,c,d,e,f)
959 #define IDirectPlayX_DeleteGroupFromGroup(p,a,b) (p)->DeleteGroupFromGroup(a,b)
960 #define IDirectPlayX_EnumConnections(p,a,b,c,d) (p)->EnumConnections(a,b,c,d)
961 #define IDirectPlayX_EnumGroupsInGroup(p,a,b,c,d,e) (p)->EnumGroupsInGroup(a,b,c,d,e)
962 #define IDirectPlayX_GetGroupConnectionSettings(p,a,b,c,d) (p)->GetGroupConnectionSettings(a,b,c,d)
963 #define IDirectPlayX_InitializeConnection(p,a,b) (p)->InitializeConnection(a,b)
964 #define IDirectPlayX_SecureOpen(p,a,b,c,d) (p)->SecureOpen(a,b,c,d)
965 #define IDirectPlayX_SendChatMessage(p,a,b,c,d) (p)->SendChatMessage(a,b,c,d)
966 #define IDirectPlayX_SetGroupConnectionSettings(p,a,b,c) (p)->SetGroupConnectionSettings(a,b,c)
967 #define IDirectPlayX_StartSession(p,a,b) (p)->StartSession(a,b)
968 #define IDirectPlayX_GetGroupFlags(p,a,b) (p)->GetGroupFlags(a,b)
969 #define IDirectPlayX_GetGroupParent(p,a,b) (p)->GetGroupParent(a,b)
970 #define IDirectPlayX_GetPlayerAccount(p,a,b,c,d) (p)->GetPlayerAccount(a,b,c,d)
971 #define IDirectPlayX_GetPlayerFlags(p,a,b) (p)->GetPlayerFlags(a,b)
972 /*** IDirectPlay4 methods ***/
973 #define IDirectPlayX_GetGroupOwner(p,a,b) (p)->GetGroupOwner(a,b)
974 #define IDirectPlayX_SetGroupOwner(p,a,b) (p)->SetGroupOwner(a,b)
975 #define IDirectPlayX_SendEx(p,a,b,c,d,e,f,g,h,i) (p)->SendEx(a,b,c,d,e,f,g,h,i)
976 #define IDirectPlayX_GetMessageQueue(p,a,b,c,d,e) (p)->GetMessageQueue(a,b,c,d,e)
977 #define IDirectPlayX_CancelMessage(p,a,b) (p)->CancelMessage(a,b)
978 #define IDirectPlayX_CancelPriority(p,a,b,c) (p)->CancelPriority(a,b,c)
979 #endif
980
981
982 /* For DirectPlay::EnumConnections */
983 #define DPCONNECTION_DIRECTPLAY 0x00000001
984 #define DPCONNECTION_DIRECTPLAYLOBBY 0x00000002
985
986 /* For DirectPlay::EnumPlayers and DirectPlay::EnumGroups */
987 #define DPENUMPLAYERS_ALL 0x00000000
988 #define DPENUMPLAYERS_LOCAL 0x00000008
989 #define DPENUMPLAYERS_REMOTE 0x00000010
990 #define DPENUMPLAYERS_GROUP 0x00000020
991 #define DPENUMPLAYERS_SESSION 0x00000080
992 #define DPENUMPLAYERS_SERVERPLAYER 0x00000100
993 #define DPENUMPLAYERS_SPECTATOR 0x00000200
994 #define DPENUMPLAYERS_OWNER 0x00002000
995
996 #define DPENUMGROUPS_ALL DPENUMPLAYERS_ALL
997 #define DPENUMGROUPS_LOCAL DPENUMPLAYERS_LOCAL
998 #define DPENUMGROUPS_REMOTE DPENUMPLAYERS_REMOTE
999 #define DPENUMGROUPS_SESSION DPENUMPLAYERS_SESSION
1000 #define DPENUMGROUPS_SHORTCUT 0x00000400
1001 #define DPENUMGROUPS_STAGINGAREA 0x00000800
1002 #define DPENUMGROUPS_HIDDEN 0x00001000
1003
1004
1005 /* For DirectPlay::CreatePlayer */
1006 #define DPPLAYER_SERVERPLAYER DPENUMPLAYERS_SERVERPLAYER
1007 #define DPPLAYER_SPECTATOR DPENUMPLAYERS_SPECTATOR
1008 #define DPPLAYER_LOCAL DPENUMPLAYERS_LOCAL
1009 #define DPPLAYER_OWNER DPENUMPLAYERS_OWNER
1010
1011 /* For DirectPlay::CreateGroup */
1012 #define DPGROUP_STAGINGAREA DPENUMGROUPS_STAGINGAREA
1013 #define DPGROUP_LOCAL DPENUMGROUPS_LOCAL
1014 #define DPGROUP_HIDDEN DPENUMGROUPS_HIDDEN
1015
1016 /* For DirectPlay::EnumSessions */
1017 #define DPENUMSESSIONS_AVAILABLE 0x00000001
1018 #define DPENUMSESSIONS_ALL 0x00000002
1019 #define DPENUMSESSIONS_ASYNC 0x00000010
1020 #define DPENUMSESSIONS_STOPASYNC 0x00000020
1021 #define DPENUMSESSIONS_PASSWORDREQUIRED 0x00000040
1022 #define DPENUMSESSIONS_RETURNSTATUS 0x00000080
1023
1024 /* For DirectPlay::GetCaps and DirectPlay::GetPlayerCaps */
1025 #define DPGETCAPS_GUARANTEED 0x00000001
1026
1027 /* For DirectPlay::GetGroupData and DirectPlay::GetPlayerData */
1028 #define DPGET_REMOTE 0x00000000
1029 #define DPGET_LOCAL 0x00000001
1030
1031 /* For DirectPlay::Receive */
1032 #define DPRECEIVE_ALL 0x00000001
1033 #define DPRECEIVE_TOPLAYER 0x00000002
1034 #define DPRECEIVE_FROMPLAYER 0x00000004
1035 #define DPRECEIVE_PEEK 0x00000008
1036
1037 /* For DirectPlay::Send */
1038 #define DPSEND_NONGUARANTEED 0x00000000
1039 #define DPSEND_GUARANTEED 0x00000001
1040 #define DPSEND_HIGHPRIORITY 0x00000002
1041 #define DPSEND_OPENSTREAM 0x00000008
1042 #define DPSEND_CLOSESTREAM 0x00000010
1043 #define DPSEND_SIGNED 0x00000020
1044 #define DPSEND_ENCRYPTED 0x00000040
1045 #define DPSEND_LOBBYSYSTEMMESSAGE 0x00000080
1046 #define DPSEND_ASYNC 0x00000200
1047 #define DPSEND_NOSENDCOMPLETEMSG 0x00000400
1048
1049 #define DPSEND_MAX_PRI 0x0000FFFF
1050 #define DPSEND_MAX_PRIORITY DPSEND_MAX_PRI
1051
1052
1053 /* For DirectPlay::SetGroupData, DirectPlay::SetGroupName,
1054 * DirectPlay::SetPlayerData, DirectPlay::SetPlayerName and
1055 * DirectPlay::SetSessionDesc.
1056 */
1057 #define DPSET_REMOTE 0x00000000
1058 #define DPSET_LOCAL 0x00000001
1059 #define DPSET_GUARANTEED 0x00000002
1060
1061 /* For DirectPlay::GetMessageQueue */
1062 #define DPMESSAGEQUEUE_SEND 0x00000001
1063 #define DPMESSAGEQUEUE_RECEIVE 0x00000002
1064
1065 /* DirectPlay::Connect */
1066 #define DPCONNECT_RETURNSTATUS (DPENUMSESSIONS_RETURNSTATUS)
1067
1068 /* DirectPlay::GetCaps and DirectPlay::GetPlayerCaps */
1069 #define DPCAPS_ISHOST 0x00000002
1070 #define DPCAPS_GROUPOPTIMIZED 0x00000008
1071 #define DPCAPS_KEEPALIVEOPTIMIZED 0x00000010
1072 #define DPCAPS_GUARANTEEDOPTIMIZED 0x00000020
1073 #define DPCAPS_GUARANTEEDSUPPORTED 0x00000040
1074 #define DPCAPS_SIGNINGSUPPORTED 0x00000080
1075 #define DPCAPS_ENCRYPTIONSUPPORTED 0x00000100
1076 #define DPPLAYERCAPS_LOCAL 0x00000800
1077 #define DPCAPS_ASYNCCANCELSUPPORTED 0x00001000
1078 #define DPCAPS_ASYNCCANCELALLSUPPORTED 0x00002000
1079 #define DPCAPS_SENDTIMEOUTSUPPORTED 0x00004000
1080 #define DPCAPS_SENDPRIORITYSUPPORTED 0x00008000
1081 #define DPCAPS_ASYNCSUPPORTED 0x00010000
1082
1083 /** DirectPlay system messages **/
1084
1085 /* A new player or group has been created in the session */
1086 #define DPSYS_CREATEPLAYERORGROUP 0x0003
1087
1088 /* A player or group has been deleted from the session */
1089 #define DPSYS_DESTROYPLAYERORGROUP 0x0005
1090
1091 /* A player has been added to a group */
1092 #define DPSYS_ADDPLAYERTOGROUP 0x0007
1093
1094 /* A player has been deleted from a group */
1095 #define DPSYS_DELETEPLAYERFROMGROUP 0x0021
1096
1097 /* Session lost for this object - ie lost contact with all players */
1098 #define DPSYS_SESSIONLOST 0x0031
1099
1100 /* The current host has left the session */
1101 #define DPSYS_HOST 0x0101
1102
1103 /* Player or group data has changed */
1104 #define DPSYS_SETPLAYERORGROUPDATA 0x0102
1105
1106 /* The name of a player or group has changed */
1107 #define DPSYS_SETPLAYERORGROUPNAME 0x0103
1108
1109 /* The session description has changed */
1110 #define DPSYS_SETSESSIONDESC 0x0104
1111
1112 /* A group has been added to a group */
1113 #define DPSYS_ADDGROUPTOGROUP 0x0105
1114
1115 /* A group has been deleted from a group */
1116 #define DPSYS_DELETEGROUPFROMGROUP 0x0106
1117
1118 /* A secure player to player message has arrived */
1119 #define DPSYS_SECUREMESSAGE 0x0107
1120
1121 /* Start a new session */
1122 #define DPSYS_STARTSESSION 0x0108
1123
1124 /* A chat message has arrived */
1125 #define DPSYS_CHAT 0x0109
1126
1127 /* The owner of a group has changed */
1128 #define DPSYS_SETGROUPOWNER 0x010A
1129
1130 /* An async send is done (finished normally, failed or cancelled) */
1131 #define DPSYS_SENDCOMPLETE 0x010d
1132
1133 /** DirectPlay System Messages **/
1134
1135 #define DPPLAYERTYPE_GROUP 0x00000000
1136 #define DPPLAYERTYPE_PLAYER 0x00000001
1137
1138
1139 /* NOTE: DPMSG_HOST and DPMSG_GENERIC share the same format */
1140 typedef struct tagDPMSG_GENERIC
1141 {
1142 DWORD dwType; /* Use message type as described above */
1143 } DPMSG_GENERIC, *LPDPMSG_GENERIC,
1144 DPMSG_HOST, *LPDPMSG_HOST,
1145 DPMSG_SESSIONLOST, *LPDPMSG_SESSIONLOST;
1146
1147 typedef struct tagDPMSG_CREATEPLAYERORGROUP
1148 {
1149 DWORD dwType; /* Use message type as described above */
1150 DWORD dwPlayerType; /* Use DPPLAYERTYPE_GROUP or DPPLAYERTYPE_PLAYER */
1151 DPID dpId; /* ID of the player/group */
1152 DWORD dwCurrentPlayers; /* Current number of players/groups in session */
1153 LPVOID lpData; /* Pointer to data */
1154 DWORD dwDataSize; /* Size of data */
1155 DPNAME dpnName; /* Name info */
1156
1157 /* dpIdParent and dwFlags are only valid in DirectPlay3 and later. What
1158 * does that mean about the message size before? -PH */
1159 DPID dpIdParent; /* id of parent group */
1160 DWORD dwFlags; /* Flags for the player/group */
1161 } DPMSG_CREATEPLAYERORGROUP, *LPDPMSG_CREATEPLAYERORGROUP;
1162
1163 typedef struct tagDPMSG_DESTROYPLAYERORGROUP
1164 {
1165 DWORD dwType; /* Use message type as described above */
1166 DWORD dwPlayerType; /* Use DPPLAYERTYPE_GROUP or DPPLAYERTYPE_PLAYER */
1167 DPID dpId; /* ID of player/group to be deleted */
1168 LPVOID lpLocalData; /* Pointer to local data */
1169 DWORD dwLocalDataSize; /* Sizeof local data */
1170 LPVOID lpRemoteData; /* Pointer to remote data */
1171 DWORD dwRemoteDataSize; /* Sizeof remote data */
1172
1173 /* dpnName, dpIdParent and dwFlags are only valid in DirectPlay3 and later. What
1174 * does that mean about the message size before? -PH */
1175 DPNAME dpnName; /* Name info */
1176 DPID dpIdParent; /* id of parent group */
1177 DWORD dwFlags; /* Flags for the player/group */
1178 } DPMSG_DESTROYPLAYERORGROUP, *LPDPMSG_DESTROYPLAYERORGROUP;
1179
1180 /* NOTE: DPMSG_ADDPLAYERTOGROUP and DPMSG_DELETEPLAYERFROMGROUP are the same */
1181 typedef struct tagDPMSG_ADDPLAYERTOGROUP
1182 {
1183 DWORD dwType; /* Use message type as described above */
1184 DPID dpIdGroup; /* Group ID to add player into */
1185 DPID dpIdPlayer; /* ID of player to add */
1186 } DPMSG_ADDPLAYERTOGROUP, *LPDPMSG_ADDPLAYERTOGROUP,
1187 DPMSG_DELETEPLAYERFROMGROUP, *LPDPMSG_DELETEPLAYERFROMGROUP;
1188
1189 /* NOTE: DPMSG_ADDGROUPTOGROUP and DPMSG_DELETEGROUPFROMGROUP are the same */
1190 typedef struct tagDPMSG_ADDGROUPTOGROUP
1191 {
1192 DWORD dwType; /* Use message type as described above */
1193 DPID dpIdParentGroup; /* Group ID to add group into */
1194 DPID dpIdGroup; /* ID of group to add */
1195 } DPMSG_ADDGROUPTOGROUP, *LPDPMSG_ADDGROUPTOGROUP,
1196 DPMSG_DELETEGROUPFROMGROUP, *LPDPMSG_DELETEGROUPFROMGROUP;
1197
1198 typedef struct tagDPMSG_SETPLAYERORGROUPDATA
1199 {
1200 DWORD dwType; /* Use message type as described above */
1201 DWORD dwPlayerType; /* Use DPPLAYERTYPE_GROUP or DPPLAYERTYPE_PLAYER */
1202 DPID dpId; /* ID of player/group */
1203 LPVOID lpData; /* Pointer to data */
1204 DWORD dwDataSize; /* Size of data */
1205 } DPMSG_SETPLAYERORGROUPDATA, *LPDPMSG_SETPLAYERORGROUPDATA;
1206
1207 typedef struct tagDPMSG_SETPLAYERORGROUPNAME
1208 {
1209 DWORD dwType; /* Use message type as described above */
1210 DWORD dwPlayerType; /* Use DPPLAYERTYPE_GROUP or DPPLAYERTYPE_PLAYER */
1211 DPID dpId; /* ID of player/group */
1212 DPNAME dpnName; /* New name */
1213 } DPMSG_SETPLAYERORGROUPNAME, *LPDPMSG_SETPLAYERORGROUPNAME;
1214
1215 typedef struct tagDPMSG_SETSESSIONDESC
1216 {
1217 DWORD dwType; /* Use message type as described above */
1218 DPSESSIONDESC2 dpDesc; /* New session desc */
1219 } DPMSG_SETSESSIONDESC, *LPDPMSG_SETSESSIONDESC;
1220
1221 typedef struct tagDPMSG_SECUREMESSAGE
1222 {
1223 DWORD dwType; /* Use message type as described above */
1224 DWORD dwFlags; /* Signed/Encrypted */
1225 DPID dpIdFrom; /* ID of from player */
1226 LPVOID lpData; /* Message sent */
1227 DWORD dwDataSize; /* Size of message */
1228 } DPMSG_SECUREMESSAGE, *LPDPMSG_SECUREMESSAGE;
1229
1230 typedef struct tagDPMSG_STARTSESSION
1231 {
1232 DWORD dwType; /* Use message type as described above */
1233 LPDPLCONNECTION lpConn; /* DPLCONNECTION structure */
1234 } DPMSG_STARTSESSION, *LPDPMSG_STARTSESSION;
1235
1236 typedef struct tagDPMSG_CHAT
1237 {
1238 DWORD dwType; /* Use message type as described above */
1239 DWORD dwFlags; /* Message flags */
1240 DPID idFromPlayer; /* ID of sender */
1241 DPID idToPlayer; /* ID of who msg is for */
1242 DPID idToGroup; /* ID of what group msg is for */
1243 LPDPCHAT lpChat; /* Chat message */
1244 } DPMSG_CHAT, *LPDPMSG_CHAT;
1245
1246 typedef struct tagDPMSG_SETGROUPOWNER
1247 {
1248 DWORD dwType; /* Use message type as described above */
1249 DPID idGroup; /* Group ID */
1250 DPID idNewOwner; /* ID of player who now owns group */
1251 DPID idOldOwner; /* ID of player who used to own group */
1252 } DPMSG_SETGROUPOWNER, *LPDPMSG_SETGROUPOWNER;
1253
1254 typedef struct
1255 {
1256 DWORD dwType; /* Use message type as described above */
1257 DPID idFrom; /* ID from */
1258 DPID idTo; /* ID to */
1259 DWORD dwFlags;
1260 DWORD dwPriority;
1261 DWORD dwTimeout;
1262 LPVOID lpvContext;
1263 DWORD dwMsgID;
1264 HRESULT hr;
1265 DWORD dwSendTime; /* When sent ? */
1266 } DPMSG_SENDCOMPLETE, *LPDPMSG_SENDCOMPLETE;
1267
1268
1269
1270 #ifdef __cplusplus
1271 } /* extern "C" */
1272 #endif /* defined(__cplusplus) */
1273
1274 #endif /* __WINE_DPLAY_H */
1275