First patch implementing property sheets.
[wine.git] / include / dplay.h
blob6fce9fc4f307ca2af7f85277b3884d34ecdfb4b8
1 #ifndef __WINE_DPLAY_H
2 #define __WINE_DPLAY_H
4 #include "wine/obj_base.h"
6 #pragma pack(1)
8 /*****************************************************************************
9 * Predeclare the interfaces
11 DEFINE_GUID(CLSID_DirectPlay,0xd1eb6d20, 0x8923, 0x11d0, 0x9d, 0x97, 0x0, 0xa0, 0xc9, 0xa, 0x43, 0xcb);
13 DEFINE_GUID(IID_IDirectPlay, 0x5454e9a0, 0xdb65, 0x11ce, 0x92, 0x1c, 0x00, 0xaa, 0x00, 0x6c, 0x49, 0x72);
14 typedef struct IDirectPlay IDirectPlay,*LPDIRECTPLAY;
16 DEFINE_GUID(IID_IDirectPlay2, 0x2b74f7c0, 0x9154, 0x11cf, 0xa9, 0xcd, 0x0, 0xaa, 0x0, 0x68, 0x86, 0xe3);
17 typedef struct IDirectPlay2 IDirectPlay2,*LPDIRECTPLAY2;
19 DEFINE_GUID(IID_IDirectPlay2A,0x9d460580, 0xa822, 0x11cf, 0x96, 0xc, 0x0, 0x80, 0xc7, 0x53, 0x4e, 0x82);
20 typedef struct IDirectPlay2 IDirectPlay2A,*LPDIRECTPLAY2A;
22 DEFINE_GUID(IID_IDirectPlay3, 0x133efe40, 0x32dc, 0x11d0, 0x9c, 0xfb, 0x0, 0xa0, 0xc9, 0xa, 0x43, 0xcb);
23 typedef struct IDirectPlay3 IDirectPlay3,*LPDIRECTPLAY3;
25 DEFINE_GUID(IID_IDirectPlay3A,0x133efe41, 0x32dc, 0x11d0, 0x9c, 0xfb, 0x0, 0xa0, 0xc9, 0xa, 0x43, 0xcb);
26 typedef struct IDirectPlay3 IDirectPlay3A,*LPDIRECTPLAY3A;
29 * GUIDS used by Service Providers shipped with DirectPlay
30 * Use these to identify Service Provider returned by EnumConnections
33 /* GUID for IPX service provider {685BC400-9D2C-11cf-A9CD-00AA006886E3} */
34 DEFINE_GUID(DPSPGUID_IPX, 0x685bc400, 0x9d2c, 0x11cf, 0xa9, 0xcd, 0x0, 0xaa, 0x0, 0x68, 0x86, 0xe3);
36 /* GUID for TCP/IP service provider 36E95EE0-8577-11cf-960C-0080C7534E82 */
37 DEFINE_GUID(DPSPGUID_TCPIP, 0x36E95EE0, 0x8577, 0x11cf, 0x96, 0xc, 0x0, 0x80, 0xc7, 0x53, 0x4e, 0x82);
39 /* GUID for Serial service provider {0F1D6860-88D9-11cf-9C4E-00A0C905425E} */
40 DEFINE_GUID(DPSPGUID_SERIAL, 0xf1d6860, 0x88d9, 0x11cf, 0x9c, 0x4e, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e);
42 /* GUID for Modem service provider {44EAA760-CB68-11cf-9C4E-00A0C905425E} */
43 DEFINE_GUID(DPSPGUID_MODEM, 0x44eaa760, 0xcb68, 0x11cf, 0x9c, 0x4e, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e);
46 /*****************************************************************************
47 * Miscellaneous
50 /* Return Values for Direct Play */
51 #define _FACDP 0x877
52 #define MAKE_DPHRESULT( code ) MAKE_HRESULT( 1, _FACDP, code )
54 #define DP_OK S_OK
55 #define DPERR_ALREADYINITIALIZED MAKE_DPHRESULT( 5 )
56 #define DPERR_ACCESSDENIED MAKE_DPHRESULT( 10 )
57 #define DPERR_ACTIVEPLAYERS MAKE_DPHRESULT( 20 )
58 #define DPERR_BUFFERTOOSMALL MAKE_DPHRESULT( 30 )
59 #define DPERR_CANTADDPLAYER MAKE_DPHRESULT( 40 )
60 #define DPERR_CANTCREATEGROUP MAKE_DPHRESULT( 50 )
61 #define DPERR_CANTCREATEPLAYER MAKE_DPHRESULT( 60 )
62 #define DPERR_CANTCREATESESSION MAKE_DPHRESULT( 70 )
63 #define DPERR_CAPSNOTAVAILABLEYET MAKE_DPHRESULT( 80 )
64 #define DPERR_EXCEPTION MAKE_DPHRESULT( 90 )
65 #define DPERR_GENERIC E_FAIL
66 #define DPERR_INVALIDFLAGS MAKE_DPHRESULT( 120 )
67 #define DPERR_INVALIDOBJECT MAKE_DPHRESULT( 130 )
68 #define DPERR_INVALIDPARAM E_INVALIDARG
69 #define DPERR_INVALIDPARAMS DPERR_INVALIDPARAM
70 #define DPERR_INVALIDPLAYER MAKE_DPHRESULT( 150 )
71 #define DPERR_INVALIDGROUP MAKE_DPHRESULT( 155 )
72 #define DPERR_NOCAPS MAKE_DPHRESULT( 160 )
73 #define DPERR_NOCONNECTION MAKE_DPHRESULT( 170 )
74 #define DPERR_NOMEMORY E_OUTOFMEMORY
75 #define DPERR_OUTOFMEMORY DPERR_NOMEMORY
76 #define DPERR_NOMESSAGES MAKE_DPHRESULT( 190 )
77 #define DPERR_NONAMESERVERFOUND MAKE_DPHRESULT( 200 )
78 #define DPERR_NOPLAYERS MAKE_DPHRESULT( 210 )
79 #define DPERR_NOSESSIONS MAKE_DPHRESULT( 220 )
80 #define DPERR_PENDING E_PENDING
81 #define DPERR_SENDTOOBIG MAKE_DPHRESULT( 230 )
82 #define DPERR_TIMEOUT MAKE_DPHRESULT( 240 )
83 #define DPERR_UNAVAILABLE MAKE_DPHRESULT( 250 )
84 #define DPERR_UNSUPPORTED E_NOTIMPL
85 #define DPERR_BUSY MAKE_DPHRESULT( 270 )
86 #define DPERR_USERCANCEL MAKE_DPHRESULT( 280 )
87 #define DPERR_NOINTERFACE E_NOINTERFACE
88 #define DPERR_CANNOTCREATESERVER MAKE_DPHRESULT( 290 )
89 #define DPERR_PLAYERLOST MAKE_DPHRESULT( 300 )
90 #define DPERR_SESSIONLOST MAKE_DPHRESULT( 310 )
91 #define DPERR_UNINITIALIZED MAKE_DPHRESULT( 320 )
92 #define DPERR_NONEWPLAYERS MAKE_DPHRESULT( 330 )
93 #define DPERR_INVALIDPASSWORD MAKE_DPHRESULT( 340 )
94 #define DPERR_CONNECTING MAKE_DPHRESULT( 350 )
95 #define DPERR_BUFFERTOOLARGE MAKE_DPHRESULT( 1000 )
96 #define DPERR_CANTCREATEPROCESS MAKE_DPHRESULT( 1010 )
97 #define DPERR_APPNOTSTARTED MAKE_DPHRESULT( 1020 )
98 #define DPERR_INVALIDINTERFACE MAKE_DPHRESULT( 1030 )
99 #define DPERR_NOSERVICEPROVIDER MAKE_DPHRESULT( 1040 )
100 #define DPERR_UNKNOWNAPPLICATION MAKE_DPHRESULT( 1050 )
101 #define DPERR_NOTLOBBIED MAKE_DPHRESULT( 1070 )
102 #define DPERR_SERVICEPROVIDERLOADED MAKE_DPHRESULT( 1080 )
103 #define DPERR_ALREADYREGISTERED MAKE_DPHRESULT( 1090 )
104 #define DPERR_NOTREGISTERED MAKE_DPHRESULT( 1100 )
105 #define DPERR_AUTHENTICATIONFAILED MAKE_DPHRESULT( 2000 )
106 #define DPERR_CANTLOADSSPI MAKE_DPHRESULT( 2010 )
107 #define DPERR_ENCRYPTIONFAILED MAKE_DPHRESULT( 2020 )
108 #define DPERR_SIGNFAILED MAKE_DPHRESULT( 2030 )
109 #define DPERR_CANTLOADSECURITYPACKAGE MAKE_DPHRESULT( 2040 )
110 #define DPERR_ENCRYPTIONNOTSUPPORTED MAKE_DPHRESULT( 2050 )
111 #define DPERR_CANTLOADCAPI MAKE_DPHRESULT( 2060 )
112 #define DPERR_NOTLOGGEDIN MAKE_DPHRESULT( 2070 )
113 #define DPERR_LOGONDENIED MAKE_DPHRESULT( 2080 )
116 /* DPID - DirectPlay player and group ID */
117 typedef DWORD DPID, *LPDPID;
119 /* DPID from whence originate messages - just an ID */
120 #define DPID_SYSMSG 0 /* DPID of system */
121 #define DPID_ALLPLAYERS 0 /* DPID of all players */
122 #define DPID_SERVERPLAYER 1 /* DPID of the server player */
123 #define DPID_UNKNOWN 0xFFFFFFFF /* Player ID is unknown */
125 /* DPCAPS - Used to obtain the capabilities of a DirectPlay object */
126 typedef struct tagDPCAPS
128 DWORD dwSize; /* Size of structure in bytes */
129 DWORD dwFlags;
130 DWORD dwMaxBufferSize;
131 DWORD dwMaxQueueSize; /* Obsolete. */
132 DWORD dwMaxPlayers; /* Maximum players/groups (local + remote) */
133 DWORD dwHundredBaud; /* Bandwidth in 100 bits per second units;
134 * i.e. 24 is 2400, 96 is 9600, etc.
136 DWORD dwLatency; /* Estimated latency; 0 = unknown */
137 DWORD dwMaxLocalPlayers; /* Maximum # of locally created players */
138 DWORD dwHeaderLength; /* Maximum header length in bytes */
139 DWORD dwTimeout; /* Service provider's suggested timeout value
140 * This is how long DirectPlay will wait for
141 * responses to system messages
143 } DPCAPS, *LPDPCAPS;
145 typedef struct tagDPNAME
147 DWORD dwSize;
148 DWORD dwFlags; /* Not used must be 0 */
150 union /*playerShortName */ /* Player's Handle? */
152 LPWSTR lpszShortName;
153 LPSTR lpszShortNameA;
154 }psn;
156 union /*playerLongName */ /* Player's formal/real name */
158 LPWSTR lpszLongName;
159 LPSTR lpszLongNameA;
160 }pln;
162 } DPNAME, *LPDPNAME;
164 #define DPLONGNAMELEN 52
165 #define DPSHORTNAMELEN 20
166 #define DPSESSIONNAMELEN 32
167 #define DPPASSWORDLEN 16
168 #define DPUSERRESERVED 16
170 typedef struct tagDPSESSIONDESC
172 DWORD dwSize;
173 GUID guidSession;
174 DWORD dwSession;
175 DWORD dwMaxPlayers;
176 DWORD dwCurrentPlayers;
177 DWORD dwFlags;
178 char szSessionName[ DPSESSIONNAMELEN ];
179 char szUserField[ DPUSERRESERVED ];
180 DWORD dwReserved1;
181 char szPassword[ DPPASSWORDLEN ];
182 DWORD dwReserved2;
183 DWORD dwUser1;
184 DWORD dwUser2;
185 DWORD dwUser3;
186 DWORD dwUser4;
187 } DPSESSIONDESC, *LPDPSESSIONDESC;
189 typedef struct tagDPSESSIONDESC2
191 DWORD dwSize;
192 DWORD dwFlags;
193 GUID guidInstance;
194 GUID guidApplication; /* GUID of the DP application, GUID_NULL if
195 * all applications! */
197 DWORD dwMaxPlayers;
198 DWORD dwCurrentPlayers; /* (read only value) */
200 union /* Session name */
202 LPWSTR lpszSessionName;
203 LPSTR lpszSessionNameA;
204 }sess;
206 union /* Optional password */
208 LPWSTR lpszPassword;
209 LPSTR lpszPasswordA;
210 }pass;
212 DWORD dwReserved1;
213 DWORD dwReserved2;
215 DWORD dwUser1; /* For use by the application */
216 DWORD dwUser2;
217 DWORD dwUser3;
218 DWORD dwUser4;
219 } DPSESSIONDESC2, *LPDPSESSIONDESC2;
220 typedef const DPSESSIONDESC2* LPCDPSESSIONDESC2;
222 #define DPOPEN_JOIN 0x00000001
223 #define DPOPEN_CREATE 0x00000002
224 #define DPOPEN_RETURNSTATUS DPENUMSESSIONS_RETURNSTATUS
226 #define DPSESSION_NEWPLAYERSDISABLED 0x00000001
227 #define DPSESSION_MIGRATEHOST 0x00000004
228 #define DPSESSION_NOMESSAGEID 0x00000008
229 #define DPSESSION_JOINDISABLED 0x00000020
230 #define DPSESSION_KEEPALIVE 0x00000040
231 #define DPSESSION_NODATAMESSAGES 0x00000080
232 #define DPSESSION_SECURESERVER 0x00000100
233 #define DPSESSION_PRIVATE 0x00000200
234 #define DPSESSION_PASSWORDREQUIRED 0x00000400
235 #define DPSESSION_MULTICASTSERVER 0x00000800
236 #define DPSESSION_CLIENTSERVER 0x00001000
238 typedef struct tagDPLCONNECTION
240 DWORD dwSize;
241 DWORD dwFlags;
242 LPDPSESSIONDESC2 lpSessionDesc; /* Ptr to session desc to use for connect */
243 LPDPNAME lpPlayerName; /* Ptr to player name structure */
244 GUID guidSP; /* GUID of Service Provider to use */
245 LPVOID lpAddress; /* Ptr to Address of Service Provider to use */
246 DWORD dwAddressSize; /* Size of address data */
247 } DPLCONNECTION, *LPDPLCONNECTION;
249 /* DPLCONNECTION flags (for dwFlags) */
250 #define DPLCONNECTION_CREATESESSION DPOPEN_CREATE
251 #define DPLCONNECTION_JOINSESSION DPOPEN_JOIN
253 typedef struct tagDPCHAT
255 DWORD dwSize;
256 DWORD dwFlags;
257 union
258 { /* Message string */
259 LPWSTR lpszMessage; /* Unicode */
260 LPSTR lpszMessageA; /* ANSI */
261 }msgstr;
262 } DPCHAT, *LPDPCHAT;
264 typedef struct tagDPSECURITYDESC
266 DWORD dwSize; /* Size of structure */
267 DWORD dwFlags; /* Not used. Must be zero. */
268 union
269 { /* SSPI provider name */
270 LPWSTR lpszSSPIProvider; /* Unicode */
271 LPSTR lpszSSPIProviderA; /* ANSI */
272 }sspi;
273 union
274 { /* CAPI provider name */
275 LPWSTR lpszCAPIProvider; /* Unicode */
276 LPSTR lpszCAPIProviderA; /* ANSI */
277 }capi;
278 DWORD dwCAPIProviderType; /* Crypto Service Provider type */
279 DWORD dwEncryptionAlgorithm; /* Encryption Algorithm type */
280 } DPSECURITYDESC, *LPDPSECURITYDESC;
282 typedef const DPSECURITYDESC *LPCDPSECURITYDESC;
284 typedef struct tagDPCREDENTIALS
286 DWORD dwSize; /* Size of structure */
287 DWORD dwFlags; /* Not used. Must be zero. */
288 union
289 { /* User name of the account */
290 LPWSTR lpszUsername; /* Unicode */
291 LPSTR lpszUsernameA; /* ANSI */
292 }name;
293 union
294 { /* Password of the account */
295 LPWSTR lpszPassword; /* Unicode */
296 LPSTR lpszPasswordA; /* ANSI */
297 }pass;
298 union
299 { /* Domain name of the account */
300 LPWSTR lpszDomain; /* Unicode */
301 LPSTR lpszDomainA; /* ANSI */
302 }domain;
303 } DPCREDENTIALS, *LPDPCREDENTIALS;
305 typedef const DPCREDENTIALS *LPCDPCREDENTIALS;
309 typedef BOOL (CALLBACK* LPDPENUMDPCALLBACKW)(
310 LPGUID lpguidSP,
311 LPWSTR lpSPName,
312 DWORD dwMajorVersion,
313 DWORD dwMinorVersion,
314 LPVOID lpContext);
316 typedef BOOL (CALLBACK* LPDPENUMDPCALLBACKA)(
317 LPGUID lpguidSP,
318 LPSTR lpSPName, /* ptr to str w/ driver description */
319 DWORD dwMajorVersion, /* Major # of driver spec in lpguidSP */
320 DWORD dwMinorVersion, /* Minor # of driver spec in lpguidSP */
321 LPVOID lpContext); /* User given */
323 typedef const GUID *LPCGUID;
324 typedef const DPNAME *LPCDPNAME;
326 typedef BOOL (CALLBACK* LPDPENUMCONNECTIONSCALLBACK)(
327 LPCGUID lpguidSP,
328 LPVOID lpConnection,
329 DWORD dwConnectionSize,
330 LPCDPNAME lpName,
331 DWORD dwFlags,
332 LPVOID lpContext);
334 typedef BOOL (CALLBACK* LPDPENUMSESSIONSCALLBACK)(
335 LPDPSESSIONDESC lpDPSessionDesc,
336 LPVOID lpContext,
337 LPDWORD lpdwTimeOut,
338 DWORD dwFlags);
341 extern HRESULT WINAPI DirectPlayEnumerateA( LPDPENUMDPCALLBACKA, LPVOID );
342 extern HRESULT WINAPI DirectPlayEnumerateW( LPDPENUMDPCALLBACKW, LPVOID );
343 extern HRESULT WINAPI DirectPlayCreate( LPGUID lpGUID, LPDIRECTPLAY2 *lplpDP, IUnknown *pUnk);
345 typedef BOOL (CALLBACK* LPDPENUMPLAYERSCALLBACK)(
346 DPID dpId,
347 LPSTR lpFriendlyName,
348 LPSTR lpFormalName,
349 DWORD dwFlags,
350 LPVOID lpContext );
352 typedef BOOL (CALLBACK* LPDPENUMPLAYERSCALLBACK2)(
353 DPID dpId,
354 DWORD dwPlayerType,
355 LPCDPNAME lpName,
356 DWORD dwFlags,
357 LPVOID lpContext );
359 typedef BOOL (CALLBACK* LPDPENUMSESSIONSCALLBACK2)(
360 LPCDPSESSIONDESC2 lpThisSD,
361 LPDWORD lpdwTimeOut,
362 DWORD dwFlags,
363 LPVOID lpContext );
366 /*****************************************************************************
367 * IDirectPlay interface
369 #define ICOM_INTERFACE IDirectPlay
370 #define IDirectPlay_METHODS \
371 ICOM_METHOD2(HRESULT,AddPlayerToGroup, DPID,idGroup, DPID,idPlayer) \
372 ICOM_METHOD (HRESULT,Close) \
373 ICOM_METHOD4(HRESULT,CreatePlayer, LPDPID,lpidPlayer, LPSTR,lpPlayerName, LPSTR,, LPHANDLE,) \
374 ICOM_METHOD3(HRESULT,CreateGroup, LPDPID,lpidGroup, LPSTR,lpGroupName, LPSTR,) \
375 ICOM_METHOD2(HRESULT,DeletePlayerFromGroup, DPID,idGroup, DPID,idPlayer) \
376 ICOM_METHOD1(HRESULT,DestroyPlayer, DPID,idPlayer) \
377 ICOM_METHOD1(HRESULT,DestroyGroup, DPID,idGroup) \
378 ICOM_METHOD1(HRESULT,EnableNewPlayers, BOOL,) \
379 ICOM_METHOD4(HRESULT,EnumGroupPlayers, DPID,idGroup, LPDPENUMPLAYERSCALLBACK,lpEnumPlayersCallback, LPVOID,lpContext, DWORD,dwFlags) \
380 ICOM_METHOD4(HRESULT,EnumGroups, DWORD,, LPDPENUMPLAYERSCALLBACK,lpEnumPlayersCallback, LPVOID,lpContext, DWORD,dwFlags) \
381 ICOM_METHOD4(HRESULT,EnumPlayers, DWORD,, LPDPENUMPLAYERSCALLBACK,lpEnumPlayersCallback, LPVOID,lpContext, DWORD,dwFlags) \
382 ICOM_METHOD5(HRESULT,EnumSessions, LPDPSESSIONDESC,lpsd, DWORD,dwTimeout, LPDPENUMSESSIONSCALLBACK,lpEnumSessionsCallback, LPVOID,lpContext, DWORD,dwFlags) \
383 ICOM_METHOD1(HRESULT,GetCaps, LPDPCAPS,lpDPCaps) \
384 ICOM_METHOD2(HRESULT,GetMessageCount, DPID,idPlayer, LPDWORD,lpdwCount) \
385 ICOM_METHOD2(HRESULT,GetPlayerCaps, DPID,idPlayer, LPDPCAPS,lpPlayerCaps) \
386 ICOM_METHOD5(HRESULT,GetPlayerName, DPID,idPlayer, LPSTR,, LPDWORD,, LPSTR,, LPDWORD,) \
387 ICOM_METHOD1(HRESULT,Initialize, LPGUID,lpGUID) \
388 ICOM_METHOD1(HRESULT,Open, LPDPSESSIONDESC,lpsd) \
389 ICOM_METHOD5(HRESULT,Receive, LPDPID,lpidFrom, LPDPID,lpidTo, DWORD,dwFlags, LPVOID,lpData, LPDWORD,lpdwDataSize) \
390 ICOM_METHOD1(HRESULT,SaveSession, LPSTR,) \
391 ICOM_METHOD5(HRESULT,Send, DPID,idFrom, DPID,idTo, DWORD,dwFlags, LPVOID,lpData, DWORD,dwDataSize) \
392 ICOM_METHOD3(HRESULT,SetPlayerName, DPID,idPlayer, LPSTR,lpPlayerName, LPSTR,)
393 #define IDirectPlay_IMETHODS \
394 IUnknown_IMETHODS \
395 IDirectPlay_METHODS
396 ICOM_DEFINE(IDirectPlay,IUnknown)
397 #undef ICOM_INTERFACE
399 #ifdef ICOM_CINTERFACE
400 /*** IUnknown methods ***/
401 #define IDirectPlay_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
402 #define IDirectPlay_AddRef(p) ICOM_CALL (AddRef,p)
403 #define IDirectPlay_Release(p) ICOM_CALL (Release,p)
404 /*** IDirectPlay methods ***/
405 #define IDirectPlay_AddPlayerToGroup(p,a,b) ICOM_CALL2(AddPlayerToGroup,p,a,b)
406 #define IDirectPlay_Close(p) ICOM_CALL (Close,p)
407 #define IDirectPlay_CreatePlayer(p,a,b,c,d) ICOM_CALL4(CreatePlayer,p,a,b,c,d)
408 #define IDirectPlay_CreateGroup(p,a,b,c) ICOM_CALL3(CreateGroup,p,a,b,c)
409 #define IDirectPlay_DeletePlayerFromGroup(p,a,b) ICOM_CALL2(DeletePlayerFromGroup,p,a,b)
410 #define IDirectPlay_DestroyPlayer(p,a) ICOM_CALL1(DestroyPlayer,p,a)
411 #define IDirectPlay_DestroyGroup(p,a) ICOM_CALL1(DestroyGroup,p,a)
412 #define IDirectPlay_EnableNewPlayers(p,a) ICOM_CALL1(EnableNewPlayers,p,a)
413 #define IDirectPlay_EnumGroupPlayers(p,a,b,c,d) ICOM_CALL4(EnumGroupPlayers,p,a,b,c,d)
414 #define IDirectPlay_EnumGroups(p,a,b,c,d) ICOM_CALL4(EnumGroups,p,a,b,c,d)
415 #define IDirectPlay_EnumPlayers(p,a,b,c,d) ICOM_CALL4(EnumPlayers,p,a,b,c,d)
416 #define IDirectPlay_EnumSessions(p,a,b,c,d,e) ICOM_CALL5(EnumSessions,p,a,b,c,d,e)
417 #define IDirectPlay_GetCaps(p,a) ICOM_CALL1(GetCaps,p,a)
418 #define IDirectPlay_GetMessageCount(p,a,b) ICOM_CALL2(GetMessageCount,p,a,b)
419 #define IDirectPlay_GetPlayerCaps(p,a,b) ICOM_CALL2(GetPlayerCaps,p,a,b)
420 #define IDirectPlay_GetPlayerName(p,a,b,c,d,e) ICOM_CALL5(GetPlayerName,p,a,b,c,d,e)
421 #define IDirectPlay_Initialize(p,a) ICOM_CALL1(Initialize,p,a)
422 #define IDirectPlay_Open(p,a) ICOM_CALL1(Open,p,a)
423 #define IDirectPlay_Receive(p,a,b,c,d,e) ICOM_CALL5(Receive,p,a,b,c,d,e)
424 #define IDirectPlay_SaveSession(p,a) ICOM_CALL1(SaveSession,p,a)
425 #define IDirectPlay_Send(p,a,b,c,d,e) ICOM_CALL5(Send,p,a,b,c,d,e)
426 #define IDirectPlay_SetPlayerName(p,a,b,c) ICOM_CALL3(SetPlayerName,p,a,b,c)
427 #endif
430 /*****************************************************************************
431 * IDirectPlay2 interface
433 #define ICOM_INTERFACE IDirectPlay2
434 #define IDirectPlay2_METHODS \
435 ICOM_METHOD2(HRESULT,AddPlayerToGroup, DPID,idGroup, DPID,idPlayer) \
436 ICOM_METHOD (HRESULT,Close) \
437 ICOM_METHOD5(HRESULT,CreateGroup, LPDPID,lpidGroup, LPDPNAME,lpGroupName, LPVOID,lpData, DWORD,dwDataSize, DWORD,dwFlags) \
438 ICOM_METHOD6(HRESULT,CreatePlayer, LPDPID,lpidPlayer, LPDPNAME,lpPlayerName, HANDLE,hEvent, LPVOID,lpData, DWORD,dwDataSize, DWORD,dwFlags) \
439 ICOM_METHOD2(HRESULT,DeletePlayerFromGroup, DPID,idGroup, DPID,idPlayer) \
440 ICOM_METHOD1(HRESULT,DestroyGroup, DPID,idGroup) \
441 ICOM_METHOD1(HRESULT,DestroyPlayer, DPID,idPlayer) \
442 ICOM_METHOD5(HRESULT,EnumGroupPlayers, DPID,idGroup, LPGUID,lpguidInstance, LPDPENUMPLAYERSCALLBACK2,lpEnumPlayersCallback2, LPVOID,lpContext, DWORD,dwFlags) \
443 ICOM_METHOD4(HRESULT,EnumGroups, LPGUID,lpguidInstance, LPDPENUMPLAYERSCALLBACK2,lpEnumPlayersCallback2, LPVOID,lpContext, DWORD,dwFlags) \
444 ICOM_METHOD4(HRESULT,EnumPlayers, LPGUID,lpguidInstance, LPDPENUMPLAYERSCALLBACK2,lpEnumPlayersCallback2, LPVOID,lpContext, DWORD,dwFlags) \
445 ICOM_METHOD5(HRESULT,EnumSessions, LPDPSESSIONDESC2,lpsd, DWORD,dwTimeout, LPDPENUMSESSIONSCALLBACK2,lpEnumSessionsCallback2, LPVOID,lpContext, DWORD,dwFlags) \
446 ICOM_METHOD2(HRESULT,GetCaps, LPDPCAPS,lpDPCaps, DWORD,dwFlags) \
447 ICOM_METHOD4(HRESULT,GetGroupData, DPID,idGroup, LPVOID,lpData, LPDWORD,lpdwDataSize, DWORD,dwFlags) \
448 ICOM_METHOD3(HRESULT,GetGroupName, DPID,idGroup, LPVOID,lpData, LPDWORD,lpdwDataSize) \
449 ICOM_METHOD2(HRESULT,GetMessageCount, DPID,idPlayer, LPDWORD,lpdwCount) \
450 ICOM_METHOD3(HRESULT,GetPlayerAddress, DPID,idPlayer, LPVOID,lpData, LPDWORD,lpdwDataSize) \
451 ICOM_METHOD3(HRESULT,GetPlayerCaps, DPID,idPlayer, LPDPCAPS,lpPlayerCaps, DWORD,dwFlags) \
452 ICOM_METHOD4(HRESULT,GetPlayerData, DPID,idPlayer, LPVOID,lpData, LPDWORD,lpdwDataSize, DWORD,dwFlags) \
453 ICOM_METHOD3(HRESULT,GetPlayerName, DPID,idPlayer, LPVOID,lpData, LPDWORD,lpdwDataSize) \
454 ICOM_METHOD2(HRESULT,GetSessionDesc, LPVOID,lpData, LPDWORD,lpdwDataSize) \
455 ICOM_METHOD1(HRESULT,Initialize, LPGUID,lpGUID) \
456 ICOM_METHOD2(HRESULT,Open, LPDPSESSIONDESC2,lpsd, DWORD,dwFlags) \
457 ICOM_METHOD5(HRESULT,Receive, LPDPID,lpidFrom, LPDPID,lpidTo, DWORD,dwFlags, LPVOID,lpData, LPDWORD,lpdwDataSize) \
458 ICOM_METHOD5(HRESULT,Send, DPID,idFrom, DPID,idTo, DWORD,dwFlags, LPVOID,lpData, DWORD,dwDataSize) \
459 ICOM_METHOD4(HRESULT,SetGroupData, DPID,idGroup, LPVOID,lpData, DWORD,dwDataSize, DWORD,dwFlags) \
460 ICOM_METHOD3(HRESULT,SetGroupName, DPID,idGroup, LPDPNAME,lpGroupName, DWORD,dwFlags) \
461 ICOM_METHOD4(HRESULT,SetPlayerData, DPID,idPlayer, LPVOID,lpData, DWORD,dwDataSize, DWORD,dwFlags) \
462 ICOM_METHOD3(HRESULT,SetPlayerName, DPID,idPlayer, LPDPNAME,lpPlayerName, DWORD,dwFlags) \
463 ICOM_METHOD2(HRESULT,SetSessionDesc, LPDPSESSIONDESC2,lpSessDesc, DWORD,dwFlags)
464 #define IDirectPlay2_IMETHODS \
465 IUnknown_IMETHODS \
466 IDirectPlay2_METHODS
467 ICOM_DEFINE(IDirectPlay2,IUnknown)
468 #undef ICOM_INTERFACE
470 #ifdef ICOM_CINTERFACE
471 /*** IUnknown methods ***/
472 #define IDirectPlay2_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
473 #define IDirectPlay2_AddRef(p) ICOM_CALL (AddRef,p)
474 #define IDirectPlay2_Release(p) ICOM_CALL (Release,p)
475 /*** IDirectPlay2 methods ***/
476 #define IDirectPlay2_AddPlayerToGroup(p,a,b) ICOM_CALL2(AddPlayerToGroup,p,a,b)
477 #define IDirectPlay2_Close(p) ICOM_CALL (Close,p)
478 #define IDirectPlay2_CreateGroup(p,a,b,c,d,e) ICOM_CALL5(CreateGroup,p,a,b,c,d,e)
479 #define IDirectPlay2_CreatePlayer(p,a,b,c,d,e,f) ICOM_CALL6(CreatePlayer,p,a,b,c,d,e,f)
480 #define IDirectPlay2_DeletePlayerFromGroup(p,a,b) ICOM_CALL2(DeletePlayerFromGroup,p,a,b)
481 #define IDirectPlay2_DestroyGroup(p,a) ICOM_CALL1(DestroyGroup,p,a)
482 #define IDirectPlay2_DestroyPlayer(p,a) ICOM_CALL1(DestroyPlayer,p,a)
483 #define IDirectPlay2_EnumGroupPlayers(p,a,b,c,d,e) ICOM_CALL5(EnumGroupPlayers,p,a,b,c,d,e)
484 #define IDirectPlay2_EnumGroups(p,a,b,c,d) ICOM_CALL4(EnumGroups,p,a,b,c,d)
485 #define IDirectPlay2_EnumPlayers(p,a,b,c,d) ICOM_CALL4(EnumPlayers,p,a,b,c,d)
486 #define IDirectPlay2_EnumSessions(p,a,b,c,d,e) ICOM_CALL5(EnumSessions,p,a,b,c,d,e)
487 #define IDirectPlay2_GetCaps(p,a,b) ICOM_CALL2(GetCaps,p,a,b)
488 #define IDirectPlay2_GetGroupData(p,a,b,c,d) ICOM_CALL4(GetGroupData,p,a,b,c,d)
489 #define IDirectPlay2_GetGroupName(p,a,b,c) ICOM_CALL3(GetGroupName,p,a,b,c)
490 #define IDirectPlay2_GetMessageCount(p,a,b) ICOM_CALL2(GetMessageCount,p,a,b)
491 #define IDirectPlay2_GetPlayerAddress(p,a,b,c) ICOM_CALL3(GetPlayerAddress,p,a,b,c)
492 #define IDirectPlay2_GetPlayerCaps(p,a,b,c) ICOM_CALL3(GetPlayerCaps,p,a,b,c)
493 #define IDirectPlay2_GetPlayerData(p,a,b,c,d) ICOM_CALL4(GetPlayerData,p,a,b,c,d)
494 #define IDirectPlay2_GetPlayerName(p,a,b,c) ICOM_CALL3(GetPlayerName,p,a,b,c)
495 #define IDirectPlay2_GetSessionDesc(p,a,b) ICOM_CALL2(GetSessionDesc,p,a,b)
496 #define IDirectPlay2_Initialize(p,a) ICOM_CALL1(Initialize,p,a)
497 #define IDirectPlay2_Open(p,a,b) ICOM_CALL2(Open,p,a,b)
498 #define IDirectPlay2_Receive(p,a,b,c,d,e) ICOM_CALL5(Receive,p,a,b,c,d,e)
499 #define IDirectPlay2_Send(p,a,b,c,d,e) ICOM_CALL5(Send,p,a,b,c,d,e)
500 #define IDirectPlay2_SetGroupData(p,a,b,c,d) ICOM_CALL4(SetGroupData,p,a,b,c,d)
501 #define IDirectPlay2_SetGroupName(p,a,b,c) ICOM_CALL3(SetGroupName,p,a,b,c)
502 #define IDirectPlay2_SetPlayerData(p,a,b,c,d) ICOM_CALL4(SetPlayerData,p,a,b,c,d)
503 #define IDirectPlay2_SetPlayerName(p,a,b,c) ICOM_CALL3(SetPlayerName,p,a,b,c)
504 #define IDirectPlay2_SetSessionDesc(p,a,b) ICOM_CALL2(SetSessionDesc,p,a,b)
505 #endif
508 /*****************************************************************************
509 * IDirectPlay3 interface
511 #define ICOM_INTERFACE IDirectPlay3
512 #define IDirectPlay3_METHODS \
513 ICOM_METHOD2(HRESULT,AddGroupToGroup, DPID,idParentGroup, DPID,idGroup) \
514 ICOM_METHOD6(HRESULT,CreateGroupInGroup, DPID,idParentGroup, LPDPID,lpidGroup, LPDPNAME,lpGroupName, LPVOID,lpData, DWORD,dwDataSize, DWORD,dwFlags) \
515 ICOM_METHOD2(HRESULT,DeleteGroupFromGroup, DPID,idParentGroup, DPID,idGroup) \
516 ICOM_METHOD4(HRESULT,EnumConnections, LPCGUID,lpguidApplication, LPDPENUMCONNECTIONSCALLBACK,lpEnumCallback, LPVOID,lpContext, DWORD,dwFlags) \
517 ICOM_METHOD5(HRESULT,EnumGroupsInGroup, DPID,idGroup, LPGUID,lpguidInstance, LPDPENUMPLAYERSCALLBACK2,lpEnumCallback, LPVOID,lpContext, DWORD,dwFlags) \
518 ICOM_METHOD4(HRESULT,GetGroupConnectionSettings, DWORD,dwFlags, DPID,idGroup, LPVOID,lpData, LPDWORD,lpdwDataSize) \
519 ICOM_METHOD2(HRESULT,InitializeConnection, LPVOID,lpConnection, DWORD,dwFlags) \
520 ICOM_METHOD4(HRESULT,SecureOpen, LPCDPSESSIONDESC2,lpsd, DWORD,dwFlags, LPCDPSECURITYDESC,lpSecurity, LPCDPCREDENTIALS,lpCredentials) \
521 ICOM_METHOD4(HRESULT,SendChatMessage, DPID,idFrom, DPID,idTo, DWORD,dwFlags, LPDPCHAT,lpChatMessage) \
522 ICOM_METHOD3(HRESULT,SetGroupConnectionSettings, DWORD,dwFlags, DPID,idGroup, LPDPLCONNECTION,lpConnection) \
523 ICOM_METHOD2(HRESULT,StartSession, DWORD,dwFlags, DPID,idGroup) \
524 ICOM_METHOD2(HRESULT,GetGroupFlags, DPID,idGroup, LPDWORD,lpdwFlags) \
525 ICOM_METHOD2(HRESULT,GetGroupParent, DPID,idGroup, LPDPID,lpidParent) \
526 ICOM_METHOD4(HRESULT,GetPlayerAccount, DPID,idPlayer, DWORD,dwFlags, LPVOID,lpData, LPDWORD,lpdwDataSize) \
527 ICOM_METHOD2(HRESULT,GetPlayerFlags, DPID,idPlayer, LPDWORD,lpdwFlags)
528 #define IDirectPlay3_IMETHODS \
529 IDirectPlay2_IMETHODS \
530 IDirectPlay3_METHODS
531 ICOM_DEFINE(IDirectPlay3,IDirectPlay2)
532 #undef ICOM_INTERFACE
534 #ifdef ICOM_CINTERFACE
535 /*** IUnknown methods ***/
536 #define IDirectPlay3_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
537 #define IDirectPlay3_AddRef(p) ICOM_CALL (AddRef,p)
538 #define IDirectPlay3_Release(p) ICOM_CALL (Release,p)
539 /*** IDirectPlay2 methods ***/
540 #define IDirectPlay3_AddPlayerToGroup(p,a,b) ICOM_CALL2(AddPlayerToGroup,p,a,b)
541 #define IDirectPlay3_Close(p) ICOM_CALL (Close,p)
542 #define IDirectPlay3_CreateGroup(p,a,b,c,d,e) ICOM_CALL5(CreateGroup,p,a,b,c,d,e)
543 #define IDirectPlay3_CreatePlayer(p,a,b,c,d,e,f) ICOM_CALL6(CreatePlayer,p,a,b,c,d,e,f)
544 #define IDirectPlay3_DeletePlayerFromGroup(p,a,b) ICOM_CALL2(DeletePlayerFromGroup,p,a,b)
545 #define IDirectPlay3_DestroyGroup(p,a) ICOM_CALL1(DestroyGroup,p,a)
546 #define IDirectPlay3_DestroyPlayer(p,a) ICOM_CALL1(DestroyPlayer,p,a)
547 #define IDirectPlay3_EnumGroupPlayers(p,a,b,c,d,e) ICOM_CALL5(EnumGroupPlayers,p,a,b,c,d,e)
548 #define IDirectPlay3_EnumGroups(p,a,b,c,d) ICOM_CALL4(EnumGroups,p,a,b,c,d)
549 #define IDirectPlay3_EnumPlayers(p,a,b,c,d) ICOM_CALL4(EnumPlayers,p,a,b,c,d)
550 #define IDirectPlay3_EnumSessions(p,a,b,c,d,e) ICOM_CALL5(EnumSessions,p,a,b,c,d,e)
551 #define IDirectPlay3_GetCaps(p,a,b) ICOM_CALL2(GetCaps,p,a,b)
552 #define IDirectPlay3_GetGroupData(p,a,b,c,d) ICOM_CALL4(GetGroupData,p,a,b,c,d)
553 #define IDirectPlay3_GetGroupName(p,a,b,c) ICOM_CALL3(GetGroupName,p,a,b,c)
554 #define IDirectPlay3_GetMessageCount(p,a,b) ICOM_CALL2(GetMessageCount,p,a,b)
555 #define IDirectPlay3_GetPlayerAddress(p,a,b,c) ICOM_CALL3(GetPlayerAddress,p,a,b,c)
556 #define IDirectPlay3_GetPlayerCaps(p,a,b,c) ICOM_CALL3(GetPlayerCaps,p,a,b,c)
557 #define IDirectPlay3_GetPlayerData(p,a,b,c,d) ICOM_CALL4(GetPlayerData,p,a,b,c,d)
558 #define IDirectPlay3_GetPlayerName(p,a,b,c) ICOM_CALL3(GetPlayerName,p,a,b,c)
559 #define IDirectPlay3_GetSessionDesc(p,a,b) ICOM_CALL2(GetSessionDesc,p,a,b)
560 #define IDirectPlay3_Initialize(p,a) ICOM_CALL1(Initialize,p,a)
561 #define IDirectPlay3_Open(p,a,b) ICOM_CALL2(Open,p,a,b)
562 #define IDirectPlay3_Receive(p,a,b,c,d,e) ICOM_CALL5(Receive,p,a,b,c,d,e)
563 #define IDirectPlay3_Send(p,a,b,c,d,e) ICOM_CALL5(Send,p,a,b,c,d,e)
564 #define IDirectPlay3_SetGroupData(p,a,b,c,d) ICOM_CALL4(SetGroupData,p,a,b,c,d)
565 #define IDirectPlay3_SetGroupName(p,a,b,c) ICOM_CALL3(SetGroupName,p,a,b,c)
566 #define IDirectPlay3_SetPlayerData(p,a,b,c,d) ICOM_CALL4(SetPlayerData,p,a,b,c,d)
567 #define IDirectPlay3_SetPlayerName(p,a,b,c) ICOM_CALL3(SetPlayerName,p,a,b,c)
568 #define IDirectPlay3_SetSessionDesc(p,a,b) ICOM_CALL2(SetSessionDesc,p,a,b)
569 /*** IDirectPlay3 methods ***/
570 #define IDirectPlay3_AddGroupToGroup(p,a,b) ICOM_CALL2(AddGroupToGroup,p,a,b)
571 #define IDirectPlay3_CreateGroupInGroup(p,a,b,c,d,e,f) ICOM_CALL6(CreateGroupInGroup,p,a,b,c,d,e,f)
572 #define IDirectPlay3_DeleteGroupFromGroup(p,a,b) ICOM_CALL2(DeleteGroupFromGroup,p,a,b)
573 #define IDirectPlay3_EnumConnections(p,a,b,c,d) ICOM_CALL4(EnumConnections,p,a,b,c,d)
574 #define IDirectPlay3_EnumGroupsInGroup(p,a,b,c,d,e) ICOM_CALL5(EnumGroupsInGroup,p,a,b,c,d,e)
575 #define IDirectPlay3_GetGroupConnectionSettings(p,a,b,c,d) ICOM_CALL4(GetGroupConnectionSettings,p,a,b,c,d)
576 #define IDirectPlay3_InitializeConnection(p,a,b) ICOM_CALL2(InitializeConnection,p,a,b)
577 #define IDirectPlay3_SecureOpen(p,a,b,c,d) ICOM_CALL4(SecureOpen,p,a,b,c,d)
578 #define IDirectPlay3_SendChatMessage(p,a,b,c,d) ICOM_CALL4(SendChatMessage,p,a,b,c,d)
579 #define IDirectPlay3_SetGroupConnectionSettings(p,a,b,c) ICOM_CALL3(SetGroupConnectionSettings,p,a,b,c)
580 #define IDirectPlay3_StartSession(p,a,b) ICOM_CALL2(StartSession,p,a,b)
581 #define IDirectPlay3_GetGroupFlags(p,a,b) ICOM_CALL2(GetGroupFlags,p,a,b)
582 #define IDirectPlay3_GetGroupParent(p,a,b) ICOM_CALL2(GetGroupParent,p,a,b)
583 #define IDirectPlay3_GetPlayerAccount(p,a,b,c,d) ICOM_CALL4(GetPlayerAccount,p,a,b,c,d)
584 #define IDirectPlay3_GetPlayerFlags(p,a,b) ICOM_CALL2(GetPlayerFlags,p,a,b)
585 #endif
588 #pragma pack(4)
590 #endif /* __WINE_DPLAY_H */