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