1 /*==========================================================================;
3 * Copyright (C) 1994-1997 Microsoft Corporation. All Rights Reserved.
6 * Content: DirectPlay include file
8 ***************************************************************************/
10 #ifndef __DPLAY_INCLUDED__
11 #define __DPLAY_INCLUDED__
13 #include <ole2.h> // for DECLARE_INTERFACE and HRESULT
16 #define MAKE_DPHRESULT( code ) MAKE_HRESULT( 1, _FACDP, code )
23 * GUIDS used by DirectPlay objects
25 DEFINE_GUID(IID_IDirectPlay2, 0x2b74f7c0, 0x9154, 0x11cf, 0xa9, 0xcd, 0x0, 0xaa, 0x0, 0x68, 0x86, 0xe3);
26 DEFINE_GUID(IID_IDirectPlay2A,0x9d460580, 0xa822, 0x11cf, 0x96, 0xc, 0x0, 0x80, 0xc7, 0x53, 0x4e, 0x82);
28 DEFINE_GUID(IID_IDirectPlay3, 0x133efe40, 0x32dc, 0x11d0, 0x9c, 0xfb, 0x0, 0xa0, 0xc9, 0xa, 0x43, 0xcb);
29 DEFINE_GUID(IID_IDirectPlay3A,0x133efe41, 0x32dc, 0x11d0, 0x9c, 0xfb, 0x0, 0xa0, 0xc9, 0xa, 0x43, 0xcb);
31 // {D1EB6D20-8923-11d0-9D97-00A0C90A43CB}
32 DEFINE_GUID(CLSID_DirectPlay,0xd1eb6d20, 0x8923, 0x11d0, 0x9d, 0x97, 0x0, 0xa0, 0xc9, 0xa, 0x43, 0xcb);
35 * GUIDS used by Service Providers shipped with DirectPlay
36 * Use these to identify Service Provider returned by EnumConnections
39 // GUID for IPX service provider
40 // {685BC400-9D2C-11cf-A9CD-00AA006886E3}
41 DEFINE_GUID(DPSPGUID_IPX,
42 0x685bc400, 0x9d2c, 0x11cf, 0xa9, 0xcd, 0x0, 0xaa, 0x0, 0x68, 0x86, 0xe3);
44 // GUID for TCP/IP service provider
45 // 36E95EE0-8577-11cf-960C-0080C7534E82
46 DEFINE_GUID(DPSPGUID_TCPIP,
47 0x36E95EE0, 0x8577, 0x11cf, 0x96, 0xc, 0x0, 0x80, 0xc7, 0x53, 0x4e, 0x82);
49 // GUID for Serial service provider
50 // {0F1D6860-88D9-11cf-9C4E-00A0C905425E}
51 DEFINE_GUID(DPSPGUID_SERIAL,
52 0xf1d6860, 0x88d9, 0x11cf, 0x9c, 0x4e, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e);
54 // GUID for Modem service provider
55 // {44EAA760-CB68-11cf-9C4E-00A0C905425E}
56 DEFINE_GUID(DPSPGUID_MODEM,
57 0x44eaa760, 0xcb68, 0x11cf, 0x9c, 0x4e, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e);
59 /****************************************************************************
61 * DirectPlay Structures
63 * Various structures used to invoke DirectPlay.
65 ****************************************************************************/
67 #ifndef IDIRECTPLAY2_OR_GREATER
68 typedef struct IDirectPlay FAR *LPDIRECTPLAY;
70 typedef struct IUnknown FAR *LPDIRECTPLAY;
73 typedef struct IDirectPlay2 FAR *LPDIRECTPLAY2;
74 typedef struct IDirectPlay2 FAR *LPDIRECTPLAY2A;
75 typedef struct IDirectPlay2 IDirectPlay2A;
77 typedef struct IDirectPlay3 FAR *LPDIRECTPLAY3;
78 typedef struct IDirectPlay3 FAR *LPDIRECTPLAY3A;
79 typedef struct IDirectPlay3 IDirectPlay3A;
83 * DirectPlay player and group ID
85 typedef DWORD DPID, FAR *LPDPID;
88 * DPID that system messages come from
93 * DPID representing all players in the session
95 #define DPID_ALLPLAYERS 0
98 * DPID representing the server player
100 #define DPID_SERVERPLAYER 1
103 * The player ID is unknown (used with e.g. DPSESSION_NOMESSAGEID)
105 #define DPID_UNKNOWN 0xFFFFFFFF
109 * Used to obtain the capabilities of a DirectPlay object
113 DWORD dwSize; // Size of structure, in bytes
114 DWORD dwFlags; // DPCAPS_xxx flags
115 DWORD dwMaxBufferSize; // Maximum message size, in bytes, for this service provider
116 DWORD dwMaxQueueSize; // Obsolete.
117 DWORD dwMaxPlayers; // Maximum players/groups (local + remote)
118 DWORD dwHundredBaud; // Bandwidth in 100 bits per second units;
119 // i.e. 24 is 2400, 96 is 9600, etc.
120 DWORD dwLatency; // Estimated latency; 0 = unknown
121 DWORD dwMaxLocalPlayers; // Maximum # of locally created players allowed
122 DWORD dwHeaderLength; // Maximum header length, in bytes, on messages
123 // added by the service provider
124 DWORD dwTimeout; // Service provider's suggested timeout value
125 // This is how long DirectPlay will wait for
126 // responses to system messages
127 } DPCAPS, FAR *LPDPCAPS;
130 * This DirectPlay object is the session host. If the host exits the
131 * session, another application will become the host and receive a
132 * DPSYS_HOST system message.
134 #define DPCAPS_ISHOST 0x00000002
137 * The service provider bound to this DirectPlay object can optimize
140 #define DPCAPS_GROUPOPTIMIZED 0x00000008
143 * The service provider bound to this DirectPlay object can optimize
144 * keep alives (see DPSESSION_KEEPALIVE)
146 #define DPCAPS_KEEPALIVEOPTIMIZED 0x00000010
149 * The service provider bound to this DirectPlay object can optimize
150 * guaranteed message delivery.
152 #define DPCAPS_GUARANTEEDOPTIMIZED 0x00000020
155 * This DirectPlay object supports guaranteed message delivery.
157 #define DPCAPS_GUARANTEEDSUPPORTED 0x00000040
160 * This DirectPlay object supports digital signing of messages.
162 #define DPCAPS_SIGNINGSUPPORTED 0x00000080
165 * This DirectPlay object supports encryption of messages.
167 #define DPCAPS_ENCRYPTIONSUPPORTED 0x00000100
172 * Used to describe the properties of a DirectPlay
177 DWORD dwSize; // Size of structure
178 DWORD dwFlags; // DPSESSION_xxx flags
179 GUID guidInstance; // ID for the session instance
180 GUID guidApplication; // GUID of the DirectPlay application.
181 // GUID_NULL for all applications.
182 DWORD dwMaxPlayers; // Maximum # players allowed in session
183 DWORD dwCurrentPlayers; // Current # players in session (read only)
185 { // Name of the session
186 LPWSTR lpszSessionName; // Unicode
187 LPSTR lpszSessionNameA; // ANSI
190 { // Password of the session (optional)
191 LPWSTR lpszPassword; // Unicode
192 LPSTR lpszPasswordA; // ANSI
194 DWORD dwReserved1; // Reserved for future MS use.
196 DWORD dwUser1; // For use by the application
200 } DPSESSIONDESC2, FAR *LPDPSESSIONDESC2;
204 * A constant pointer to DPSESSIONDESC2
206 typedef const DPSESSIONDESC2 FAR *LPCDPSESSIONDESC2;
209 * Applications cannot create new players in this session.
211 #define DPSESSION_NEWPLAYERSDISABLED 0x00000001
214 * If the DirectPlay object that created the session, the host,
215 * quits, then the host will attempt to migrate to another
216 * DirectPlay object so that new players can continue to be created
217 * and new applications can join the session.
219 #define DPSESSION_MIGRATEHOST 0x00000004
222 * This flag tells DirectPlay not to set the idPlayerTo and idPlayerFrom
223 * fields in player messages. This cuts two DWORD's off the message
226 #define DPSESSION_NOMESSAGEID 0x00000008
230 * This flag tells DirectPlay to not allow any new applications to
231 * join the session. Applications already in the session can still
232 * create new players.
234 #define DPSESSION_JOINDISABLED 0x00000020
237 * This flag tells DirectPlay to detect when remote players
238 * exit abnormally (e.g. their computer or modem gets unplugged)
240 #define DPSESSION_KEEPALIVE 0x00000040
243 * This flag tells DirectPlay not to send a message to all players
244 * when a players remote data changes
246 #define DPSESSION_NODATAMESSAGES 0x00000080
249 * This flag indicates that the session belongs to a secure server
250 * and needs user authentication
252 #define DPSESSION_SECURESERVER 0x00000100
255 * This flag indicates that the session is private and requirs a password
256 * for EnumSessions as well as Open.
258 #define DPSESSION_PRIVATE 0x00000200
261 * This flag indicates that the session requires a password for joining.
263 #define DPSESSION_PASSWORDREQUIRED 0x00000400
266 * This flag tells DirectPlay to route all messages through the server
268 #define DPSESSION_MULTICASTSERVER 0x00000800
271 * This flag tells DirectPlay to only download information about the
272 * DPPLAYER_SERVERPLAYER.
274 #define DPSESSION_CLIENTSERVER 0x00001000
278 * Used to hold the name of a DirectPlay entity
279 * like a player or a group
283 DWORD dwSize; // Size of structure
284 DWORD dwFlags; // Not used. Must be zero.
286 { // The short or friendly name
287 LPWSTR lpszShortName; // Unicode
288 LPSTR lpszShortNameA; // ANSI
291 { // The long or formal name
292 LPWSTR lpszLongName; // Unicode
293 LPSTR lpszLongNameA; // ANSI
296 } DPNAME, FAR *LPDPNAME;
300 * A constant pointer to DPNAME
302 typedef const DPNAME FAR *LPCDPNAME;
306 * Used to hold the user name and password of a DirectPlay user
310 DWORD dwSize; // Size of structure
311 DWORD dwFlags; // Not used. Must be zero.
313 { // User name of the account
314 LPWSTR lpszUsername; // Unicode
315 LPSTR lpszUsernameA; // ANSI
318 { // Password of the account
319 LPWSTR lpszPassword; // Unicode
320 LPSTR lpszPasswordA; // ANSI
323 { // Domain name of the account
324 LPWSTR lpszDomain; // Unicode
325 LPSTR lpszDomainA; // ANSI
327 } DPCREDENTIALS, FAR *LPDPCREDENTIALS;
329 typedef const DPCREDENTIALS FAR *LPCDPCREDENTIALS;
333 * Used to describe the security properties of a DirectPlay
338 DWORD dwSize; // Size of structure
339 DWORD dwFlags; // Not used. Must be zero.
341 { // SSPI provider name
342 LPWSTR lpszSSPIProvider; // Unicode
343 LPSTR lpszSSPIProviderA; // ANSI
346 { // CAPI provider name
347 LPWSTR lpszCAPIProvider; // Unicode
348 LPSTR lpszCAPIProviderA; // ANSI
350 DWORD dwCAPIProviderType; // Crypto Service Provider type
351 DWORD dwEncryptionAlgorithm; // Encryption Algorithm type
352 } DPSECURITYDESC, FAR *LPDPSECURITYDESC;
354 typedef const DPSECURITYDESC FAR *LPCDPSECURITYDESC;
358 * Used to describe a user membership account
362 DWORD dwSize; // Size of structure
363 DWORD dwFlags; // Not used. Must be zero.
365 { // Account identifier
366 LPWSTR lpszAccountID; // Unicode
367 LPSTR lpszAccountIDA; // ANSI
369 } DPACCOUNTDESC, FAR *LPDPACCOUNTDESC;
371 typedef const DPACCOUNTDESC FAR *LPCDPACCOUNTDESC;
375 * A constant pointer to a guid
377 typedef const GUID FAR *LPCGUID;
381 * Used to hold all in the informaion needed to connect
382 * an application to a session or create a session
386 DWORD dwSize; // Size of this structure
387 DWORD dwFlags; // Flags specific to this structure
388 LPDPSESSIONDESC2 lpSessionDesc; // Pointer to session desc to use on connect
389 LPDPNAME lpPlayerName; // Pointer to Player name structure
390 GUID guidSP; // GUID of the DPlay SP to use
391 LPVOID lpAddress; // Address for service provider
392 DWORD dwAddressSize; // Size of address data
393 } DPLCONNECTION, FAR *LPDPLCONNECTION;
397 * A constant pointer to DPLCONNECTION
399 typedef const DPLCONNECTION FAR *LPCDPLCONNECTION;
403 * Used to hold the a DirectPlay chat message
411 LPWSTR lpszMessage; // Unicode
412 LPSTR lpszMessageA; // ANSI
414 } DPCHAT, FAR * LPDPCHAT;
416 /****************************************************************************
418 * Prototypes for DirectPlay callback functions
420 ****************************************************************************/
423 * Callback for IDirectPlay2::EnumSessions
425 typedef BOOL (FAR PASCAL * LPDPENUMSESSIONSCALLBACK2)(
426 LPCDPSESSIONDESC2 lpThisSD,
432 * This flag is set on the EnumSessions callback dwFlags parameter when
433 * the time out has occurred. There will be no session data for this
434 * callback. If *lpdwTimeOut is set to a non-zero value and the
435 * EnumSessionsCallback function returns TRUE then EnumSessions will
436 * continue waiting until the next timeout occurs. Timeouts are in
439 #define DPESC_TIMEDOUT 0x00000001
443 * Callback for IDirectPlay2::EnumPlayers
444 * IDirectPlay2::EnumGroups
445 * IDirectPlay2::EnumGroupPlayers
447 typedef BOOL (FAR PASCAL *LPDPENUMPLAYERSCALLBACK2)(
456 * Unicode callback for DirectPlayEnumerate
457 * This callback prototype will be used if compiling
458 * for Unicode strings
460 typedef BOOL (FAR PASCAL * LPDPENUMDPCALLBACK)(
463 DWORD dwMajorVersion,
464 DWORD dwMinorVersion,
468 * ANSI callback for DirectPlayEnumerate
469 * This callback prototype will be used if compiling
472 typedef BOOL (FAR PASCAL * LPDPENUMDPCALLBACKA)(
475 DWORD dwMajorVersion,
476 DWORD dwMinorVersion,
480 * Callback for IDirectPlay3(A)::EnumConnections
482 typedef BOOL (FAR PASCAL * LPDPENUMCONNECTIONSCALLBACK)(
485 DWORD dwConnectionSize,
496 #define DirectPlayEnumerate DirectPlayEnumerateW
498 #define DirectPlayEnumerate DirectPlayEnumerateA
501 extern HRESULT WINAPI DirectPlayEnumerateA( LPDPENUMDPCALLBACKA, LPVOID );
502 extern HRESULT WINAPI DirectPlayEnumerateW( LPDPENUMDPCALLBACK, LPVOID );
503 extern HRESULT WINAPI DirectPlayCreate( LPGUID lpGUID, LPDIRECTPLAY *lplpDP, IUnknown *pUnk);
505 /****************************************************************************
507 * IDirectPlay2 (and IDirectPlay2A) Interface
509 ****************************************************************************/
512 #define INTERFACE IDirectPlay2
513 DECLARE_INTERFACE_( IDirectPlay2, IUnknown )
515 /*** IUnknown methods ***/
516 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
517 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
518 STDMETHOD_(ULONG,Release) (THIS) PURE;
519 /*** IDirectPlay2 methods ***/
520 STDMETHOD(AddPlayerToGroup) (THIS_ DPID, DPID) PURE;
521 STDMETHOD(Close) (THIS) PURE;
522 STDMETHOD(CreateGroup) (THIS_ LPDPID,LPDPNAME,LPVOID,DWORD,DWORD) PURE;
523 STDMETHOD(CreatePlayer) (THIS_ LPDPID,LPDPNAME,HANDLE,LPVOID,DWORD,DWORD) PURE;
524 STDMETHOD(DeletePlayerFromGroup)(THIS_ DPID,DPID) PURE;
525 STDMETHOD(DestroyGroup) (THIS_ DPID) PURE;
526 STDMETHOD(DestroyPlayer) (THIS_ DPID) PURE;
527 STDMETHOD(EnumGroupPlayers) (THIS_ DPID,LPGUID,LPDPENUMPLAYERSCALLBACK2,LPVOID,DWORD) PURE;
528 STDMETHOD(EnumGroups) (THIS_ LPGUID,LPDPENUMPLAYERSCALLBACK2,LPVOID,DWORD) PURE;
529 STDMETHOD(EnumPlayers) (THIS_ LPGUID,LPDPENUMPLAYERSCALLBACK2,LPVOID,DWORD) PURE;
530 STDMETHOD(EnumSessions) (THIS_ LPDPSESSIONDESC2,DWORD,LPDPENUMSESSIONSCALLBACK2,LPVOID,DWORD) PURE;
531 STDMETHOD(GetCaps) (THIS_ LPDPCAPS,DWORD) PURE;
532 STDMETHOD(GetGroupData) (THIS_ DPID,LPVOID,LPDWORD,DWORD) PURE;
533 STDMETHOD(GetGroupName) (THIS_ DPID,LPVOID,LPDWORD) PURE;
534 STDMETHOD(GetMessageCount) (THIS_ DPID, LPDWORD) PURE;
535 STDMETHOD(GetPlayerAddress) (THIS_ DPID,LPVOID,LPDWORD) PURE;
536 STDMETHOD(GetPlayerCaps) (THIS_ DPID,LPDPCAPS,DWORD) PURE;
537 STDMETHOD(GetPlayerData) (THIS_ DPID,LPVOID,LPDWORD,DWORD) PURE;
538 STDMETHOD(GetPlayerName) (THIS_ DPID,LPVOID,LPDWORD) PURE;
539 STDMETHOD(GetSessionDesc) (THIS_ LPVOID,LPDWORD) PURE;
540 STDMETHOD(Initialize) (THIS_ LPGUID) PURE;
541 STDMETHOD(Open) (THIS_ LPDPSESSIONDESC2,DWORD) PURE;
542 STDMETHOD(Receive) (THIS_ LPDPID,LPDPID,DWORD,LPVOID,LPDWORD) PURE;
543 STDMETHOD(Send) (THIS_ DPID, DPID, DWORD, LPVOID, DWORD) PURE;
544 STDMETHOD(SetGroupData) (THIS_ DPID,LPVOID,DWORD,DWORD) PURE;
545 STDMETHOD(SetGroupName) (THIS_ DPID,LPDPNAME,DWORD) PURE;
546 STDMETHOD(SetPlayerData) (THIS_ DPID,LPVOID,DWORD,DWORD) PURE;
547 STDMETHOD(SetPlayerName) (THIS_ DPID,LPDPNAME,DWORD) PURE;
548 STDMETHOD(SetSessionDesc) (THIS_ LPDPSESSIONDESC2,DWORD) PURE;
551 /****************************************************************************
553 * IDirectPlay2 interface macros
555 ****************************************************************************/
557 #if !defined(__cplusplus) || defined(CINTERFACE)
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 #define IDirectPlay2_AddPlayerToGroup(p,a,b) (p)->lpVtbl->AddPlayerToGroup(p,a,b)
563 #define IDirectPlay2_Close(p) (p)->lpVtbl->Close(p)
564 #define IDirectPlay2_CreateGroup(p,a,b,c,d,e) (p)->lpVtbl->CreateGroup(p,a,b,c,d,e)
565 #define IDirectPlay2_CreatePlayer(p,a,b,c,d,e,f) (p)->lpVtbl->CreatePlayer(p,a,b,c,d,e,f)
566 #define IDirectPlay2_DeletePlayerFromGroup(p,a,b) (p)->lpVtbl->DeletePlayerFromGroup(p,a,b)
567 #define IDirectPlay2_DestroyGroup(p,a) (p)->lpVtbl->DestroyGroup(p,a)
568 #define IDirectPlay2_DestroyPlayer(p,a) (p)->lpVtbl->DestroyPlayer(p,a)
569 #define IDirectPlay2_EnumGroupPlayers(p,a,b,c,d,e) (p)->lpVtbl->EnumGroupPlayers(p,a,b,c,d,e)
570 #define IDirectPlay2_EnumGroups(p,a,b,c,d) (p)->lpVtbl->EnumGroups(p,a,b,c,d)
571 #define IDirectPlay2_EnumPlayers(p,a,b,c,d) (p)->lpVtbl->EnumPlayers(p,a,b,c,d)
572 #define IDirectPlay2_EnumSessions(p,a,b,c,d,e) (p)->lpVtbl->EnumSessions(p,a,b,c,d,e)
573 #define IDirectPlay2_GetCaps(p,a,b) (p)->lpVtbl->GetCaps(p,a,b)
574 #define IDirectPlay2_GetMessageCount(p,a,b) (p)->lpVtbl->GetMessageCount(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_GetPlayerAddress(p,a,b,c) (p)->lpVtbl->GetPlayerAddress(p,a,b,c)
578 #define IDirectPlay2_GetPlayerCaps(p,a,b,c) (p)->lpVtbl->GetPlayerCaps(p,a,b,c)
579 #define IDirectPlay2_GetPlayerData(p,a,b,c,d) (p)->lpVtbl->GetPlayerData(p,a,b,c,d)
580 #define IDirectPlay2_GetPlayerName(p,a,b,c) (p)->lpVtbl->GetPlayerName(p,a,b,c)
581 #define IDirectPlay2_GetSessionDesc(p,a,b) (p)->lpVtbl->GetSessionDesc(p,a,b)
582 #define IDirectPlay2_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
583 #define IDirectPlay2_Open(p,a,b) (p)->lpVtbl->Open(p,a,b)
584 #define IDirectPlay2_Receive(p,a,b,c,d,e) (p)->lpVtbl->Receive(p,a,b,c,d,e)
585 #define IDirectPlay2_Send(p,a,b,c,d,e) (p)->lpVtbl->Send(p,a,b,c,d,e)
586 #define IDirectPlay2_SetGroupData(p,a,b,c,d) (p)->lpVtbl->SetGroupData(p,a,b,c,d)
587 #define IDirectPlay2_SetGroupName(p,a,b,c) (p)->lpVtbl->SetGroupName(p,a,b,c)
588 #define IDirectPlay2_SetPlayerData(p,a,b,c,d) (p)->lpVtbl->SetPlayerData(p,a,b,c,d)
589 #define IDirectPlay2_SetPlayerName(p,a,b,c) (p)->lpVtbl->SetPlayerName(p,a,b,c)
590 #define IDirectPlay2_SetSessionDesc(p,a,b) (p)->lpVtbl->SetSessionDesc(p,a,b)
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 #define IDirectPlay2_AddPlayerToGroup(p,a,b) (p)->AddPlayerToGroup(a,b)
598 #define IDirectPlay2_Close(p) (p)->Close()
599 #define IDirectPlay2_CreateGroup(p,a,b,c,d,e) (p)->CreateGroup(a,b,c,d,e)
600 #define IDirectPlay2_CreatePlayer(p,a,b,c,d,e,f) (p)->CreatePlayer(a,b,c,d,e,f)
601 #define IDirectPlay2_DeletePlayerFromGroup(p,a,b) (p)->DeletePlayerFromGroup(a,b)
602 #define IDirectPlay2_DestroyGroup(p,a) (p)->DestroyGroup(a)
603 #define IDirectPlay2_DestroyPlayer(p,a) (p)->DestroyPlayer(a)
604 #define IDirectPlay2_EnumGroupPlayers(p,a,b,c,d,e) (p)->EnumGroupPlayers(a,b,c,d,e)
605 #define IDirectPlay2_EnumGroups(p,a,b,c,d) (p)->EnumGroups(a,b,c,d)
606 #define IDirectPlay2_EnumPlayers(p,a,b,c,d) (p)->EnumPlayers(a,b,c,d)
607 #define IDirectPlay2_EnumSessions(p,a,b,c,d,e) (p)->EnumSessions(a,b,c,d,e)
608 #define IDirectPlay2_GetCaps(p,a,b) (p)->GetCaps(a,b)
609 #define IDirectPlay2_GetMessageCount(p,a,b) (p)->GetMessageCount(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_GetPlayerAddress(p,a,b,c) (p)->GetPlayerAddress(a,b,c)
613 #define IDirectPlay2_GetPlayerCaps(p,a,b,c) (p)->GetPlayerCaps(a,b,c)
614 #define IDirectPlay2_GetPlayerData(p,a,b,c,d) (p)->GetPlayerData(a,b,c,d)
615 #define IDirectPlay2_GetPlayerName(p,a,b,c) (p)->GetPlayerName(a,b,c)
616 #define IDirectPlay2_GetSessionDesc(p,a,b) (p)->GetSessionDesc(a,b)
617 #define IDirectPlay2_Initialize(p,a) (p)->Initialize(a)
618 #define IDirectPlay2_Open(p,a,b) (p)->Open(a,b)
619 #define IDirectPlay2_Receive(p,a,b,c,d,e) (p)->Receive(a,b,c,d,e)
620 #define IDirectPlay2_Send(p,a,b,c,d,e) (p)->Send(a,b,c,d,e)
621 #define IDirectPlay2_SetGroupData(p,a,b,c,d) (p)->SetGroupData(a,b,c,d)
622 #define IDirectPlay2_SetGroupName(p,a,b,c) (p)->SetGroupName(a,b,c)
623 #define IDirectPlay2_SetPlayerData(p,a,b,c,d) (p)->SetPlayerData(a,b,c,d)
624 #define IDirectPlay2_SetPlayerName(p,a,b,c) (p)->SetPlayerName(a,b,c)
625 #define IDirectPlay2_SetSessionDesc(p,a,b) (p)->SetSessionDesc(a,b)
629 /****************************************************************************
631 * IDirectPlay3 (and IDirectPlay3A) Interface
633 ****************************************************************************/
636 #define INTERFACE IDirectPlay3
637 DECLARE_INTERFACE_( IDirectPlay3, IDirectPlay2 )
639 /*** IUnknown methods ***/
640 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
641 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
642 STDMETHOD_(ULONG,Release) (THIS) PURE;
643 /*** IDirectPlay2 methods ***/
644 STDMETHOD(AddPlayerToGroup) (THIS_ DPID, DPID) PURE;
645 STDMETHOD(Close) (THIS) PURE;
646 STDMETHOD(CreateGroup) (THIS_ LPDPID,LPDPNAME,LPVOID,DWORD,DWORD) PURE;
647 STDMETHOD(CreatePlayer) (THIS_ LPDPID,LPDPNAME,HANDLE,LPVOID,DWORD,DWORD) PURE;
648 STDMETHOD(DeletePlayerFromGroup)(THIS_ DPID,DPID) PURE;
649 STDMETHOD(DestroyGroup) (THIS_ DPID) PURE;
650 STDMETHOD(DestroyPlayer) (THIS_ DPID) PURE;
651 STDMETHOD(EnumGroupPlayers) (THIS_ DPID,LPGUID,LPDPENUMPLAYERSCALLBACK2,LPVOID,DWORD) PURE;
652 STDMETHOD(EnumGroups) (THIS_ LPGUID,LPDPENUMPLAYERSCALLBACK2,LPVOID,DWORD) PURE;
653 STDMETHOD(EnumPlayers) (THIS_ LPGUID,LPDPENUMPLAYERSCALLBACK2,LPVOID,DWORD) PURE;
654 STDMETHOD(EnumSessions) (THIS_ LPDPSESSIONDESC2,DWORD,LPDPENUMSESSIONSCALLBACK2,LPVOID,DWORD) PURE;
655 STDMETHOD(GetCaps) (THIS_ LPDPCAPS,DWORD) PURE;
656 STDMETHOD(GetGroupData) (THIS_ DPID,LPVOID,LPDWORD,DWORD) PURE;
657 STDMETHOD(GetGroupName) (THIS_ DPID,LPVOID,LPDWORD) PURE;
658 STDMETHOD(GetMessageCount) (THIS_ DPID, LPDWORD) PURE;
659 STDMETHOD(GetPlayerAddress) (THIS_ DPID,LPVOID,LPDWORD) PURE;
660 STDMETHOD(GetPlayerCaps) (THIS_ DPID,LPDPCAPS,DWORD) PURE;
661 STDMETHOD(GetPlayerData) (THIS_ DPID,LPVOID,LPDWORD,DWORD) PURE;
662 STDMETHOD(GetPlayerName) (THIS_ DPID,LPVOID,LPDWORD) PURE;
663 STDMETHOD(GetSessionDesc) (THIS_ LPVOID,LPDWORD) PURE;
664 STDMETHOD(Initialize) (THIS_ LPGUID) PURE;
665 STDMETHOD(Open) (THIS_ LPDPSESSIONDESC2,DWORD) PURE;
666 STDMETHOD(Receive) (THIS_ LPDPID,LPDPID,DWORD,LPVOID,LPDWORD) PURE;
667 STDMETHOD(Send) (THIS_ DPID, DPID, DWORD, LPVOID, DWORD) PURE;
668 STDMETHOD(SetGroupData) (THIS_ DPID,LPVOID,DWORD,DWORD) PURE;
669 STDMETHOD(SetGroupName) (THIS_ DPID,LPDPNAME,DWORD) PURE;
670 STDMETHOD(SetPlayerData) (THIS_ DPID,LPVOID,DWORD,DWORD) PURE;
671 STDMETHOD(SetPlayerName) (THIS_ DPID,LPDPNAME,DWORD) PURE;
672 STDMETHOD(SetSessionDesc) (THIS_ LPDPSESSIONDESC2,DWORD) PURE;
673 /*** IDirectPlay3 methods ***/
674 STDMETHOD(AddGroupToGroup) (THIS_ DPID, DPID) PURE;
675 STDMETHOD(CreateGroupInGroup) (THIS_ DPID,LPDPID,LPDPNAME,LPVOID,DWORD,DWORD) PURE;
676 STDMETHOD(DeleteGroupFromGroup) (THIS_ DPID,DPID) PURE;
677 STDMETHOD(EnumConnections) (THIS_ LPCGUID,LPDPENUMCONNECTIONSCALLBACK,LPVOID,DWORD) PURE;
678 STDMETHOD(EnumGroupsInGroup) (THIS_ DPID,LPGUID,LPDPENUMPLAYERSCALLBACK2,LPVOID,DWORD) PURE;
679 STDMETHOD(GetGroupConnectionSettings)(THIS_ DWORD, DPID, LPVOID, LPDWORD) PURE;
680 STDMETHOD(InitializeConnection) (THIS_ LPVOID,DWORD) PURE;
681 STDMETHOD(SecureOpen) (THIS_ LPCDPSESSIONDESC2,DWORD,LPCDPSECURITYDESC,LPCDPCREDENTIALS) PURE;
682 STDMETHOD(SendChatMessage) (THIS_ DPID,DPID,DWORD,LPDPCHAT);
683 STDMETHOD(SetGroupConnectionSettings)(THIS_ DWORD,DPID,LPDPLCONNECTION) PURE;
684 STDMETHOD(StartSession) (THIS_ DWORD,DPID);
685 STDMETHOD(GetGroupFlags) (THIS_ DPID,LPDWORD);
686 STDMETHOD(GetGroupParent) (THIS_ DPID,LPDPID);
687 STDMETHOD(GetPlayerAccount) (THIS_ DPID, DWORD, LPVOID, LPDWORD) PURE;
688 STDMETHOD(GetPlayerFlags) (THIS_ DPID,LPDWORD);
691 /****************************************************************************
693 * IDirectPlay3 interface macros
695 ****************************************************************************/
697 #if !defined(__cplusplus) || defined(CINTERFACE)
699 #define IDirectPlay3_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
700 #define IDirectPlay3_AddRef(p) (p)->lpVtbl->AddRef(p)
701 #define IDirectPlay3_Release(p) (p)->lpVtbl->Release(p)
702 #define IDirectPlay3_AddPlayerToGroup(p,a,b) (p)->lpVtbl->AddPlayerToGroup(p,a,b)
703 #define IDirectPlay3_Close(p) (p)->lpVtbl->Close(p)
704 #define IDirectPlay3_CreateGroup(p,a,b,c,d,e) (p)->lpVtbl->CreateGroup(p,a,b,c,d,e)
705 #define IDirectPlay3_CreatePlayer(p,a,b,c,d,e,f) (p)->lpVtbl->CreatePlayer(p,a,b,c,d,e,f)
706 #define IDirectPlay3_DeletePlayerFromGroup(p,a,b) (p)->lpVtbl->DeletePlayerFromGroup(p,a,b)
707 #define IDirectPlay3_DestroyGroup(p,a) (p)->lpVtbl->DestroyGroup(p,a)
708 #define IDirectPlay3_DestroyPlayer(p,a) (p)->lpVtbl->DestroyPlayer(p,a)
709 #define IDirectPlay3_EnumGroupPlayers(p,a,b,c,d,e) (p)->lpVtbl->EnumGroupPlayers(p,a,b,c,d,e)
710 #define IDirectPlay3_EnumGroups(p,a,b,c,d) (p)->lpVtbl->EnumGroups(p,a,b,c,d)
711 #define IDirectPlay3_EnumPlayers(p,a,b,c,d) (p)->lpVtbl->EnumPlayers(p,a,b,c,d)
712 #define IDirectPlay3_EnumSessions(p,a,b,c,d,e) (p)->lpVtbl->EnumSessions(p,a,b,c,d,e)
713 #define IDirectPlay3_GetCaps(p,a,b) (p)->lpVtbl->GetCaps(p,a,b)
714 #define IDirectPlay3_GetMessageCount(p,a,b) (p)->lpVtbl->GetMessageCount(p,a,b)
715 #define IDirectPlay3_GetGroupData(p,a,b,c,d) (p)->lpVtbl->GetGroupData(p,a,b,c,d)
716 #define IDirectPlay3_GetGroupName(p,a,b,c) (p)->lpVtbl->GetGroupName(p,a,b,c)
717 #define IDirectPlay3_GetPlayerAddress(p,a,b,c) (p)->lpVtbl->GetPlayerAddress(p,a,b,c)
718 #define IDirectPlay3_GetPlayerCaps(p,a,b,c) (p)->lpVtbl->GetPlayerCaps(p,a,b,c)
719 #define IDirectPlay3_GetPlayerData(p,a,b,c,d) (p)->lpVtbl->GetPlayerData(p,a,b,c,d)
720 #define IDirectPlay3_GetPlayerName(p,a,b,c) (p)->lpVtbl->GetPlayerName(p,a,b,c)
721 #define IDirectPlay3_GetSessionDesc(p,a,b) (p)->lpVtbl->GetSessionDesc(p,a,b)
722 #define IDirectPlay3_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
723 #define IDirectPlay3_Open(p,a,b) (p)->lpVtbl->Open(p,a,b)
724 #define IDirectPlay3_Receive(p,a,b,c,d,e) (p)->lpVtbl->Receive(p,a,b,c,d,e)
725 #define IDirectPlay3_Send(p,a,b,c,d,e) (p)->lpVtbl->Send(p,a,b,c,d,e)
726 #define IDirectPlay3_SetGroupData(p,a,b,c,d) (p)->lpVtbl->SetGroupData(p,a,b,c,d)
727 #define IDirectPlay3_SetGroupName(p,a,b,c) (p)->lpVtbl->SetGroupName(p,a,b,c)
728 #define IDirectPlay3_SetPlayerData(p,a,b,c,d) (p)->lpVtbl->SetPlayerData(p,a,b,c,d)
729 #define IDirectPlay3_SetPlayerName(p,a,b,c) (p)->lpVtbl->SetPlayerName(p,a,b,c)
730 #define IDirectPlay3_SetSessionDesc(p,a,b) (p)->lpVtbl->SetSessionDesc(p,a,b)
731 #define IDirectPlay3_AddGroupToGroup(p,a,b) (p)->lpVtbl->AddGroupToGroup(p,a,b)
732 #define IDirectPlay3_CreateGroupInGroup(p,a,b,c,d,e,f) (p)->lpVtbl->CreateGroupInGroup(p,a,b,c,d,e,f)
733 #define IDirectPlay3_DeleteGroupFromGroup(p,a,b) (p)->lpVtbl->DeleteGroupFromGroup(p,a,b)
734 #define IDirectPlay3_EnumConnections(p,a,b,c,d) (p)->lpVtbl->EnumConnections(p,a,b,c,d)
735 #define IDirectPlay3_EnumGroupsInGroup(p,a,b,c,d,e) (p)->lpVtbl->EnumGroupsInGroup(p,a,b,c,d,e)
736 #define IDirectPlay3_GetGroupConnectionSettings(p,a,b,c,d) (p)->lpVtbl->GetGroupConnectionSettings(p,a,b,c,d)
737 #define IDirectPlay3_InitializeConnection(p,a,b) (p)->lpVtbl->InitializeConnection(p,a,b)
738 #define IDirectPlay3_SecureOpen(p,a,b,c,d) (p)->lpVtbl->SecureOpen(p,a,b,c,d)
739 #define IDirectPlay3_SendChatMessage(p,a,b,c,d) (p)->lpVtbl->SendChatMessage(p,a,b,c,d)
740 #define IDirectPlay3_SetGroupConnectionSettings(p,a,b,c) (p)->lpVtbl->SetGroupConnectionSettings(p,a,b,c)
741 #define IDirectPlay3_StartSession(p,a,b) (p)->lpVtbl->StartSession(p,a,b)
742 #define IDirectPlay3_GetGroupFlags(p,a,b) (p)->lpVtbl->GetGroupFlags(p,a,b)
743 #define IDirectPlay3_GetGroupParent(p,a,b) (p)->lpVtbl->GetGroupParent(p,a,b)
744 #define IDirectPlay3_GetPlayerAccount(p,a,b,c,d) (p)->lpVtbl->GetPlayerAccount(p,a,b,c,d)
745 #define IDirectPlay3_GetPlayerFlags(p,a,b) (p)->lpVtbl->GetPlayerFlags(p,a,b)
749 #define IDirectPlay3_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
750 #define IDirectPlay3_AddRef(p) (p)->AddRef()
751 #define IDirectPlay3_Release(p) (p)->Release()
752 #define IDirectPlay3_AddPlayerToGroup(p,a,b) (p)->AddPlayerToGroup(a,b)
753 #define IDirectPlay3_Close(p) (p)->Close()
754 #define IDirectPlay3_CreateGroup(p,a,b,c,d,e) (p)->CreateGroup(a,b,c,d,e)
755 #define IDirectPlay3_CreatePlayer(p,a,b,c,d,e,f) (p)->CreatePlayer(a,b,c,d,e,f)
756 #define IDirectPlay3_DeletePlayerFromGroup(p,a,b) (p)->DeletePlayerFromGroup(a,b)
757 #define IDirectPlay3_DestroyGroup(p,a) (p)->DestroyGroup(a)
758 #define IDirectPlay3_DestroyPlayer(p,a) (p)->DestroyPlayer(a)
759 #define IDirectPlay3_EnumGroupPlayers(p,a,b,c,d,e) (p)->EnumGroupPlayers(a,b,c,d,e)
760 #define IDirectPlay3_EnumGroups(p,a,b,c,d) (p)->EnumGroups(a,b,c,d)
761 #define IDirectPlay3_EnumPlayers(p,a,b,c,d) (p)->EnumPlayers(a,b,c,d)
762 #define IDirectPlay3_EnumSessions(p,a,b,c,d,e) (p)->EnumSessions(a,b,c,d,e)
763 #define IDirectPlay3_GetCaps(p,a,b) (p)->GetCaps(a,b)
764 #define IDirectPlay3_GetMessageCount(p,a,b) (p)->GetMessageCount(a,b)
765 #define IDirectPlay3_GetGroupData(p,a,b,c,d) (p)->GetGroupData(a,b,c,d)
766 #define IDirectPlay3_GetGroupName(p,a,b,c) (p)->GetGroupName(a,b,c)
767 #define IDirectPlay3_GetPlayerAddress(p,a,b,c) (p)->GetPlayerAddress(a,b,c)
768 #define IDirectPlay3_GetPlayerCaps(p,a,b,c) (p)->GetPlayerCaps(a,b,c)
769 #define IDirectPlay3_GetPlayerData(p,a,b,c,d) (p)->GetPlayerData(a,b,c,d)
770 #define IDirectPlay3_GetPlayerName(p,a,b,c) (p)->GetPlayerName(a,b,c)
771 #define IDirectPlay3_GetSessionDesc(p,a,b) (p)->GetSessionDesc(a,b)
772 #define IDirectPlay3_Initialize(p,a) (p)->Initialize(a)
773 #define IDirectPlay3_Open(p,a,b) (p)->Open(a,b)
774 #define IDirectPlay3_Receive(p,a,b,c,d,e) (p)->Receive(a,b,c,d,e)
775 #define IDirectPlay3_Send(p,a,b,c,d,e) (p)->Send(a,b,c,d,e)
776 #define IDirectPlay3_SetGroupData(p,a,b,c,d) (p)->SetGroupData(a,b,c,d)
777 #define IDirectPlay3_SetGroupName(p,a,b,c) (p)->SetGroupName(a,b,c)
778 #define IDirectPlay3_SetPlayerData(p,a,b,c,d) (p)->SetPlayerData(a,b,c,d)
779 #define IDirectPlay3_SetPlayerName(p,a,b,c) (p)->SetPlayerName(a,b,c)
780 #define IDirectPlay3_SetSessionDesc(p,a,b) (p)->SetSessionDesc(a,b)
781 #define IDirectPlay3_AddGroupToGroup(p,a,b) (p)->AddGroupToGroup(a,b)
782 #define IDirectPlay3_CreateGroupInGroup(p,a,b,c,d,e,f) (p)->CreateGroupInGroup(a,b,c,d,e,f)
783 #define IDirectPlay3_DeleteGroupFromGroup(p,a,b) (p)->DeleteGroupFromGroup(a,b)
784 #define IDirectPlay3_EnumConnections(p,a,b,c,d) (p)->EnumConnections(a,b,c,d)
785 #define IDirectPlay3_EnumGroupsInGroup(p,a,b,c,d,e) (p)->EnumGroupsInGroup(a,b,c,d,e)
786 #define IDirectPlay3_GetGroupConnectionSettings(p,a,b,c,d) (p)->GetGroupConnectionSettings(a,b,c,d)
787 #define IDirectPlay3_InitializeConnection(p,a,b) (p)->InitializeConnection(a,b)
788 #define IDirectPlay3_SecureOpen(p,a,b,c,d) (p)->SecureOpen(a,b,c,d)
789 #define IDirectPlay3_SendChatMessage(p,a,b,c,d) (p)->SendChatMessage(a,b,c,d)
790 #define IDirectPlay3_SetGroupConnectionSettings(p,a,b,c) (p)->SetGroupConnectionSettings(a,b,c)
791 #define IDirectPlay3_StartSession(p,a,b) (p)->StartSession(a,b)
792 #define IDirectPlay3_GetGroupFlags(p,a,b) (p)->GetGroupFlags(a,b)
793 #define IDirectPlay3_GetGroupParent(p,a,b) (p)->GetGroupParent(a,b)
794 #define IDirectPlay3_GetPlayerAccount(p,a,b,c,d) (p)->GetPlayerAccount(a,b,c,d)
795 #define IDirectPlay3_GetPlayerFlags(p,a,b) (p)->GetPlayerFlags(a,b)
799 /****************************************************************************
801 * EnumConnections API flags
803 ****************************************************************************/
806 * Enumerate Service Providers
808 #define DPCONNECTION_DIRECTPLAY 0x00000001
811 * Enumerate Lobby Providers
813 #define DPCONNECTION_DIRECTPLAYLOBBY 0x00000002
816 /****************************************************************************
818 * EnumPlayers API flags
820 ****************************************************************************/
823 * Enumerate all players in the current session
825 #define DPENUMPLAYERS_ALL 0x00000000
826 #define DPENUMGROUPS_ALL DPENUMPLAYERS_ALL
830 * Enumerate only local (created by this application) players
833 #define DPENUMPLAYERS_LOCAL 0x00000008
834 #define DPENUMGROUPS_LOCAL DPENUMPLAYERS_LOCAL
837 * Enumerate only remote (non-local) players
840 #define DPENUMPLAYERS_REMOTE 0x00000010
841 #define DPENUMGROUPS_REMOTE DPENUMPLAYERS_REMOTE
844 * Enumerate groups along with the players
846 #define DPENUMPLAYERS_GROUP 0x00000020
849 * Enumerate players or groups in another session
850 * (must supply lpguidInstance)
852 #define DPENUMPLAYERS_SESSION 0x00000080
853 #define DPENUMGROUPS_SESSION DPENUMPLAYERS_SESSION
856 * Enumerate server players
858 #define DPENUMPLAYERS_SERVERPLAYER 0x00000100
861 * Enumerate spectator players
863 #define DPENUMPLAYERS_SPECTATOR 0x00000200
866 * Enumerate shortcut groups
868 #define DPENUMGROUPS_SHORTCUT 0x00000400
871 * Enumerate staging area groups
873 #define DPENUMGROUPS_STAGINGAREA 0x00000800
875 /****************************************************************************
877 * CreatePlayer API flags
879 ****************************************************************************/
882 * This flag indicates that this player should be designated
883 * the server player. The app should specify this at CreatePlayer.
885 #define DPPLAYER_SERVERPLAYER DPENUMPLAYERS_SERVERPLAYER
888 * This flag indicates that this player should be designated
889 * a spectator. The app should specify this at CreatePlayer.
891 #define DPPLAYER_SPECTATOR DPENUMPLAYERS_SPECTATOR
894 * This flag indicates that this player was created locally.
895 * (returned from GetPlayerFlags)
897 #define DPPLAYER_LOCAL DPENUMPLAYERS_LOCAL
899 /****************************************************************************
901 * CreateGroup API flags
903 ****************************************************************************/
907 * This flag indicates that the StartSession can be called on the group.
908 * The app should specify this at CreateGroup, or CreateGroupInGroup.
910 #define DPGROUP_STAGINGAREA DPENUMGROUPS_STAGINGAREA
913 * This flag indicates that this group was created locally.
914 * (returned from GetGroupFlags)
916 #define DPGROUP_LOCAL DPENUMGROUPS_LOCAL
918 /****************************************************************************
920 * EnumSessions API flags
922 ****************************************************************************/
925 * Enumerate sessions which can be joined
927 #define DPENUMSESSIONS_AVAILABLE 0x00000001
930 * Enumerate all sessions even if they can't be joined.
932 #define DPENUMSESSIONS_ALL 0x00000002
938 * Start an asynchronous enum sessions
940 #define DPENUMSESSIONS_ASYNC 0x00000010
943 * Stop an asynchronous enum sessions
945 #define DPENUMSESSIONS_STOPASYNC 0x00000020
948 * Enumerate sessions even if they require a password
950 #define DPENUMSESSIONS_PASSWORDREQUIRED 0x00000040
953 * Return status about progress of enumeration instead of
954 * showing any status dialogs.
956 #define DPENUMSESSIONS_RETURNSTATUS 0x00000080
958 /****************************************************************************
960 * GetCaps and GetPlayerCaps API flags
962 ****************************************************************************/
965 * The latency returned should be for guaranteed message sending.
966 * Default is non-guaranteed messaging.
968 #define DPGETCAPS_GUARANTEED 0x00000001
971 /****************************************************************************
973 * GetGroupData, GetPlayerData API flags
974 * Remote and local Group/Player data is maintained separately.
975 * Default is DPGET_REMOTE.
977 ****************************************************************************/
980 * Get the remote data (set by any DirectPlay object in
981 * the session using DPSET_REMOTE)
983 #define DPGET_REMOTE 0x00000000
986 * Get the local data (set by this DirectPlay object
989 #define DPGET_LOCAL 0x00000001
992 /****************************************************************************
996 ****************************************************************************/
999 * Join the session that is described by the DPSESSIONDESC2 structure
1001 #define DPOPEN_JOIN 0x00000001
1004 * Create a new session as described by the DPSESSIONDESC2 structure
1006 #define DPOPEN_CREATE 0x00000002
1009 * Return status about progress of open instead of showing
1010 * any status dialogs.
1012 #define DPOPEN_RETURNSTATUS DPENUMSESSIONS_RETURNSTATUS
1014 /****************************************************************************
1016 * DPLCONNECTION flags
1018 ****************************************************************************/
1021 * This application should create a new session as
1022 * described by the DPSESIONDESC structure
1024 #define DPLCONNECTION_CREATESESSION DPOPEN_CREATE
1027 * This application should join the session described by
1028 * the DPSESIONDESC structure with the lpAddress data
1030 #define DPLCONNECTION_JOINSESSION DPOPEN_JOIN
1032 /****************************************************************************
1035 * Default is DPRECEIVE_ALL
1037 ****************************************************************************/
1040 * Get the first message in the queue
1042 #define DPRECEIVE_ALL 0x00000001
1045 * Get the first message in the queue directed to a specific player
1047 #define DPRECEIVE_TOPLAYER 0x00000002
1050 * Get the first message in the queue from a specific player
1052 #define DPRECEIVE_FROMPLAYER 0x00000004
1055 * Get the message but don't remove it from the queue
1057 #define DPRECEIVE_PEEK 0x00000008
1060 /****************************************************************************
1064 ****************************************************************************/
1067 * Send the message using a guaranteed send method.
1068 * Default is non-guaranteed.
1070 #define DPSEND_GUARANTEED 0x00000001
1074 * This flag is obsolete. It is ignored by DirectPlay
1076 #define DPSEND_HIGHPRIORITY 0x00000002
1079 * This flag is obsolete. It is ignored by DirectPlay
1081 #define DPSEND_OPENSTREAM 0x00000008
1084 * This flag is obsolete. It is ignored by DirectPlay
1086 #define DPSEND_CLOSESTREAM 0x00000010
1089 * Send the message digitally signed to ensure authenticity.
1091 #define DPSEND_SIGNED 0x00000020
1094 * Send the message with encryption to ensure privacy.
1096 #define DPSEND_ENCRYPTED 0x00000040
1099 /****************************************************************************
1101 * SetGroupData, SetGroupName, SetPlayerData, SetPlayerName,
1102 * SetSessionDesc API flags.
1103 * Default is DPSET_REMOTE.
1105 ****************************************************************************/
1108 * Propagate the data to all players in the session
1110 #define DPSET_REMOTE 0x00000000
1113 * Do not propagate the data to other players
1115 #define DPSET_LOCAL 0x00000001
1118 * Used with DPSET_REMOTE, use guaranteed message send to
1119 * propagate the data
1121 #define DPSET_GUARANTEED 0x00000002
1124 /****************************************************************************
1126 * DirectPlay system messages and message data structures
1128 * All system message come 'From' player DPID_SYSMSG. To determine what type
1129 * of message it is, cast the lpData from Receive to DPMSG_GENERIC and check
1130 * the dwType member against one of the following DPSYS_xxx constants. Once
1131 * a match is found, cast the lpData to the corresponding of the DPMSG_xxx
1132 * structures to access the data of the message.
1134 ****************************************************************************/
1137 * A new player or group has been created in the session
1138 * Use DPMSG_CREATEPLAYERORGROUP. Check dwPlayerType to see if it
1139 * is a player or a group.
1141 #define DPSYS_CREATEPLAYERORGROUP 0x0003
1144 * A player has been deleted from the session
1145 * Use DPMSG_DESTROYPLAYERORGROUP
1147 #define DPSYS_DESTROYPLAYERORGROUP 0x0005
1150 * A player has been added to a group
1151 * Use DPMSG_ADDPLAYERTOGROUP
1153 #define DPSYS_ADDPLAYERTOGROUP 0x0007
1156 * A player has been removed from a group
1157 * Use DPMSG_DELETEPLAYERFROMGROUP
1159 #define DPSYS_DELETEPLAYERFROMGROUP 0x0021
1162 * This DirectPlay object lost its connection with all the
1163 * other players in the session.
1164 * Use DPMSG_SESSIONLOST.
1166 #define DPSYS_SESSIONLOST 0x0031
1169 * The current host has left the session.
1170 * This DirectPlay object is now the host.
1173 #define DPSYS_HOST 0x0101
1176 * The remote data associated with a player or
1177 * group has changed. Check dwPlayerType to see
1178 * if it is a player or a group
1179 * Use DPMSG_SETPLAYERORGROUPDATA
1181 #define DPSYS_SETPLAYERORGROUPDATA 0x0102
1184 * The name of a player or group has changed.
1185 * Check dwPlayerType to see if it is a player
1187 * Use DPMSG_SETPLAYERORGROUPNAME
1189 #define DPSYS_SETPLAYERORGROUPNAME 0x0103
1192 * The session description has changed.
1193 * Use DPMSG_SETSESSIONDESC
1195 #define DPSYS_SETSESSIONDESC 0x0104
1198 * A group has been added to a group
1199 * Use DPMSG_ADDGROUPTOGROUP
1201 #define DPSYS_ADDGROUPTOGROUP 0x0105
1204 * A group has been removed from a group
1205 * Use DPMSG_DELETEGROUPFROMGROUP
1207 #define DPSYS_DELETEGROUPFROMGROUP 0x0106
1210 * A secure player-player message has arrived.
1211 * Use DPMSG_SECUREMESSAGE
1213 #define DPSYS_SECUREMESSAGE 0x0107
1216 * Start a new session.
1217 * Use DPMSG_STARTSESSION
1219 #define DPSYS_STARTSESSION 0x0108
1222 * A chat message has arrived
1225 #define DPSYS_CHAT 0x0109
1228 * Used in the dwPlayerType field to indicate if it applies to a group
1231 #define DPPLAYERTYPE_GROUP 0x00000000
1232 #define DPPLAYERTYPE_PLAYER 0x00000001
1237 * Generic message structure used to identify the message type.
1241 DWORD dwType; // Message type
1242 } DPMSG_GENERIC, FAR *LPDPMSG_GENERIC;
1245 * DPMSG_CREATEPLAYERORGROUP
1246 * System message generated when a new player or group
1247 * created in the session with information about it.
1251 DWORD dwType; // Message type
1252 DWORD dwPlayerType; // Is it a player or group
1253 DPID dpId; // ID of the player or group
1254 DWORD dwCurrentPlayers; // current # players & groups in session
1255 LPVOID lpData; // pointer to remote data
1256 DWORD dwDataSize; // size of remote data
1257 DPNAME dpnName; // structure with name info
1258 // the following fields are only available when using
1259 // the IDirectPlay3 interface or greater
1260 DPID dpIdParent; // id of parent group
1261 DWORD dwFlags; // player or group flags
1262 } DPMSG_CREATEPLAYERORGROUP, FAR *LPDPMSG_CREATEPLAYERORGROUP;
1265 * DPMSG_DESTROYPLAYERORGROUP
1266 * System message generated when a player or group is being
1267 * destroyed in the session with information about it.
1271 DWORD dwType; // Message type
1272 DWORD dwPlayerType; // Is it a player or group
1273 DPID dpId; // player ID being deleted
1274 LPVOID lpLocalData; // copy of players local data
1275 DWORD dwLocalDataSize; // sizeof local data
1276 LPVOID lpRemoteData; // copy of players remote data
1277 DWORD dwRemoteDataSize; // sizeof remote data
1278 // the following fields are only available when using
1279 // the IDirectPlay3 interface or greater
1280 DPNAME dpnName; // structure with name info
1281 DPID dpIdParent; // id of parent group
1282 DWORD dwFlags; // player or group flags
1283 } DPMSG_DESTROYPLAYERORGROUP, FAR *LPDPMSG_DESTROYPLAYERORGROUP;
1286 * DPMSG_ADDPLAYERTOGROUP
1287 * System message generated when a player is being added
1292 DWORD dwType; // Message type
1293 DPID dpIdGroup; // group ID being added to
1294 DPID dpIdPlayer; // player ID being added
1295 } DPMSG_ADDPLAYERTOGROUP, FAR *LPDPMSG_ADDPLAYERTOGROUP;
1298 * DPMSG_DELETEPLAYERFROMGROUP
1299 * System message generated when a player is being
1300 * removed from a group
1302 typedef DPMSG_ADDPLAYERTOGROUP DPMSG_DELETEPLAYERFROMGROUP;
1303 typedef DPMSG_DELETEPLAYERFROMGROUP FAR *LPDPMSG_DELETEPLAYERFROMGROUP;
1306 * DPMSG_ADDGROUPTOGROUP
1307 * System message generated when a group is being added
1312 DWORD dwType; // Message type
1313 DPID dpIdParentGroup; // group ID being added to
1314 DPID dpIdGroup; // group ID being added
1315 } DPMSG_ADDGROUPTOGROUP, FAR *LPDPMSG_ADDGROUPTOGROUP;
1318 * DPMSG_DELETEGROUPFROMGROUP
1319 * System message generated when a GROUP is being
1320 * removed from a group
1322 typedef DPMSG_ADDGROUPTOGROUP DPMSG_DELETEGROUPFROMGROUP;
1323 typedef DPMSG_DELETEGROUPFROMGROUP FAR *LPDPMSG_DELETEGROUPFROMGROUP;
1326 * DPMSG_SETPLAYERORGROUPDATA
1327 * System message generated when remote data for a player or
1328 * group has changed.
1332 DWORD dwType; // Message type
1333 DWORD dwPlayerType; // Is it a player or group
1334 DPID dpId; // ID of player or group
1335 LPVOID lpData; // pointer to remote data
1336 DWORD dwDataSize; // size of remote data
1337 } DPMSG_SETPLAYERORGROUPDATA, FAR *LPDPMSG_SETPLAYERORGROUPDATA;
1340 * DPMSG_SETPLAYERORGROUPNAME
1341 * System message generated when the name of a player or
1342 * group has changed.
1346 DWORD dwType; // Message type
1347 DWORD dwPlayerType; // Is it a player or group
1348 DPID dpId; // ID of player or group
1349 DPNAME dpnName; // structure with new name info
1350 } DPMSG_SETPLAYERORGROUPNAME, FAR *LPDPMSG_SETPLAYERORGROUPNAME;
1353 * DPMSG_SETSESSIONDESC
1354 * System message generated when session desc has changed
1358 DWORD dwType; // Message type
1359 DPSESSIONDESC2 dpDesc; // Session desc
1360 } DPMSG_SETSESSIONDESC, FAR *LPDPMSG_SETSESSIONDESC;
1364 * System message generated when the host has migrated to this
1365 * DirectPlay object.
1368 typedef DPMSG_GENERIC DPMSG_HOST;
1369 typedef DPMSG_HOST FAR *LPDPMSG_HOST;
1373 * System message generated when the connection to the session is lost.
1376 typedef DPMSG_GENERIC DPMSG_SESSIONLOST;
1377 typedef DPMSG_SESSIONLOST FAR *LPDPMSG_SESSIONLOST;
1380 * DPMSG_SECUREMESSAGE
1381 * System message generated when a player requests a secure send
1385 DWORD dwType; // Message Type
1386 DWORD dwFlags; // Signed/Encrypted
1387 DPID dpIdFrom; // ID of Sending Player
1388 LPVOID lpData; // Player message
1389 DWORD dwDataSize; // Size of player message
1390 } DPMSG_SECUREMESSAGE, FAR *LPDPMSG_SECUREMESSAGE;
1393 * DPMSG_STARTSESSION
1394 * System message containing all information required to
1395 * start a new session
1399 DWORD dwType; // Message type
1400 LPDPLCONNECTION lpConn; // DPLCONNECTION structure
1401 } DPMSG_STARTSESSION, FAR *LPDPMSG_STARTSESSION;
1405 * System message containing a chat message
1409 DWORD dwType; // Message type
1410 DWORD dwFlags; // Message flags
1411 DPID idFromPlayer; // ID of the Sending Player
1412 DPID idToPlayer; // ID of the To Player
1413 DPID idToGroup; // ID of the To Group
1414 LPDPCHAT lpChat; // Pointer to a structure containing the chat message
1415 } DPMSG_CHAT, FAR *LPDPMSG_CHAT;
1417 /****************************************************************************
1421 * Errors are represented by negative values and cannot be combined.
1423 ****************************************************************************/
1425 #define DPERR_ALREADYINITIALIZED MAKE_DPHRESULT( 5 )
1426 #define DPERR_ACCESSDENIED MAKE_DPHRESULT( 10 )
1427 #define DPERR_ACTIVEPLAYERS MAKE_DPHRESULT( 20 )
1428 #define DPERR_BUFFERTOOSMALL MAKE_DPHRESULT( 30 )
1429 #define DPERR_CANTADDPLAYER MAKE_DPHRESULT( 40 )
1430 #define DPERR_CANTCREATEGROUP MAKE_DPHRESULT( 50 )
1431 #define DPERR_CANTCREATEPLAYER MAKE_DPHRESULT( 60 )
1432 #define DPERR_CANTCREATESESSION MAKE_DPHRESULT( 70 )
1433 #define DPERR_CAPSNOTAVAILABLEYET MAKE_DPHRESULT( 80 )
1434 #define DPERR_EXCEPTION MAKE_DPHRESULT( 90 )
1435 #define DPERR_GENERIC E_FAIL
1436 #define DPERR_INVALIDFLAGS MAKE_DPHRESULT( 120 )
1437 #define DPERR_INVALIDOBJECT MAKE_DPHRESULT( 130 )
1438 #define DPERR_INVALIDPARAM E_INVALIDARG
1439 #define DPERR_INVALIDPARAMS DPERR_INVALIDPARAM
1440 #define DPERR_INVALIDPLAYER MAKE_DPHRESULT( 150 )
1441 #define DPERR_INVALIDGROUP MAKE_DPHRESULT( 155 )
1442 #define DPERR_NOCAPS MAKE_DPHRESULT( 160 )
1443 #define DPERR_NOCONNECTION MAKE_DPHRESULT( 170 )
1444 #define DPERR_NOMEMORY E_OUTOFMEMORY
1445 #define DPERR_OUTOFMEMORY DPERR_NOMEMORY
1446 #define DPERR_NOMESSAGES MAKE_DPHRESULT( 190 )
1447 #define DPERR_NONAMESERVERFOUND MAKE_DPHRESULT( 200 )
1448 #define DPERR_NOPLAYERS MAKE_DPHRESULT( 210 )
1449 #define DPERR_NOSESSIONS MAKE_DPHRESULT( 220 )
1450 #define DPERR_PENDING E_PENDING
1451 #define DPERR_SENDTOOBIG MAKE_DPHRESULT( 230 )
1452 #define DPERR_TIMEOUT MAKE_DPHRESULT( 240 )
1453 #define DPERR_UNAVAILABLE MAKE_DPHRESULT( 250 )
1454 #define DPERR_UNSUPPORTED E_NOTIMPL
1455 #define DPERR_BUSY MAKE_DPHRESULT( 270 )
1456 #define DPERR_USERCANCEL MAKE_DPHRESULT( 280 )
1457 #define DPERR_NOINTERFACE E_NOINTERFACE
1458 #define DPERR_CANNOTCREATESERVER MAKE_DPHRESULT( 290 )
1459 #define DPERR_PLAYERLOST MAKE_DPHRESULT( 300 )
1460 #define DPERR_SESSIONLOST MAKE_DPHRESULT( 310 )
1461 #define DPERR_UNINITIALIZED MAKE_DPHRESULT( 320 )
1462 #define DPERR_NONEWPLAYERS MAKE_DPHRESULT( 330 )
1463 #define DPERR_INVALIDPASSWORD MAKE_DPHRESULT( 340 )
1464 #define DPERR_CONNECTING MAKE_DPHRESULT( 350 )
1467 #define DPERR_BUFFERTOOLARGE MAKE_DPHRESULT( 1000 )
1468 #define DPERR_CANTCREATEPROCESS MAKE_DPHRESULT( 1010 )
1469 #define DPERR_APPNOTSTARTED MAKE_DPHRESULT( 1020 )
1470 #define DPERR_INVALIDINTERFACE MAKE_DPHRESULT( 1030 )
1471 #define DPERR_NOSERVICEPROVIDER MAKE_DPHRESULT( 1040 )
1472 #define DPERR_UNKNOWNAPPLICATION MAKE_DPHRESULT( 1050 )
1473 #define DPERR_NOTLOBBIED MAKE_DPHRESULT( 1070 )
1474 #define DPERR_SERVICEPROVIDERLOADED MAKE_DPHRESULT( 1080 )
1475 #define DPERR_ALREADYREGISTERED MAKE_DPHRESULT( 1090 )
1476 #define DPERR_NOTREGISTERED MAKE_DPHRESULT( 1100 )
1479 // Security related errors
1481 #define DPERR_AUTHENTICATIONFAILED MAKE_DPHRESULT( 2000 )
1482 #define DPERR_CANTLOADSSPI MAKE_DPHRESULT( 2010 )
1483 #define DPERR_ENCRYPTIONFAILED MAKE_DPHRESULT( 2020 )
1484 #define DPERR_SIGNFAILED MAKE_DPHRESULT( 2030 )
1485 #define DPERR_CANTLOADSECURITYPACKAGE MAKE_DPHRESULT( 2040 )
1486 #define DPERR_ENCRYPTIONNOTSUPPORTED MAKE_DPHRESULT( 2050 )
1487 #define DPERR_CANTLOADCAPI MAKE_DPHRESULT( 2060 )
1488 #define DPERR_NOTLOGGEDIN MAKE_DPHRESULT( 2070 )
1489 #define DPERR_LOGONDENIED MAKE_DPHRESULT( 2080 )
1492 /****************************************************************************
1494 * dplay 1.0 obsolete structures + interfaces
1495 * Included for compatibility only. New apps should
1498 ****************************************************************************/
1500 // define this to ignore obsolete interfaces and constants
1501 #ifndef IDIRECTPLAY2_OR_GREATER
1503 #define DPOPEN_OPENSESSION DPOPEN_JOIN
1504 #define DPOPEN_CREATESESSION DPOPEN_CREATE
1506 #define DPENUMSESSIONS_PREVIOUS 0x00000004
1508 #define DPENUMPLAYERS_PREVIOUS 0x00000004
1510 #define DPSEND_GUARANTEE DPSEND_GUARANTEED
1511 #define DPSEND_TRYONCE 0x00000004
1513 #define DPCAPS_NAMESERVICE 0x00000001
1514 #define DPCAPS_NAMESERVER DPCAPS_ISHOST
1515 #define DPCAPS_GUARANTEED 0x00000004
1517 #define DPLONGNAMELEN 52
1518 #define DPSHORTNAMELEN 20
1519 #define DPSESSIONNAMELEN 32
1520 #define DPPASSWORDLEN 16
1521 #define DPUSERRESERVED 16
1523 #define DPSYS_ADDPLAYER 0x0003
1524 #define DPSYS_DELETEPLAYER 0x0005
1526 #define DPSYS_DELETEGROUP 0x0020
1527 #define DPSYS_DELETEPLAYERFROMGRP 0x0021
1528 #define DPSYS_CONNECT 0x484b
1535 char szLongName[DPLONGNAMELEN];
1536 char szShortName[DPSHORTNAMELEN];
1537 DWORD dwCurrentPlayers;
1540 typedef DPMSG_ADDPLAYER DPMSG_ADDGROUP;
1549 typedef DPMSG_GROUPADD DPMSG_GROUPDELETE;
1554 } DPMSG_DELETEPLAYER;
1556 typedef BOOL (PASCAL *LPDPENUMPLAYERSCALLBACK)(
1558 LPSTR lpFriendlyName,
1569 DWORD dwCurrentPlayers;
1571 char szSessionName[DPSESSIONNAMELEN];
1572 char szUserField[DPUSERRESERVED];
1574 char szPassword[DPPASSWORDLEN];
1580 } DPSESSIONDESC,*LPDPSESSIONDESC;
1582 typedef BOOL (PASCAL * LPDPENUMSESSIONSCALLBACK)(
1583 LPDPSESSIONDESC lpDPSessionDesc,
1585 LPDWORD lpdwTimeOut,
1592 #define INTERFACE IDirectPlay
1593 DECLARE_INTERFACE_( IDirectPlay, IUnknown )
1595 /*** IUnknown methods ***/
1596 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
1597 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
1598 STDMETHOD_(ULONG,Release) (THIS) PURE;
1599 /*** IDirectPlay methods ***/
1600 STDMETHOD(AddPlayerToGroup) (THIS_ DPID, DPID) PURE;
1601 STDMETHOD(Close) (THIS) PURE;
1602 STDMETHOD(CreatePlayer) (THIS_ LPDPID,LPSTR,LPSTR,LPHANDLE) PURE;
1603 STDMETHOD(CreateGroup) (THIS_ LPDPID,LPSTR,LPSTR) PURE;
1604 STDMETHOD(DeletePlayerFromGroup)(THIS_ DPID,DPID) PURE;
1605 STDMETHOD(DestroyPlayer) (THIS_ DPID) PURE;
1606 STDMETHOD(DestroyGroup) (THIS_ DPID) PURE;
1607 STDMETHOD(EnableNewPlayers) (THIS_ BOOL) PURE;
1608 STDMETHOD(EnumGroupPlayers) (THIS_ DPID, LPDPENUMPLAYERSCALLBACK,LPVOID,DWORD) PURE;
1609 STDMETHOD(EnumGroups) (THIS_ DWORD, LPDPENUMPLAYERSCALLBACK,LPVOID,DWORD) PURE;
1610 STDMETHOD(EnumPlayers) (THIS_ DWORD, LPDPENUMPLAYERSCALLBACK,LPVOID,DWORD) PURE;
1611 STDMETHOD(EnumSessions) (THIS_ LPDPSESSIONDESC,DWORD,LPDPENUMSESSIONSCALLBACK,LPVOID,DWORD) PURE;
1612 STDMETHOD(GetCaps) (THIS_ LPDPCAPS) PURE;
1613 STDMETHOD(GetMessageCount) (THIS_ DPID, LPDWORD) PURE;
1614 STDMETHOD(GetPlayerCaps) (THIS_ DPID, LPDPCAPS) PURE;
1615 STDMETHOD(GetPlayerName) (THIS_ DPID,LPSTR,LPDWORD,LPSTR,LPDWORD) PURE;
1616 STDMETHOD(Initialize) (THIS_ LPGUID) PURE;
1617 STDMETHOD(Open) (THIS_ LPDPSESSIONDESC) PURE;
1618 STDMETHOD(Receive) (THIS_ LPDPID,LPDPID,DWORD,LPVOID,LPDWORD) PURE;
1619 STDMETHOD(SaveSession) (THIS_ LPSTR) PURE;
1620 STDMETHOD(Send) (THIS_ DPID, DPID, DWORD, LPVOID, DWORD) PURE;
1621 STDMETHOD(SetPlayerName) (THIS_ DPID,LPSTR,LPSTR) PURE;
1624 /****************************************************************************
1626 * IDirectPlay interface macros
1628 ****************************************************************************/
1630 #if !defined(__cplusplus) || defined(CINTERFACE)
1632 #define IDirectPlay_AddPlayerToGroup(p,a,b) (p)->lpVtbl->AddPlayerToGroup(p,a,b)
1633 #define IDirectPlay_Close(p) (p)->lpVtbl->Close(p)
1634 #define IDirectPlay_CreateGroup(p,a,b,c) (p)->lpVtbl->CreateGroup(p,a,b,c)
1635 #define IDirectPlay_CreatePlayer(p,a,b,c,d) (p)->lpVtbl->CreatePlayer(p,a,b,c,d)
1636 #define IDirectPlay_DeletePlayerFromGroup(p,a,b) (p)->lpVtbl->DeletePlayerFromGroup(p,a,b)
1637 #define IDirectPlay_DestroyGroup(p,a) (p)->lpVtbl->DestroyGroup(p,a)
1638 #define IDirectPlay_DestroyPlayer(p,a) (p)->lpVtbl->DestroyPlayer(p,a)
1639 #define IDirectPlay_EnableNewPlayers(p,a) (p)->lpVtbl->EnableNewPlayers(p,a)
1640 #define IDirectPlay_EnumGroupPlayers(p,a,b,c,d) (p)->lpVtbl->EnumGroupPlayers(p,a,b,c,d)
1641 #define IDirectPlay_EnumGroups(p,a,b,c,d) (p)->lpVtbl->EnumGroups(p,a,b,c,d)
1642 #define IDirectPlay_EnumPlayers(p,a,b,c,d) (p)->lpVtbl->EnumPlayers(p,a,b,c,d)
1643 #define IDirectPlay_EnumSessions(p,a,b,c,d,e) (p)->lpVtbl->EnumSessions(p,a,b,c,d,e)
1644 #define IDirectPlay_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a)
1645 #define IDirectPlay_GetMessageCount(p,a,b) (p)->lpVtbl->GetMessageCount(p,a,b)
1646 #define IDirectPlay_GetPlayerCaps(p,a,b) (p)->lpVtbl->GetPlayerCaps(p,a,b)
1647 #define IDirectPlay_GetPlayerName(p,a,b,c,d,e) (p)->lpVtbl->GetPlayerName(p,a,b,c,d,e)
1648 #define IDirectPlay_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
1649 #define IDirectPlay_Open(p,a) (p)->lpVtbl->Open(p,a)
1650 #define IDirectPlay_Receive(p,a,b,c,d,e) (p)->lpVtbl->Receive(p,a,b,c,d,e)
1651 #define IDirectPlay_SaveSession(p,a) (p)->lpVtbl->SaveSession(p,a)
1652 #define IDirectPlay_Send(p,a,b,c,d,e) (p)->lpVtbl->Send(p,a,b,c,d,e)
1653 #define IDirectPlay_SetPlayerName(p,a,b,c) (p)->lpVtbl->SetPlayerName(p,a,b,c)
1657 #define IDirectPlay_AddPlayerToGroup(p,a,b) (p)->AddPlayerToGroup(a,b)
1658 #define IDirectPlay_Close(p) (p)->Close()
1659 #define IDirectPlay_CreateGroup(p,a,b,c) (p)->CreateGroup(a,b,c)
1660 #define IDirectPlay_CreatePlayer(p,a,b,c,d) (p)->CreatePlayer(a,b,c,d)
1661 #define IDirectPlay_DeletePlayerFromGroup(p,a,b) (p)->DeletePlayerFromGroup(a,b)
1662 #define IDirectPlay_DestroyGroup(p,a) (p)->DestroyGroup(a)
1663 #define IDirectPlay_DestroyPlayer(p,a) (p)->DestroyPlayer(a)
1664 #define IDirectPlay_EnableNewPlayers(p,a) (p)->EnableNewPlayers(a)
1665 #define IDirectPlay_EnumGroupPlayers(p,a,b,c,d) (p)->EnumGroupPlayers(a,b,c,d)
1666 #define IDirectPlay_EnumGroups(p,a,b,c,d) (p)->EnumGroups(a,b,c,d)
1667 #define IDirectPlay_EnumPlayers(p,a,b,c,d) (p)->EnumPlayers(a,b,c,d)
1668 #define IDirectPlay_EnumSessions(p,a,b,c,d,e) (p)->EnumSessions(a,b,c,d,e)
1669 #define IDirectPlay_GetCaps(p,a) (p)->GetCaps(a)
1670 #define IDirectPlay_GetMessageCount(p,a,b) (p)->GetMessageCount(a,b)
1671 #define IDirectPlay_GetPlayerCaps(p,a,b) (p)->GetPlayerCaps(a,b)
1672 #define IDirectPlay_GetPlayerName(p,a,b,c,d,e) (p)->GetPlayerName(a,b,c,d,e)
1673 #define IDirectPlay_Initialize(p,a) (p)->Initialize(a)
1674 #define IDirectPlay_Open(p,a) (p)->Open(a)
1675 #define IDirectPlay_Receive(p,a,b,c,d,e) (p)->Receive(a,b,c,d,e)
1676 #define IDirectPlay_SaveSession(p,a) (p)->SaveSession(a)
1677 #define IDirectPlay_Send(p,a,b,c,d,e) (p)->Send(a,b,c,d,e)
1678 #define IDirectPlay_SetPlayerName(p,a,b,c) (p)->SetPlayerName(a,b,c)
1682 DEFINE_GUID(IID_IDirectPlay, 0x5454e9a0, 0xdb65, 0x11ce, 0x92, 0x1c, 0x00, 0xaa, 0x00, 0x6c, 0x49, 0x72);
1684 #endif // IDIRECTPLAY2_OR_GREATER
1686 /****************************************************************************
1688 * IDirectPlay macros (included regardless of IDIRECTPLAY2_OR_GREATER flag)
1690 ****************************************************************************/
1692 #if !defined(__cplusplus) || defined(CINTERFACE)
1694 #define IDirectPlay_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1695 #define IDirectPlay_AddRef(p) (p)->lpVtbl->AddRef(p)
1696 #define IDirectPlay_Release(p) (p)->lpVtbl->Release(p)
1700 #define IDirectPlay_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
1701 #define IDirectPlay_AddRef(p) (p)->AddRef()
1702 #define IDirectPlay_Release(p) (p)->Release()
1704 #endif // IDirectPlay interface macros