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