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