1 |
/*==========================================================================;
|
2 |
*
|
3 |
* Copyright (C) 1994-1997 Microsoft Corporation. All Rights Reserved.
|
4 |
*
|
5 |
* File: dplay.h
|
6 |
* Content: DirectPlay include file
|
7 |
*
|
8 |
***************************************************************************/
|
9 |
|
10 |
#ifndef __DPLAY_INCLUDED__
|
11 |
#define __DPLAY_INCLUDED__
|
12 |
|
13 |
#include <ole2.h> // for DECLARE_INTERFACE and HRESULT
|
14 |
|
15 |
/* avoid warnings in MSVC at Level4 */
|
16 |
#pragma warning(disable:4201)
|
17 |
|
18 |
|
19 |
/*
|
20 |
* Some types
|
21 |
*/
|
22 |
|
23 |
#ifndef _WIN64
|
24 |
#define DWORD_PTR DWORD
|
25 |
#endif
|
26 |
|
27 |
typedef LPVOID (*LPRGLPVOID)[];
|
28 |
typedef LPRGLPVOID PRGPVOID, LPRGPVOID, PRGLPVOID, PAPVOID, LPAPVOID, PALPVOID, LPALPVOID;
|
29 |
|
30 |
#define VOL volatile
|
31 |
typedef VOID *VOL LPVOIDV;
|
32 |
|
33 |
|
34 |
#define _FACDP 0x877
|
35 |
#define MAKE_DPHRESULT( code ) MAKE_HRESULT( 1, _FACDP, code )
|
36 |
|
37 |
#ifdef __cplusplus
|
38 |
extern "C" {
|
39 |
#endif
|
40 |
|
41 |
/*
|
42 |
* GUIDS used by DirectPlay objects
|
43 |
*/
|
44 |
DEFINE_GUID(IID_IDirectPlay2, 0x2b74f7c0, 0x9154, 0x11cf, 0xa9, 0xcd, 0x0, 0xaa, 0x0, 0x68, 0x86, 0xe3);
|
45 |
DEFINE_GUID(IID_IDirectPlay2A,0x9d460580, 0xa822, 0x11cf, 0x96, 0xc, 0x0, 0x80, 0xc7, 0x53, 0x4e, 0x82);
|
46 |
|
47 |
DEFINE_GUID(IID_IDirectPlay3, 0x133efe40, 0x32dc, 0x11d0, 0x9c, 0xfb, 0x0, 0xa0, 0xc9, 0xa, 0x43, 0xcb);
|
48 |
DEFINE_GUID(IID_IDirectPlay3A,0x133efe41, 0x32dc, 0x11d0, 0x9c, 0xfb, 0x0, 0xa0, 0xc9, 0xa, 0x43, 0xcb);
|
49 |
|
50 |
DEFINE_GUID(IID_IDirectPlay4, 0xab1c530, 0x4745, 0x11d1, 0xa7, 0xa1, 0x0, 0x0, 0xf8, 0x3, 0xab, 0xfc);
|
51 |
DEFINE_GUID(IID_IDirectPlay4A,0xab1c531, 0x4745, 0x11d1, 0xa7, 0xa1, 0x0, 0x0, 0xf8, 0x3, 0xab, 0xfc);
|
52 |
|
53 |
// {D1EB6D20-8923-11d0-9D97-00A0C90A43CB}
|
54 |
DEFINE_GUID(CLSID_DirectPlay,0xd1eb6d20, 0x8923, 0x11d0, 0x9d, 0x97, 0x0, 0xa0, 0xc9, 0xa, 0x43, 0xcb);
|
55 |
|
56 |
/*
|
57 |
* GUIDS used by Service Providers shipped with DirectPlay
|
58 |
* Use these to identify Service Provider returned by EnumConnections
|
59 |
*/
|
60 |
|
61 |
// GUID for IPX service provider
|
62 |
// {685BC400-9D2C-11cf-A9CD-00AA006886E3}
|
63 |
DEFINE_GUID(DPSPGUID_IPX,
|
64 |
0x685bc400, 0x9d2c, 0x11cf, 0xa9, 0xcd, 0x0, 0xaa, 0x0, 0x68, 0x86, 0xe3);
|
65 |
|
66 |
// GUID for TCP/IP service provider
|
67 |
// 36E95EE0-8577-11cf-960C-0080C7534E82
|
68 |
DEFINE_GUID(DPSPGUID_TCPIP,
|
69 |
0x36E95EE0, 0x8577, 0x11cf, 0x96, 0xc, 0x0, 0x80, 0xc7, 0x53, 0x4e, 0x82);
|
70 |
|
71 |
// GUID for Serial service provider
|
72 |
// {0F1D6860-88D9-11cf-9C4E-00A0C905425E}
|
73 |
DEFINE_GUID(DPSPGUID_SERIAL,
|
74 |
0xf1d6860, 0x88d9, 0x11cf, 0x9c, 0x4e, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e);
|
75 |
|
76 |
// GUID for Modem service provider
|
77 |
// {44EAA760-CB68-11cf-9C4E-00A0C905425E}
|
78 |
DEFINE_GUID(DPSPGUID_MODEM,
|
79 |
0x44eaa760, 0xcb68, 0x11cf, 0x9c, 0x4e, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e);
|
80 |
|
81 |
/****************************************************************************
|
82 |
*
|
83 |
* DirectPlay Structures
|
84 |
*
|
85 |
* Various structures used to invoke DirectPlay.
|
86 |
*
|
87 |
****************************************************************************/
|
88 |
|
89 |
#ifndef IDIRECTPLAY2_OR_GREATER
|
90 |
typedef struct IDirectPlay FAR *LPDIRECTPLAY;
|
91 |
#else
|
92 |
typedef struct IUnknown FAR *LPDIRECTPLAY;
|
93 |
#endif
|
94 |
|
95 |
typedef struct IDirectPlay2 FAR *LPDIRECTPLAY2;
|
96 |
typedef struct IDirectPlay2 FAR *LPDIRECTPLAY2A;
|
97 |
typedef struct IDirectPlay2 IDirectPlay2A;
|
98 |
|
99 |
typedef struct IDirectPlay3 FAR *LPDIRECTPLAY3;
|
100 |
typedef struct IDirectPlay3 FAR *LPDIRECTPLAY3A;
|
101 |
typedef struct IDirectPlay3 IDirectPlay3A;
|
102 |
|
103 |
typedef struct IDirectPlay4 FAR *LPDIRECTPLAY4;
|
104 |
typedef struct IDirectPlay4 FAR *LPDIRECTPLAY4A;
|
105 |
typedef struct IDirectPlay4 IDirectPlay4A;
|
106 |
|
107 |
/*
|
108 |
* DPID
|
109 |
* DirectPlay player and group ID
|
110 |
*/
|
111 |
typedef DWORD DPID, FAR *LPDPID;
|
112 |
|
113 |
/*
|
114 |
* DPID that system messages come from
|
115 |
*/
|
116 |
#define DPID_SYSMSG 0
|
117 |
|
118 |
/*
|
119 |
* DPID representing all players in the session
|
120 |
*/
|
121 |
#define DPID_ALLPLAYERS 0
|
122 |
|
123 |
/*
|
124 |
* DPID representing the server player
|
125 |
*/
|
126 |
#define DPID_SERVERPLAYER 1
|
127 |
|
128 |
|
129 |
/*
|
130 |
* DPID representing the maxiumum ID in the range of DPID's reserved for
|
131 |
* use by DirectPlay.
|
132 |
*/
|
133 |
#define DPID_RESERVEDRANGE 100
|
134 |
|
135 |
/*
|
136 |
* The player ID is unknown (used with e.g. DPSESSION_NOMESSAGEID)
|
137 |
*/
|
138 |
#define DPID_UNKNOWN 0xFFFFFFFF
|
139 |
|
140 |
/*
|
141 |
* DPCAPS
|
142 |
* Used to obtain the capabilities of a DirectPlay object
|
143 |
*/
|
144 |
typedef struct
|
145 |
{
|
146 |
DWORD dwSize; // Size of structure, in bytes
|
147 |
DWORD dwFlags; // DPCAPS_xxx flags
|
148 |
DWORD dwMaxBufferSize; // Maximum message size, in bytes, for this service provider
|
149 |
DWORD dwMaxQueueSize; // Obsolete.
|
150 |
DWORD dwMaxPlayers; // Maximum players/groups (local + remote)
|
151 |
DWORD dwHundredBaud; // Bandwidth in 100 bits per second units;
|
152 |
// i.e. 24 is 2400, 96 is 9600, etc.
|
153 |
DWORD dwLatency; // Estimated latency; 0 = unknown
|
154 |
DWORD dwMaxLocalPlayers; // Maximum # of locally created players allowed
|
155 |
DWORD dwHeaderLength; // Maximum header length, in bytes, on messages
|
156 |
// added by the service provider
|
157 |
DWORD dwTimeout; // Service provider's suggested timeout value
|
158 |
// This is how long DirectPlay will wait for
|
159 |
// responses to system messages
|
160 |
} DPCAPS, FAR *LPDPCAPS;
|
161 |
|
162 |
/*
|
163 |
* This DirectPlay object is the session host. If the host exits the
|
164 |
* session, another application will become the host and receive a
|
165 |
* DPSYS_HOST system message.
|
166 |
*/
|
167 |
#define DPCAPS_ISHOST 0x00000002
|
168 |
|
169 |
/*
|
170 |
* The service provider bound to this DirectPlay object can optimize
|
171 |
* group messaging.
|
172 |
*/
|
173 |
#define DPCAPS_GROUPOPTIMIZED 0x00000008
|
174 |
|
175 |
/*
|
176 |
* The service provider bound to this DirectPlay object can optimize
|
177 |
* keep alives (see DPSESSION_KEEPALIVE)
|
178 |
*/
|
179 |
#define DPCAPS_KEEPALIVEOPTIMIZED 0x00000010
|
180 |
|
181 |
/*
|
182 |
* The service provider bound to this DirectPlay object can optimize
|
183 |
* guaranteed message delivery.
|
184 |
*/
|
185 |
#define DPCAPS_GUARANTEEDOPTIMIZED 0x00000020
|
186 |
|
187 |
/*
|
188 |
* This DirectPlay object supports guaranteed message delivery.
|
189 |
*/
|
190 |
#define DPCAPS_GUARANTEEDSUPPORTED 0x00000040
|
191 |
|
192 |
/*
|
193 |
* This DirectPlay object supports digital signing of messages.
|
194 |
*/
|
195 |
#define DPCAPS_SIGNINGSUPPORTED 0x00000080
|
196 |
|
197 |
/*
|
198 |
* This DirectPlay object supports encryption of messages.
|
199 |
*/
|
200 |
#define DPCAPS_ENCRYPTIONSUPPORTED 0x00000100
|
201 |
|
202 |
/*
|
203 |
* This DirectPlay player was created on this machine
|
204 |
*/
|
205 |
#define DPPLAYERCAPS_LOCAL 0x00000800
|
206 |
|
207 |
/*
|
208 |
* Current Open settings supports all forms of Cancel
|
209 |
*/
|
210 |
#define DPCAPS_ASYNCCANCELSUPPORTED 0x00001000
|
211 |
|
212 |
/*
|
213 |
* Current Open settings supports CancelAll, but not Cancel
|
214 |
*/
|
215 |
#define DPCAPS_ASYNCCANCELALLSUPPORTED 0x00002000
|
216 |
|
217 |
/*
|
218 |
* Current Open settings supports Send Timeouts for sends
|
219 |
*/
|
220 |
#define DPCAPS_SENDTIMEOUTSUPPORTED 0x00004000
|
221 |
|
222 |
/*
|
223 |
* Current Open settings supports send priority
|
224 |
*/
|
225 |
#define DPCAPS_SENDPRIORITYSUPPORTED 0x00008000
|
226 |
|
227 |
/*
|
228 |
* Current Open settings supports DPSEND_ASYNC flag
|
229 |
*/
|
230 |
#define DPCAPS_ASYNCSUPPORTED 0x00010000
|
231 |
|
232 |
|
233 |
/*
|
234 |
* DPSESSIONDESC2
|
235 |
* Used to describe the properties of a DirectPlay
|
236 |
* session instance
|
237 |
*/
|
238 |
typedef struct
|
239 |
{
|
240 |
DWORD dwSize; // Size of structure
|
241 |
DWORD dwFlags; // DPSESSION_xxx flags
|
242 |
GUID guidInstance; // ID for the session instance
|
243 |
GUID guidApplication; // GUID of the DirectPlay application.
|
244 |
// GUID_NULL for all applications.
|
245 |
DWORD dwMaxPlayers; // Maximum # players allowed in session
|
246 |
DWORD dwCurrentPlayers; // Current # players in session (read only)
|
247 |
union
|
248 |
{ // Name of the session
|
249 |
LPWSTR lpszSessionName; // Unicode
|
250 |
LPSTR lpszSessionNameA; // ANSI
|
251 |
};
|
252 |
union
|
253 |
{ // Password of the session (optional)
|
254 |
LPWSTR lpszPassword; // Unicode
|
255 |
LPSTR lpszPasswordA; // ANSI
|
256 |
};
|
257 |
DWORD_PTR dwReserved1; // Reserved for future MS use.
|
258 |
DWORD_PTR dwReserved2;
|
259 |
DWORD_PTR dwUser1; // For use by the application
|
260 |
DWORD_PTR dwUser2;
|
261 |
DWORD_PTR dwUser3;
|
262 |
DWORD_PTR dwUser4;
|
263 |
} DPSESSIONDESC2, FAR *LPDPSESSIONDESC2;
|
264 |
|
265 |
typedef DPSESSIONDESC2 * VOL LPDPSESSIONDESC2_V;
|
266 |
|
267 |
/*
|
268 |
* LPCDPSESSIONDESC2
|
269 |
* A constant pointer to DPSESSIONDESC2
|
270 |
*/
|
271 |
typedef const DPSESSIONDESC2 FAR *LPCDPSESSIONDESC2;
|
272 |
|
273 |
/*
|
274 |
* Applications cannot create new players in this session.
|
275 |
*/
|
276 |
#define DPSESSION_NEWPLAYERSDISABLED 0x00000001
|
277 |
|
278 |
/*
|
279 |
* If the DirectPlay object that created the session, the host,
|
280 |
* quits, then the host will attempt to migrate to another
|
281 |
* DirectPlay object so that new players can continue to be created
|
282 |
* and new applications can join the session.
|
283 |
*/
|
284 |
#define DPSESSION_MIGRATEHOST 0x00000004
|
285 |
|
286 |
/*
|
287 |
* This flag tells DirectPlay not to set the idPlayerTo and idPlayerFrom
|
288 |
* fields in player messages. This cuts two DWORD's off the message
|
289 |
* overhead.
|
290 |
*/
|
291 |
#define DPSESSION_NOMESSAGEID 0x00000008
|
292 |
|
293 |
|
294 |
/*
|
295 |
* This flag tells DirectPlay to not allow any new applications to
|
296 |
* join the session. Applications already in the session can still
|
297 |
* create new players.
|
298 |
*/
|
299 |
#define DPSESSION_JOINDISABLED 0x00000020
|
300 |
|
301 |
/*
|
302 |
* This flag tells DirectPlay to detect when remote players
|
303 |
* exit abnormally (e.g. their computer or modem gets unplugged)
|
304 |
*/
|
305 |
#define DPSESSION_KEEPALIVE 0x00000040
|
306 |
|
307 |
/*
|
308 |
* This flag tells DirectPlay not to send a message to all players
|
309 |
* when a players remote data changes
|
310 |
*/
|
311 |
#define DPSESSION_NODATAMESSAGES 0x00000080
|
312 |
|
313 |
/*
|
314 |
* This flag indicates that the session belongs to a secure server
|
315 |
* and needs user authentication
|
316 |
*/
|
317 |
#define DPSESSION_SECURESERVER 0x00000100
|
318 |
|
319 |
/*
|
320 |
* This flag indicates that the session is private and requirs a password
|
321 |
* for EnumSessions as well as Open.
|
322 |
*/
|
323 |
#define DPSESSION_PRIVATE 0x00000200
|
324 |
|
325 |
/*
|
326 |
* This flag indicates that the session requires a password for joining.
|
327 |
*/
|
328 |
#define DPSESSION_PASSWORDREQUIRED 0x00000400
|
329 |
|
330 |
/*
|
331 |
* This flag tells DirectPlay to route all messages through the server
|
332 |
*/
|
333 |
#define DPSESSION_MULTICASTSERVER 0x00000800
|
334 |
|
335 |
/*
|
336 |
* This flag tells DirectPlay to only download information about the
|
337 |
* DPPLAYER_SERVERPLAYER.
|
338 |
*/
|
339 |
#define DPSESSION_CLIENTSERVER 0x00001000
|
340 |
|
341 |
/*
|
342 |
* This flag tells DirectPlay to use the protocol built into dplay
|
343 |
* for reliability and statistics all the time. When this bit is
|
344 |
* set, only other sessions with this bit set can join or be joined.
|
345 |
*/
|
346 |
#define DPSESSION_DIRECTPLAYPROTOCOL 0x00002000
|
347 |
|
348 |
/*
|
349 |
* This flag tells DirectPlay that preserving order of received
|
350 |
* packets is not important, when using reliable delivery. This
|
351 |
* will allow messages to be indicated out of order if preceding
|
352 |
* messages have not yet arrived. Otherwise DPLAY will wait for
|
353 |
* earlier messages before delivering later reliable messages.
|
354 |
*/
|
355 |
#define DPSESSION_NOPRESERVEORDER 0x00004000
|
356 |
|
357 |
|
358 |
/*
|
359 |
* This flag tells DirectPlay to optimize communication for latency
|
360 |
*/
|
361 |
#define DPSESSION_OPTIMIZELATENCY 0x00008000
|
362 |
|
363 |
/*
|
364 |
* This flag allows lobby launched games that aren't voice enabled
|
365 |
* to get voice capabilities.
|
366 |
*/
|
367 |
#define DPSESSION_ALLOWVOICERETRO 0x00010000
|
368 |
|
369 |
/*
|
370 |
* This flag supresses transmission of session desc changes.
|
371 |
* DPSESSION_NODATAMESSAGES was supposed to do that, but SetSessionDesc
|
372 |
* was ignoring the flag and some apps depended on the broken behavior, this
|
373 |
* flag allows applications to get the right behaviour without breaking apps depending
|
374 |
* on old broken behavior.
|
375 |
*/
|
376 |
#define DPSESSION_NOSESSIONDESCMESSAGES 0x00020000
|
377 |
|
378 |
/*
|
379 |
* DPNAME
|
380 |
* Used to hold the name of a DirectPlay entity
|
381 |
* like a player or a group
|
382 |
*/
|
383 |
typedef struct
|
384 |
{
|
385 |
DWORD dwSize; // Size of structure
|
386 |
DWORD dwFlags; // Not used. Must be zero.
|
387 |
union
|
388 |
{ // The short or friendly name
|
389 |
LPWSTR lpszShortName; // Unicode
|
390 |
LPSTR lpszShortNameA; // ANSI
|
391 |
};
|
392 |
union
|
393 |
{ // The long or formal name
|
394 |
LPWSTR lpszLongName; // Unicode
|
395 |
LPSTR lpszLongNameA; // ANSI
|
396 |
};
|
397 |
|
398 |
} DPNAME, FAR *LPDPNAME;
|
399 |
|
400 |
/*
|
401 |
* LPCDPNAME
|
402 |
* A constant pointer to DPNAME
|
403 |
*/
|
404 |
typedef const DPNAME FAR *LPCDPNAME;
|
405 |
|
406 |
/*
|
407 |
* DPCREDENTIALS
|
408 |
* Used to hold the user name and password of a DirectPlay user
|
409 |
*/
|
410 |
typedef struct
|
411 |
{
|
412 |
DWORD dwSize; // Size of structure
|
413 |
DWORD dwFlags; // Not used. Must be zero.
|
414 |
union
|
415 |
{ // User name of the account
|
416 |
LPWSTR lpszUsername; // Unicode
|
417 |
LPSTR lpszUsernameA; // ANSI
|
418 |
};
|
419 |
union
|
420 |
{ // Password of the account
|
421 |
LPWSTR lpszPassword; // Unicode
|
422 |
LPSTR lpszPasswordA; // ANSI
|
423 |
};
|
424 |
union
|
425 |
{ // Domain name of the account
|
426 |
LPWSTR lpszDomain; // Unicode
|
427 |
LPSTR lpszDomainA; // ANSI
|
428 |
};
|
429 |
} DPCREDENTIALS, FAR *LPDPCREDENTIALS;
|
430 |
|
431 |
typedef const DPCREDENTIALS FAR *LPCDPCREDENTIALS;
|
432 |
|
433 |
/*
|
434 |
* DPSECURITYDESC
|
435 |
* Used to describe the security properties of a DirectPlay
|
436 |
* session instance
|
437 |
*/
|
438 |
typedef struct
|
439 |
{
|
440 |
DWORD dwSize; // Size of structure
|
441 |
DWORD dwFlags; // Not used. Must be zero.
|
442 |
union
|
443 |
{ // SSPI provider name
|
444 |
LPWSTR lpszSSPIProvider; // Unicode
|
445 |
LPSTR lpszSSPIProviderA; // ANSI
|
446 |
};
|
447 |
union
|
448 |
{ // CAPI provider name
|
449 |
LPWSTR lpszCAPIProvider; // Unicode
|
450 |
LPSTR lpszCAPIProviderA; // ANSI
|
451 |
};
|
452 |
DWORD dwCAPIProviderType; // Crypto Service Provider type
|
453 |
DWORD dwEncryptionAlgorithm; // Encryption Algorithm type
|
454 |
} DPSECURITYDESC, FAR *LPDPSECURITYDESC;
|
455 |
|
456 |
typedef const DPSECURITYDESC FAR *LPCDPSECURITYDESC;
|
457 |
|
458 |
/*
|
459 |
* DPACCOUNTDESC
|
460 |
* Used to describe a user membership account
|
461 |
*/
|
462 |
typedef struct
|
463 |
{
|
464 |
DWORD dwSize; // Size of structure
|
465 |
DWORD dwFlags; // Not used. Must be zero.
|
466 |
union
|
467 |
{ // Account identifier
|
468 |
LPWSTR lpszAccountID; // Unicode
|
469 |
LPSTR lpszAccountIDA; // ANSI
|
470 |
};
|
471 |
} DPACCOUNTDESC, FAR *LPDPACCOUNTDESC;
|
472 |
|
473 |
typedef const DPACCOUNTDESC FAR *LPCDPACCOUNTDESC;
|
474 |
|
475 |
/*
|
476 |
* LPCGUID
|
477 |
* A constant pointer to a guid
|
478 |
*/
|
479 |
typedef const GUID FAR *LPCGUID;
|
480 |
|
481 |
/*
|
482 |
* DPLCONNECTION
|
483 |
* Used to hold all in the informaion needed to connect
|
484 |
* an application to a session or create a session
|
485 |
*/
|
486 |
typedef struct
|
487 |
{
|
488 |
DWORD dwSize; // Size of this structure
|
489 |
DWORD dwFlags; // Flags specific to this structure
|
490 |
LPDPSESSIONDESC2 lpSessionDesc; // Pointer to session desc to use on connect
|
491 |
LPDPNAME lpPlayerName; // Pointer to Player name structure
|
492 |
GUID guidSP; // GUID of the DPlay SP to use
|
493 |
LPVOID lpAddress; // Address for service provider
|
494 |
DWORD dwAddressSize; // Size of address data
|
495 |
} DPLCONNECTION, FAR *LPDPLCONNECTION;
|
496 |
|
497 |
/*
|
498 |
* LPCDPLCONNECTION
|
499 |
* A constant pointer to DPLCONNECTION
|
500 |
*/
|
501 |
typedef const DPLCONNECTION FAR *LPCDPLCONNECTION;
|
502 |
|
503 |
/*
|
504 |
* DPCHAT
|
505 |
* Used to hold the a DirectPlay chat message
|
506 |
*/
|
507 |
typedef struct
|
508 |
{
|
509 |
DWORD dwSize;
|
510 |
DWORD dwFlags;
|
511 |
union
|
512 |
{ // Message string
|
513 |
LPWSTR lpszMessage; // Unicode
|
514 |
LPSTR lpszMessageA; // ANSI
|
515 |
};
|
516 |
} DPCHAT, FAR * LPDPCHAT;
|
517 |
|
518 |
/*
|
519 |
* SGBUFFER
|
520 |
* Scatter Gather Buffer used for SendEx
|
521 |
*/
|
522 |
typedef struct
|
523 |
{
|
524 |
UINT len; // length of buffer data
|
525 |
PUCHAR pData; // pointer to buffer data
|
526 |
} SGBUFFER, *PSGBUFFER, FAR *LPSGBUFFER;
|
527 |
|
528 |
|
529 |
/****************************************************************************
|
530 |
*
|
531 |
* Prototypes for DirectPlay callback functions
|
532 |
*
|
533 |
****************************************************************************/
|
534 |
|
535 |
/*
|
536 |
* Callback for IDirectPlay2::EnumSessions
|
537 |
*/
|
538 |
typedef BOOL (FAR PASCAL * LPDPENUMSESSIONSCALLBACK2)(
|
539 |
LPCDPSESSIONDESC2 lpThisSD,
|
540 |
LPDWORD lpdwTimeOut,
|
541 |
DWORD dwFlags,
|
542 |
LPVOID lpContext );
|
543 |
|
544 |
/*
|
545 |
* This flag is set on the EnumSessions callback dwFlags parameter when
|
546 |
* the time out has occurred. There will be no session data for this
|
547 |
* callback. If *lpdwTimeOut is set to a non-zero value and the
|
548 |
* EnumSessionsCallback function returns TRUE then EnumSessions will
|
549 |
* continue waiting until the next timeout occurs. Timeouts are in
|
550 |
* milliseconds.
|
551 |
*/
|
552 |
#define DPESC_TIMEDOUT 0x00000001
|
553 |
|
554 |
|
555 |
/*
|
556 |
* Callback for IDirectPlay2::EnumPlayers
|
557 |
* IDirectPlay2::EnumGroups
|
558 |
* IDirectPlay2::EnumGroupPlayers
|
559 |
*/
|
560 |
typedef BOOL (FAR PASCAL *LPDPENUMPLAYERSCALLBACK2)(
|
561 |
DPID dpId,
|
562 |
DWORD dwPlayerType,
|
563 |
LPCDPNAME lpName,
|
564 |
DWORD dwFlags,
|
565 |
LPVOID lpContext );
|
566 |
|
567 |
|
568 |
/*
|
569 |
* Unicode callback for DirectPlayEnumerate
|
570 |
* This callback prototype will be used if compiling
|
571 |
* for Unicode strings
|
572 |
*/
|
573 |
typedef BOOL (FAR PASCAL * LPDPENUMDPCALLBACK)(
|
574 |
LPGUID lpguidSP,
|
575 |
LPWSTR lpSPName,
|
576 |
DWORD dwMajorVersion,
|
577 |
DWORD dwMinorVersion,
|
578 |
LPVOID lpContext);
|
579 |
|
580 |
/*
|
581 |
* ANSI callback for DirectPlayEnumerate
|
582 |
* This callback prototype will be used if compiling
|
583 |
* for ANSI strings
|
584 |
*/
|
585 |
typedef BOOL (FAR PASCAL * LPDPENUMDPCALLBACKA)(
|
586 |
LPGUID lpguidSP,
|
587 |
LPSTR lpSPName,
|
588 |
DWORD dwMajorVersion,
|
589 |
DWORD dwMinorVersion,
|
590 |
LPVOID lpContext);
|
591 |
|
592 |
/*
|
593 |
* Callback for IDirectPlay3(A)::EnumConnections
|
594 |
*/
|
595 |
typedef BOOL (FAR PASCAL * LPDPENUMCONNECTIONSCALLBACK)(
|
596 |
LPCGUID lpguidSP,
|
597 |
LPVOID lpConnection,
|
598 |
DWORD dwConnectionSize,
|
599 |
LPCDPNAME lpName,
|
600 |
DWORD dwFlags,
|
601 |
LPVOID lpContext);
|
602 |
|
603 |
|
604 |
/*
|
605 |
* API's
|
606 |
*/
|
607 |
|
608 |
#ifdef UNICODE
|
609 |
#define DirectPlayEnumerate DirectPlayEnumerateW
|
610 |
#else
|
611 |
#define DirectPlayEnumerate DirectPlayEnumerateA
|
612 |
#endif // UNICODE
|
613 |
|
614 |
extern HRESULT WINAPI DirectPlayEnumerateA( LPDPENUMDPCALLBACKA, LPVOID );
|
615 |
extern HRESULT WINAPI DirectPlayEnumerateW( LPDPENUMDPCALLBACK, LPVOID );
|
616 |
extern HRESULT WINAPI DirectPlayCreate( LPGUID lpGUID, LPDIRECTPLAY *lplpDP, IUnknown *pUnk);
|
617 |
|
618 |
/****************************************************************************
|
619 |
*
|
620 |
* IDirectPlay2 (and IDirectPlay2A) Interface
|
621 |
*
|
622 |
****************************************************************************/
|
623 |
|
624 |
#undef INTERFACE
|
625 |
#define INTERFACE IDirectPlay2
|
626 |
DECLARE_INTERFACE_( IDirectPlay2, IUnknown )
|
627 |
{
|
628 |
/*** IUnknown methods ***/
|
629 |
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
|
630 |
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
|
631 |
STDMETHOD_(ULONG,Release) (THIS) PURE;
|
632 |
/*** IDirectPlay2 methods ***/
|
633 |
STDMETHOD(AddPlayerToGroup) (THIS_ DPID, DPID) PURE;
|
634 |
STDMETHOD(Close) (THIS) PURE;
|
635 |
STDMETHOD(CreateGroup) (THIS_ LPDPID,LPDPNAME,LPVOID,DWORD,DWORD) PURE;
|
636 |
STDMETHOD(CreatePlayer) (THIS_ LPDPID,LPDPNAME,HANDLE,LPVOID,DWORD,DWORD) PURE;
|
637 |
STDMETHOD(DeletePlayerFromGroup)(THIS_ DPID,DPID) PURE;
|
638 |
STDMETHOD(DestroyGroup) (THIS_ DPID) PURE;
|
639 |
STDMETHOD(DestroyPlayer) (THIS_ DPID) PURE;
|
640 |
STDMETHOD(EnumGroupPlayers) (THIS_ DPID,LPGUID,LPDPENUMPLAYERSCALLBACK2,LPVOID,DWORD) PURE;
|
641 |
STDMETHOD(EnumGroups) (THIS_ LPGUID,LPDPENUMPLAYERSCALLBACK2,LPVOID,DWORD) PURE;
|
642 |
STDMETHOD(EnumPlayers) (THIS_ LPGUID,LPDPENUMPLAYERSCALLBACK2,LPVOID,DWORD) PURE;
|
643 |
STDMETHOD(EnumSessions) (THIS_ LPDPSESSIONDESC2,DWORD,LPDPENUMSESSIONSCALLBACK2,LPVOID,DWORD) PURE;
|
644 |
STDMETHOD(GetCaps) (THIS_ LPDPCAPS,DWORD) PURE;
|
645 |
STDMETHOD(GetGroupData) (THIS_ DPID,LPVOID,LPDWORD,DWORD) PURE;
|
646 |
STDMETHOD(GetGroupName) (THIS_ DPID,LPVOID,LPDWORD) PURE;
|
647 |
STDMETHOD(GetMessageCount) (THIS_ DPID, LPDWORD) PURE;
|
648 |
STDMETHOD(GetPlayerAddress) (THIS_ DPID,LPVOID,LPDWORD) PURE;
|
649 |
STDMETHOD(GetPlayerCaps) (THIS_ DPID,LPDPCAPS,DWORD) PURE;
|
650 |
STDMETHOD(GetPlayerData) (THIS_ DPID,LPVOID,LPDWORD,DWORD) PURE;
|
651 |
STDMETHOD(GetPlayerName) (THIS_ DPID,LPVOID,LPDWORD) PURE;
|
652 |
STDMETHOD(GetSessionDesc) (THIS_ LPVOID,LPDWORD) PURE;
|
653 |
STDMETHOD(Initialize) (THIS_ LPGUID) PURE;
|
654 |
STDMETHOD(Open) (THIS_ LPDPSESSIONDESC2,DWORD) PURE;
|
655 |
STDMETHOD(Receive) (THIS_ LPDPID,LPDPID,DWORD,LPVOID,LPDWORD) PURE;
|
656 |
STDMETHOD(Send) (THIS_ DPID, DPID, DWORD, LPVOID, DWORD) PURE;
|
657 |
STDMETHOD(SetGroupData) (THIS_ DPID,LPVOID,DWORD,DWORD) PURE;
|
658 |
STDMETHOD(SetGroupName) (THIS_ DPID,LPDPNAME,DWORD) PURE;
|
659 |
STDMETHOD(SetPlayerData) (THIS_ DPID,LPVOID,DWORD,DWORD) PURE;
|
660 |
STDMETHOD(SetPlayerName) (THIS_ DPID,LPDPNAME,DWORD) PURE;
|
661 |
STDMETHOD(SetSessionDesc) (THIS_ LPDPSESSIONDESC2,DWORD) PURE;
|
662 |
};
|
663 |
|
664 |
/****************************************************************************
|
665 |
*
|
666 |
* IDirectPlay2 interface macros
|
667 |
*
|
668 |
****************************************************************************/
|
669 |
|
670 |
#if !defined(__cplusplus) || defined(CINTERFACE)
|
671 |
|
672 |
#define IDirectPlay2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
|
673 |
#define IDirectPlay2_AddRef(p) (p)->lpVtbl->AddRef(p)
|
674 |
#define IDirectPlay2_Release(p) (p)->lpVtbl->Release(p)
|
675 |
#define IDirectPlay2_AddPlayerToGroup(p,a,b) (p)->lpVtbl->AddPlayerToGroup(p,a,b)
|
676 |
#define IDirectPlay2_Close(p) (p)->lpVtbl->Close(p)
|
677 |
#define IDirectPlay2_CreateGroup(p,a,b,c,d,e) (p)->lpVtbl->CreateGroup(p,a,b,c,d,e)
|
678 |
#define IDirectPlay2_CreatePlayer(p,a,b,c,d,e,f) (p)->lpVtbl->CreatePlayer(p,a,b,c,d,e,f)
|
679 |
#define IDirectPlay2_DeletePlayerFromGroup(p,a,b) (p)->lpVtbl->DeletePlayerFromGroup(p,a,b)
|
680 |
#define IDirectPlay2_DestroyGroup(p,a) (p)->lpVtbl->DestroyGroup(p,a)
|
681 |
#define IDirectPlay2_DestroyPlayer(p,a) (p)->lpVtbl->DestroyPlayer(p,a)
|
682 |
#define IDirectPlay2_EnumGroupPlayers(p,a,b,c,d,e) (p)->lpVtbl->EnumGroupPlayers(p,a,b,c,d,e)
|
683 |
#define IDirectPlay2_EnumGroups(p,a,b,c,d) (p)->lpVtbl->EnumGroups(p,a,b,c,d)
|
684 |
#define IDirectPlay2_EnumPlayers(p,a,b,c,d) (p)->lpVtbl->EnumPlayers(p,a,b,c,d)
|
685 |
#define IDirectPlay2_EnumSessions(p,a,b,c,d,e) (p)->lpVtbl->EnumSessions(p,a,b,c,d,e)
|
686 |
#define IDirectPlay2_GetCaps(p,a,b) (p)->lpVtbl->GetCaps(p,a,b)
|
687 |
#define IDirectPlay2_GetMessageCount(p,a,b) (p)->lpVtbl->GetMessageCount(p,a,b)
|
688 |
#define IDirectPlay2_GetGroupData(p,a,b,c,d) (p)->lpVtbl->GetGroupData(p,a,b,c,d)
|
689 |
#define IDirectPlay2_GetGroupName(p,a,b,c) (p)->lpVtbl->GetGroupName(p,a,b,c)
|
690 |
#define IDirectPlay2_GetPlayerAddress(p,a,b,c) (p)->lpVtbl->GetPlayerAddress(p,a,b,c)
|
691 |
#define IDirectPlay2_GetPlayerCaps(p,a,b,c) (p)->lpVtbl->GetPlayerCaps(p,a,b,c)
|
692 |
#define IDirectPlay2_GetPlayerData(p,a,b,c,d) (p)->lpVtbl->GetPlayerData(p,a,b,c,d)
|
693 |
#define IDirectPlay2_GetPlayerName(p,a,b,c) (p)->lpVtbl->GetPlayerName(p,a,b,c)
|
694 |
#define IDirectPlay2_GetSessionDesc(p,a,b) (p)->lpVtbl->GetSessionDesc(p,a,b)
|
695 |
#define IDirectPlay2_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
|
696 |
#define IDirectPlay2_Open(p,a,b) (p)->lpVtbl->Open(p,a,b)
|
697 |
#define IDirectPlay2_Receive(p,a,b,c,d,e) (p)->lpVtbl->Receive(p,a,b,c,d,e)
|
698 |
#define IDirectPlay2_Send(p,a,b,c,d,e) (p)->lpVtbl->Send(p,a,b,c,d,e)
|
699 |
#define IDirectPlay2_SetGroupData(p,a,b,c,d) (p)->lpVtbl->SetGroupData(p,a,b,c,d)
|
700 |
#define IDirectPlay2_SetGroupName(p,a,b,c) (p)->lpVtbl->SetGroupName(p,a,b,c)
|
701 |
#define IDirectPlay2_SetPlayerData(p,a,b,c,d) (p)->lpVtbl->SetPlayerData(p,a,b,c,d)
|
702 |
#define IDirectPlay2_SetPlayerName(p,a,b,c) (p)->lpVtbl->SetPlayerName(p,a,b,c)
|
703 |
#define IDirectPlay2_SetSessionDesc(p,a,b) (p)->lpVtbl->SetSessionDesc(p,a,b)
|
704 |
|
705 |
#else /* C++ */
|
706 |
|
707 |
#define IDirectPlay2_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
|
708 |
#define IDirectPlay2_AddRef(p) (p)->AddRef()
|
709 |
#define IDirectPlay2_Release(p) (p)->Release()
|
710 |
#define IDirectPlay2_AddPlayerToGroup(p,a,b) (p)->AddPlayerToGroup(a,b)
|
711 |
#define IDirectPlay2_Close(p) (p)->Close()
|
712 |
#define IDirectPlay2_CreateGroup(p,a,b,c,d,e) (p)->CreateGroup(a,b,c,d,e)
|
713 |
#define IDirectPlay2_CreatePlayer(p,a,b,c,d,e,f) (p)->CreatePlayer(a,b,c,d,e,f)
|
714 |
#define IDirectPlay2_DeletePlayerFromGroup(p,a,b) (p)->DeletePlayerFromGroup(a,b)
|
715 |
#define IDirectPlay2_DestroyGroup(p,a) (p)->DestroyGroup(a)
|
716 |
#define IDirectPlay2_DestroyPlayer(p,a) (p)->DestroyPlayer(a)
|
717 |
#define IDirectPlay2_EnumGroupPlayers(p,a,b,c,d,e) (p)->EnumGroupPlayers(a,b,c,d,e)
|
718 |
#define IDirectPlay2_EnumGroups(p,a,b,c,d) (p)->EnumGroups(a,b,c,d)
|
719 |
#define IDirectPlay2_EnumPlayers(p,a,b,c,d) (p)->EnumPlayers(a,b,c,d)
|
720 |
#define IDirectPlay2_EnumSessions(p,a,b,c,d,e) (p)->EnumSessions(a,b,c,d,e)
|
721 |
#define IDirectPlay2_GetCaps(p,a,b) (p)->GetCaps(a,b)
|
722 |
#define IDirectPlay2_GetMessageCount(p,a,b) (p)->GetMessageCount(a,b)
|
723 |
#define IDirectPlay2_GetGroupData(p,a,b,c,d) (p)->GetGroupData(a,b,c,d)
|
724 |
#define IDirectPlay2_GetGroupName(p,a,b,c) (p)->GetGroupName(a,b,c)
|
725 |
#define IDirectPlay2_GetPlayerAddress(p,a,b,c) (p)->GetPlayerAddress(a,b,c)
|
726 |
#define IDirectPlay2_GetPlayerCaps(p,a,b,c) (p)->GetPlayerCaps(a,b,c)
|
727 |
#define IDirectPlay2_GetPlayerData(p,a,b,c,d) (p)->GetPlayerData(a,b,c,d)
|
728 |
#define IDirectPlay2_GetPlayerName(p,a,b,c) (p)->GetPlayerName(a,b,c)
|
729 |
#define IDirectPlay2_GetSessionDesc(p,a,b) (p)->GetSessionDesc(a,b)
|
730 |
#define IDirectPlay2_Initialize(p,a) (p)->Initialize(a)
|
731 |
#define IDirectPlay2_Open(p,a,b) (p)->Open(a,b)
|
732 |
#define IDirectPlay2_Receive(p,a,b,c,d,e) (p)->Receive(a,b,c,d,e)
|
733 |
#define IDirectPlay2_Send(p,a,b,c,d,e) (p)->Send(a,b,c,d,e)
|
734 |
#define IDirectPlay2_SetGroupData(p,a,b,c,d) (p)->SetGroupData(a,b,c,d)
|
735 |
#define IDirectPlay2_SetGroupName(p,a,b,c) (p)->SetGroupName(a,b,c)
|
736 |
#define IDirectPlay2_SetPlayerData(p,a,b,c,d) (p)->SetPlayerData(a,b,c,d)
|
737 |
#define IDirectPlay2_SetPlayerName(p,a,b,c) (p)->SetPlayerName(a,b,c)
|
738 |
#define IDirectPlay2_SetSessionDesc(p,a,b) (p)->SetSessionDesc(a,b)
|
739 |
|
740 |
#endif
|
741 |
|
742 |
/****************************************************************************
|
743 |
*
|
744 |
* IDirectPlay3 (and IDirectPlay3A) Interface
|
745 |
*
|
746 |
****************************************************************************/
|
747 |
|
748 |
#undef INTERFACE
|
749 |
#define INTERFACE IDirectPlay3
|
750 |
DECLARE_INTERFACE_( IDirectPlay3, IDirectPlay2 )
|
751 |
{
|
752 |
/*** IUnknown methods ***/
|
753 |
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
|
754 |
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
|
755 |
STDMETHOD_(ULONG,Release) (THIS) PURE;
|
756 |
/*** IDirectPlay2 methods ***/
|
757 |
STDMETHOD(AddPlayerToGroup) (THIS_ DPID, DPID) PURE;
|
758 |
STDMETHOD(Close) (THIS) PURE;
|
759 |
STDMETHOD(CreateGroup) (THIS_ LPDPID,LPDPNAME,LPVOID,DWORD,DWORD) PURE;
|
760 |
STDMETHOD(CreatePlayer) (THIS_ LPDPID,LPDPNAME,HANDLE,LPVOID,DWORD,DWORD) PURE;
|
761 |
STDMETHOD(DeletePlayerFromGroup)(THIS_ DPID,DPID) PURE;
|
762 |
STDMETHOD(DestroyGroup) (THIS_ DPID) PURE;
|
763 |
STDMETHOD(DestroyPlayer) (THIS_ DPID) PURE;
|
764 |
STDMETHOD(EnumGroupPlayers) (THIS_ DPID,LPGUID,LPDPENUMPLAYERSCALLBACK2,LPVOID,DWORD) PURE;
|
765 |
STDMETHOD(EnumGroups) (THIS_ LPGUID,LPDPENUMPLAYERSCALLBACK2,LPVOID,DWORD) PURE;
|
766 |
STDMETHOD(EnumPlayers) (THIS_ LPGUID,LPDPENUMPLAYERSCALLBACK2,LPVOID,DWORD) PURE;
|
767 |
STDMETHOD(EnumSessions) (THIS_ LPDPSESSIONDESC2,DWORD,LPDPENUMSESSIONSCALLBACK2,LPVOID,DWORD) PURE;
|
768 |
STDMETHOD(GetCaps) (THIS_ LPDPCAPS,DWORD) PURE;
|
769 |
STDMETHOD(GetGroupData) (THIS_ DPID,LPVOID,LPDWORD,DWORD) PURE;
|
770 |
STDMETHOD(GetGroupName) (THIS_ DPID,LPVOID,LPDWORD) PURE;
|
771 |
STDMETHOD(GetMessageCount) (THIS_ DPID, LPDWORD) PURE;
|
772 |
STDMETHOD(GetPlayerAddress) (THIS_ DPID,LPVOID,LPDWORD) PURE;
|
773 |
STDMETHOD(GetPlayerCaps) (THIS_ DPID,LPDPCAPS,DWORD) PURE;
|
774 |
STDMETHOD(GetPlayerData) (THIS_ DPID,LPVOID,LPDWORD,DWORD) PURE;
|
775 |
STDMETHOD(GetPlayerName) (THIS_ DPID,LPVOID,LPDWORD) PURE;
|
776 |
STDMETHOD(GetSessionDesc) (THIS_ LPVOID,LPDWORD) PURE;
|
777 |
STDMETHOD(Initialize) (THIS_ LPGUID) PURE;
|
778 |
STDMETHOD(Open) (THIS_ LPDPSESSIONDESC2,DWORD) PURE;
|
779 |
STDMETHOD(Receive) (THIS_ LPDPID,LPDPID,DWORD,LPVOID,LPDWORD) PURE;
|
780 |
STDMETHOD(Send) (THIS_ DPID, DPID, DWORD, LPVOID, DWORD) PURE;
|
781 |
STDMETHOD(SetGroupData) (THIS_ DPID,LPVOID,DWORD,DWORD) PURE;
|
782 |
STDMETHOD(SetGroupName) (THIS_ DPID,LPDPNAME,DWORD) PURE;
|
783 |
STDMETHOD(SetPlayerData) (THIS_ DPID,LPVOID,DWORD,DWORD) PURE;
|
784 |
STDMETHOD(SetPlayerName) (THIS_ DPID,LPDPNAME,DWORD) PURE;
|
785 |
STDMETHOD(SetSessionDesc) (THIS_ LPDPSESSIONDESC2,DWORD) PURE;
|
786 |
/*** IDirectPlay3 methods ***/
|
787 |
STDMETHOD(AddGroupToGroup) (THIS_ DPID, DPID) PURE;
|
788 |
STDMETHOD(CreateGroupInGroup) (THIS_ DPID,LPDPID,LPDPNAME,LPVOID,DWORD,DWORD) PURE;
|
789 |
STDMETHOD(DeleteGroupFromGroup) (THIS_ DPID,DPID) PURE;
|
790 |
STDMETHOD(EnumConnections) (THIS_ LPCGUID,LPDPENUMCONNECTIONSCALLBACK,LPVOID,DWORD) PURE;
|
791 |
STDMETHOD(EnumGroupsInGroup) (THIS_ DPID,LPGUID,LPDPENUMPLAYERSCALLBACK2,LPVOID,DWORD) PURE;
|
792 |
STDMETHOD(GetGroupConnectionSettings)(THIS_ DWORD, DPID, LPVOID, LPDWORD) PURE;
|
793 |
STDMETHOD(InitializeConnection) (THIS_ LPVOID,DWORD) PURE;
|
794 |
STDMETHOD(SecureOpen) (THIS_ LPCDPSESSIONDESC2,DWORD,LPCDPSECURITYDESC,LPCDPCREDENTIALS) PURE;
|
795 |
STDMETHOD(SendChatMessage) (THIS_ DPID,DPID,DWORD,LPDPCHAT) PURE;
|
796 |
STDMETHOD(SetGroupConnectionSettings)(THIS_ DWORD,DPID,LPDPLCONNECTION) PURE;
|
797 |
STDMETHOD(StartSession) (THIS_ DWORD,DPID) PURE;
|
798 |
STDMETHOD(GetGroupFlags) (THIS_ DPID,LPDWORD) PURE;
|
799 |
STDMETHOD(GetGroupParent) (THIS_ DPID,LPDPID) PURE;
|
800 |
STDMETHOD(GetPlayerAccount) (THIS_ DPID, DWORD, LPVOID, LPDWORD) PURE;
|
801 |
STDMETHOD(GetPlayerFlags) (THIS_ DPID,LPDWORD) PURE;
|
802 |
};
|
803 |
|
804 |
/****************************************************************************
|
805 |
*
|
806 |
* IDirectPlay3 interface macros
|
807 |
*
|
808 |
****************************************************************************/
|
809 |
|
810 |
#if !defined(__cplusplus) || defined(CINTERFACE)
|
811 |
|
812 |
#define IDirectPlay3_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
|
813 |
#define IDirectPlay3_AddRef(p) (p)->lpVtbl->AddRef(p)
|
814 |
#define IDirectPlay3_Release(p) (p)->lpVtbl->Release(p)
|
815 |
#define IDirectPlay3_AddPlayerToGroup(p,a,b) (p)->lpVtbl->AddPlayerToGroup(p,a,b)
|
816 |
#define IDirectPlay3_Close(p) (p)->lpVtbl->Close(p)
|
817 |
#define IDirectPlay3_CreateGroup(p,a,b,c,d,e) (p)->lpVtbl->CreateGroup(p,a,b,c,d,e)
|
818 |
#define IDirectPlay3_CreatePlayer(p,a,b,c,d,e,f) (p)->lpVtbl->CreatePlayer(p,a,b,c,d,e,f)
|
819 |
#define IDirectPlay3_DeletePlayerFromGroup(p,a,b) (p)->lpVtbl->DeletePlayerFromGroup(p,a,b)
|
820 |
#define IDirectPlay3_DestroyGroup(p,a) (p)->lpVtbl->DestroyGroup(p,a)
|
821 |
#define IDirectPlay3_DestroyPlayer(p,a) (p)->lpVtbl->DestroyPlayer(p,a)
|
822 |
#define IDirectPlay3_EnumGroupPlayers(p,a,b,c,d,e) (p)->lpVtbl->EnumGroupPlayers(p,a,b,c,d,e)
|
823 |
#define IDirectPlay3_EnumGroups(p,a,b,c,d) (p)->lpVtbl->EnumGroups(p,a,b,c,d)
|
824 |
#define IDirectPlay3_EnumPlayers(p,a,b,c,d) (p)->lpVtbl->EnumPlayers(p,a,b,c,d)
|
825 |
#define IDirectPlay3_EnumSessions(p,a,b,c,d,e) (p)->lpVtbl->EnumSessions(p,a,b,c,d,e)
|
826 |
#define IDirectPlay3_GetCaps(p,a,b) (p)->lpVtbl->GetCaps(p,a,b)
|
827 |
#define IDirectPlay3_GetMessageCount(p,a,b) (p)->lpVtbl->GetMessageCount(p,a,b)
|
828 |
#define IDirectPlay3_GetGroupData(p,a,b,c,d) (p)->lpVtbl->GetGroupData(p,a,b,c,d)
|
829 |
#define IDirectPlay3_GetGroupName(p,a,b,c) (p)->lpVtbl->GetGroupName(p,a,b,c)
|
830 |
#define IDirectPlay3_GetPlayerAddress(p,a,b,c) (p)->lpVtbl->GetPlayerAddress(p,a,b,c)
|
831 |
#define IDirectPlay3_GetPlayerCaps(p,a,b,c) (p)->lpVtbl->GetPlayerCaps(p,a,b,c)
|
832 |
#define IDirectPlay3_GetPlayerData(p,a,b,c,d) (p)->lpVtbl->GetPlayerData(p,a,b,c,d)
|
833 |
#define IDirectPlay3_GetPlayerName(p,a,b,c) (p)->lpVtbl->GetPlayerName(p,a,b,c)
|
834 |
#define IDirectPlay3_GetSessionDesc(p,a,b) (p)->lpVtbl->GetSessionDesc(p,a,b)
|
835 |
#define IDirectPlay3_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
|
836 |
#define IDirectPlay3_Open(p,a,b) (p)->lpVtbl->Open(p,a,b)
|
837 |
#define IDirectPlay3_Receive(p,a,b,c,d,e) (p)->lpVtbl->Receive(p,a,b,c,d,e)
|
838 |
#define IDirectPlay3_Send(p,a,b,c,d,e) (p)->lpVtbl->Send(p,a,b,c,d,e)
|
839 |
#define IDirectPlay3_SetGroupData(p,a,b,c,d) (p)->lpVtbl->SetGroupData(p,a,b,c,d)
|
840 |
#define IDirectPlay3_SetGroupName(p,a,b,c) (p)->lpVtbl->SetGroupName(p,a,b,c)
|
841 |
#define IDirectPlay3_SetPlayerData(p,a,b,c,d) (p)->lpVtbl->SetPlayerData(p,a,b,c,d)
|
842 |
#define IDirectPlay3_SetPlayerName(p,a,b,c) (p)->lpVtbl->SetPlayerName(p,a,b,c)
|
843 |
#define IDirectPlay3_SetSessionDesc(p,a,b) (p)->lpVtbl->SetSessionDesc(p,a,b)
|
844 |
#define IDirectPlay3_AddGroupToGroup(p,a,b) (p)->lpVtbl->AddGroupToGroup(p,a,b)
|
845 |
#define IDirectPlay3_CreateGroupInGroup(p,a,b,c,d,e,f) (p)->lpVtbl->CreateGroupInGroup(p,a,b,c,d,e,f)
|
846 |
#define IDirectPlay3_DeleteGroupFromGroup(p,a,b) (p)->lpVtbl->DeleteGroupFromGroup(p,a,b)
|
847 |
#define IDirectPlay3_EnumConnections(p,a,b,c,d) (p)->lpVtbl->EnumConnections(p,a,b,c,d)
|
848 |
#define IDirectPlay3_EnumGroupsInGroup(p,a,b,c,d,e) (p)->lpVtbl->EnumGroupsInGroup(p,a,b,c,d,e)
|
849 |
#define IDirectPlay3_GetGroupConnectionSettings(p,a,b,c,d) (p)->lpVtbl->GetGroupConnectionSettings(p,a,b,c,d)
|
850 |
#define IDirectPlay3_InitializeConnection(p,a,b) (p)->lpVtbl->InitializeConnection(p,a,b)
|
851 |
#define IDirectPlay3_SecureOpen(p,a,b,c,d) (p)->lpVtbl->SecureOpen(p,a,b,c,d)
|
852 |
#define IDirectPlay3_SendChatMessage(p,a,b,c,d) (p)->lpVtbl->SendChatMessage(p,a,b,c,d)
|
853 |
#define IDirectPlay3_SetGroupConnectionSettings(p,a,b,c) (p)->lpVtbl->SetGroupConnectionSettings(p,a,b,c)
|
854 |
#define IDirectPlay3_StartSession(p,a,b) (p)->lpVtbl->StartSession(p,a,b)
|
855 |
#define IDirectPlay3_GetGroupFlags(p,a,b) (p)->lpVtbl->GetGroupFlags(p,a,b)
|
856 |
#define IDirectPlay3_GetGroupParent(p,a,b) (p)->lpVtbl->GetGroupParent(p,a,b)
|
857 |
#define IDirectPlay3_GetPlayerAccount(p,a,b,c,d) (p)->lpVtbl->GetPlayerAccount(p,a,b,c,d)
|
858 |
#define IDirectPlay3_GetPlayerFlags(p,a,b) (p)->lpVtbl->GetPlayerFlags(p,a,b)
|
859 |
|
860 |
#else /* C++ */
|
861 |
|
862 |
#define IDirectPlay3_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
|
863 |
#define IDirectPlay3_AddRef(p) (p)->AddRef()
|
864 |
#define IDirectPlay3_Release(p) (p)->Release()
|
865 |
#define IDirectPlay3_AddPlayerToGroup(p,a,b) (p)->AddPlayerToGroup(a,b)
|
866 |
#define IDirectPlay3_Close(p) (p)->Close()
|
867 |
#define IDirectPlay3_CreateGroup(p,a,b,c,d,e) (p)->CreateGroup(a,b,c,d,e)
|
868 |
#define IDirectPlay3_CreatePlayer(p,a,b,c,d,e,f) (p)->CreatePlayer(a,b,c,d,e,f)
|
869 |
#define IDirectPlay3_DeletePlayerFromGroup(p,a,b) (p)->DeletePlayerFromGroup(a,b)
|
870 |
#define IDirectPlay3_DestroyGroup(p,a) (p)->DestroyGroup(a)
|
871 |
#define IDirectPlay3_DestroyPlayer(p,a) (p)->DestroyPlayer(a)
|
872 |
#define IDirectPlay3_EnumGroupPlayers(p,a,b,c,d,e) (p)->EnumGroupPlayers(a,b,c,d,e)
|
873 |
#define IDirectPlay3_EnumGroups(p,a,b,c,d) (p)->EnumGroups(a,b,c,d)
|
874 |
#define IDirectPlay3_EnumPlayers(p,a,b,c,d) (p)->EnumPlayers(a,b,c,d)
|
875 |
#define IDirectPlay3_EnumSessions(p,a,b,c,d,e) (p)->EnumSessions(a,b,c,d,e)
|
876 |
#define IDirectPlay3_GetCaps(p,a,b) (p)->GetCaps(a,b)
|
877 |
#define IDirectPlay3_GetMessageCount(p,a,b) (p)->GetMessageCount(a,b)
|
878 |
#define IDirectPlay3_GetGroupData(p,a,b,c,d) (p)->GetGroupData(a,b,c,d)
|
879 |
#define IDirectPlay3_GetGroupName(p,a,b,c) (p)->GetGroupName(a,b,c)
|
880 |
#define IDirectPlay3_GetPlayerAddress(p,a,b,c) (p)->GetPlayerAddress(a,b,c)
|
881 |
#define IDirectPlay3_GetPlayerCaps(p,a,b,c) (p)->GetPlayerCaps(a,b,c)
|
882 |
#define IDirectPlay3_GetPlayerData(p,a,b,c,d) (p)->GetPlayerData(a,b,c,d)
|
883 |
#define IDirectPlay3_GetPlayerName(p,a,b,c) (p)->GetPlayerName(a,b,c)
|
884 |
#define IDirectPlay3_GetSessionDesc(p,a,b) (p)->GetSessionDesc(a,b)
|
885 |
#define IDirectPlay3_Initialize(p,a) (p)->Initialize(a)
|
886 |
#define IDirectPlay3_Open(p,a,b) (p)->Open(a,b)
|
887 |
#define IDirectPlay3_Receive(p,a,b,c,d,e) (p)->Receive(a,b,c,d,e)
|
888 |
#define IDirectPlay3_Send(p,a,b,c,d,e) (p)->Send(a,b,c,d,e)
|
889 |
#define IDirectPlay3_SetGroupData(p,a,b,c,d) (p)->SetGroupData(a,b,c,d)
|
890 |
#define IDirectPlay3_SetGroupName(p,a,b,c) (p)->SetGroupName(a,b,c)
|
891 |
#define IDirectPlay3_SetPlayerData(p,a,b,c,d) (p)->SetPlayerData(a,b,c,d)
|
892 |
#define IDirectPlay3_SetPlayerName(p,a,b,c) (p)->SetPlayerName(a,b,c)
|
893 |
#define IDirectPlay3_SetSessionDesc(p,a,b) (p)->SetSessionDesc(a,b)
|
894 |
#define IDirectPlay3_AddGroupToGroup(p,a,b) (p)->AddGroupToGroup(a,b)
|
895 |
#define IDirectPlay3_CreateGroupInGroup(p,a,b,c,d,e,f) (p)->CreateGroupInGroup(a,b,c,d,e,f)
|
896 |
#define IDirectPlay3_DeleteGroupFromGroup(p,a,b) (p)->DeleteGroupFromGroup(a,b)
|
897 |
#define IDirectPlay3_EnumConnections(p,a,b,c,d) (p)->EnumConnections(a,b,c,d)
|
898 |
#define IDirectPlay3_EnumGroupsInGroup(p,a,b,c,d,e) (p)->EnumGroupsInGroup(a,b,c,d,e)
|
899 |
#define IDirectPlay3_GetGroupConnectionSettings(p,a,b,c,d) (p)->GetGroupConnectionSettings(a,b,c,d)
|
900 |
#define IDirectPlay3_InitializeConnection(p,a,b) (p)->InitializeConnection(a,b)
|
901 |
#define IDirectPlay3_SecureOpen(p,a,b,c,d) (p)->SecureOpen(a,b,c,d)
|
902 |
#define IDirectPlay3_SendChatMessage(p,a,b,c,d) (p)->SendChatMessage(a,b,c,d)
|
903 |
#define IDirectPlay3_SetGroupConnectionSettings(p,a,b,c) (p)->SetGroupConnectionSettings(a,b,c)
|
904 |
#define IDirectPlay3_StartSession(p,a,b) (p)->StartSession(a,b)
|
905 |
#define IDirectPlay3_GetGroupFlags(p,a,b) (p)->GetGroupFlags(a,b)
|
906 |
#define IDirectPlay3_GetGroupParent(p,a,b) (p)->GetGroupParent(a,b)
|
907 |
#define IDirectPlay3_GetPlayerAccount(p,a,b,c,d) (p)->GetPlayerAccount(a,b,c,d)
|
908 |
#define IDirectPlay3_GetPlayerFlags(p,a,b) (p)->GetPlayerFlags(a,b)
|
909 |
|
910 |
#endif
|
911 |
|
912 |
/****************************************************************************
|
913 |
*
|
914 |
* IDirectPlay4 (and IDirectPlay4A) Interface
|
915 |
*
|
916 |
****************************************************************************/
|
917 |
|
918 |
#undef INTERFACE
|
919 |
#define INTERFACE IDirectPlay4
|
920 |
DECLARE_INTERFACE_( IDirectPlay4, IDirectPlay3 )
|
921 |
{
|
922 |
/*** IUnknown methods ***/
|
923 |
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
|
924 |
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
|
925 |
STDMETHOD_(ULONG,Release) (THIS) PURE;
|
926 |
/*** IDirectPlay2 methods ***/
|
927 |
STDMETHOD(AddPlayerToGroup) (THIS_ DPID, DPID) PURE;
|
928 |
STDMETHOD(Close) (THIS) PURE;
|
929 |
STDMETHOD(CreateGroup) (THIS_ LPDPID,LPDPNAME,LPVOID,DWORD,DWORD) PURE;
|
930 |
STDMETHOD(CreatePlayer) (THIS_ LPDPID,LPDPNAME,HANDLE,LPVOID,DWORD,DWORD) PURE;
|
931 |
STDMETHOD(DeletePlayerFromGroup)(THIS_ DPID,DPID) PURE;
|
932 |
STDMETHOD(DestroyGroup) (THIS_ DPID) PURE;
|
933 |
STDMETHOD(DestroyPlayer) (THIS_ DPID) PURE;
|
934 |
STDMETHOD(EnumGroupPlayers) (THIS_ DPID,LPGUID,LPDPENUMPLAYERSCALLBACK2,LPVOID,DWORD) PURE;
|
935 |
STDMETHOD(EnumGroups) (THIS_ LPGUID,LPDPENUMPLAYERSCALLBACK2,LPVOID,DWORD) PURE;
|
936 |
STDMETHOD(EnumPlayers) (THIS_ LPGUID,LPDPENUMPLAYERSCALLBACK2,LPVOID,DWORD) PURE;
|
937 |
STDMETHOD(EnumSessions) (THIS_ LPDPSESSIONDESC2,DWORD,LPDPENUMSESSIONSCALLBACK2,LPVOID,DWORD) PURE;
|
938 |
STDMETHOD(GetCaps) (THIS_ LPDPCAPS,DWORD) PURE;
|
939 |
STDMETHOD(GetGroupData) (THIS_ DPID,LPVOID,LPDWORD,DWORD) PURE;
|
940 |
STDMETHOD(GetGroupName) (THIS_ DPID,LPVOID,LPDWORD) PURE;
|
941 |
STDMETHOD(GetMessageCount) (THIS_ DPID, LPDWORD) PURE;
|
942 |
STDMETHOD(GetPlayerAddress) (THIS_ DPID,LPVOID,LPDWORD) PURE;
|
943 |
STDMETHOD(GetPlayerCaps) (THIS_ DPID,LPDPCAPS,DWORD) PURE;
|
944 |
STDMETHOD(GetPlayerData) (THIS_ DPID,LPVOID,LPDWORD,DWORD) PURE;
|
945 |
STDMETHOD(GetPlayerName) (THIS_ DPID,LPVOID,LPDWORD) PURE;
|
946 |
STDMETHOD(GetSessionDesc) (THIS_ LPVOID,LPDWORD) PURE;
|
947 |
STDMETHOD(Initialize) (THIS_ LPGUID) PURE;
|
948 |
STDMETHOD(Open) (THIS_ LPDPSESSIONDESC2,DWORD) PURE;
|
949 |
STDMETHOD(Receive) (THIS_ LPDPID,LPDPID,DWORD,LPVOID,LPDWORD) PURE;
|
950 |
STDMETHOD(Send) (THIS_ DPID, DPID, DWORD, LPVOID, DWORD) PURE;
|
951 |
STDMETHOD(SetGroupData) (THIS_ DPID,LPVOID,DWORD,DWORD) PURE;
|
952 |
STDMETHOD(SetGroupName) (THIS_ DPID,LPDPNAME,DWORD) PURE;
|
953 |
STDMETHOD(SetPlayerData) (THIS_ DPID,LPVOID,DWORD,DWORD) PURE;
|
954 |
STDMETHOD(SetPlayerName) (THIS_ DPID,LPDPNAME,DWORD) PURE;
|
955 |
STDMETHOD(SetSessionDesc) (THIS_ LPDPSESSIONDESC2,DWORD) PURE;
|
956 |
/*** IDirectPlay3 methods ***/
|
957 |
STDMETHOD(AddGroupToGroup) (THIS_ DPID, DPID) PURE;
|
958 |
STDMETHOD(CreateGroupInGroup) (THIS_ DPID,LPDPID,LPDPNAME,LPVOID,DWORD,DWORD) PURE;
|
959 |
STDMETHOD(DeleteGroupFromGroup) (THIS_ DPID,DPID) PURE;
|
960 |
STDMETHOD(EnumConnections) (THIS_ LPCGUID,LPDPENUMCONNECTIONSCALLBACK,LPVOID,DWORD) PURE;
|
961 |
STDMETHOD(EnumGroupsInGroup) (THIS_ DPID,LPGUID,LPDPENUMPLAYERSCALLBACK2,LPVOID,DWORD) PURE;
|
962 |
STDMETHOD(GetGroupConnectionSettings)(THIS_ DWORD, DPID, LPVOID, LPDWORD) PURE;
|
963 |
STDMETHOD(InitializeConnection) (THIS_ LPVOID,DWORD) PURE;
|
964 |
STDMETHOD(SecureOpen) (THIS_ LPCDPSESSIONDESC2,DWORD,LPCDPSECURITYDESC,LPCDPCREDENTIALS) PURE;
|
965 |
STDMETHOD(SendChatMessage) (THIS_ DPID,DPID,DWORD,LPDPCHAT) PURE;
|
966 |
STDMETHOD(SetGroupConnectionSettings)(THIS_ DWORD,DPID,LPDPLCONNECTION) PURE;
|
967 |
STDMETHOD(StartSession) (THIS_ DWORD,DPID) PURE;
|
968 |
STDMETHOD(GetGroupFlags) (THIS_ DPID,LPDWORD) PURE;
|
969 |
STDMETHOD(GetGroupParent) (THIS_ DPID,LPDPID) PURE;
|
970 |
STDMETHOD(GetPlayerAccount) (THIS_ DPID, DWORD, LPVOID, LPDWORD) PURE;
|
971 |
STDMETHOD(GetPlayerFlags) (THIS_ DPID,LPDWORD) PURE;
|
972 |
/*** IDirectPlay4 methods ***/
|
973 |
STDMETHOD(GetGroupOwner) (THIS_ DPID, LPDPID) PURE;
|
974 |
STDMETHOD(SetGroupOwner) (THIS_ DPID, DPID) PURE;
|
975 |
STDMETHOD(SendEx) (THIS_ DPID, DPID, DWORD, LPVOID, DWORD, DWORD, DWORD, LPVOID, DWORD_PTR *) PURE;
|
976 |
STDMETHOD(GetMessageQueue) (THIS_ DPID, DPID, DWORD, LPDWORD, LPDWORD) PURE;
|
977 |
STDMETHOD(CancelMessage) (THIS_ DWORD, DWORD) PURE;
|
978 |
STDMETHOD(CancelPriority) (THIS_ DWORD, DWORD, DWORD) PURE;
|
979 |
};
|
980 |
|
981 |
/****************************************************************************
|
982 |
*
|
983 |
* IDirectPlayX interface macros (for IDirectPlay4 and beyond)
|
984 |
*
|
985 |
****************************************************************************/
|
986 |
|
987 |
#if !defined(__cplusplus) || defined(CINTERFACE)
|
988 |
|
989 |
#define IDirectPlayX_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
|
990 |
#define IDirectPlayX_AddRef(p) (p)->lpVtbl->AddRef(p)
|
991 |
#define IDirectPlayX_Release(p) (p)->lpVtbl->Release(p)
|
992 |
#define IDirectPlayX_AddPlayerToGroup(p,a,b) (p)->lpVtbl->AddPlayerToGroup(p,a,b)
|
993 |
#define IDirectPlayX_CancelMessage(p,a,b) (p)->lpVtbl->CancelMessage(p,a,b)
|
994 |
#define IDirectPlayX_CancelPriority(p,a,b,c) (p)->lpVtbl->CancelPriority(p,a,b,c)
|
995 |
#define IDirectPlayX_Close(p) (p)->lpVtbl->Close(p)
|
996 |
#define IDirectPlayX_CreateGroup(p,a,b,c,d,e) (p)->lpVtbl->CreateGroup(p,a,b,c,d,e)
|
997 |
#define IDirectPlayX_CreatePlayer(p,a,b,c,d,e,f) (p)->lpVtbl->CreatePlayer(p,a,b,c,d,e,f)
|
998 |
#define IDirectPlayX_DeletePlayerFromGroup(p,a,b) (p)->lpVtbl->DeletePlayerFromGroup(p,a,b)
|
999 |
#define IDirectPlayX_DestroyGroup(p,a) (p)->lpVtbl->DestroyGroup(p,a)
|
1000 |
#define IDirectPlayX_DestroyPlayer(p,a) (p)->lpVtbl->DestroyPlayer(p,a)
|
1001 |
#define IDirectPlayX_EnumGroupPlayers(p,a,b,c,d,e) (p)->lpVtbl->EnumGroupPlayers(p,a,b,c,d,e)
|
1002 |
#define IDirectPlayX_EnumGroups(p,a,b,c,d) (p)->lpVtbl->EnumGroups(p,a,b,c,d)
|
1003 |
#define IDirectPlayX_EnumPlayers(p,a,b,c,d) (p)->lpVtbl->EnumPlayers(p,a,b,c,d)
|
1004 |
#define IDirectPlayX_EnumSessions(p,a,b,c,d,e) (p)->lpVtbl->EnumSessions(p,a,b,c,d,e)
|
1005 |
#define IDirectPlayX_GetCaps(p,a,b) (p)->lpVtbl->GetCaps(p,a,b)
|
1006 |
#define IDirectPlayX_GetMessageCount(p,a,b) (p)->lpVtbl->GetMessageCount(p,a,b)
|
1007 |
#define IDirectPlayX_GetMessageQueue(p,a,b,c,d,e) (p)->lpVtbl->GetMessageQueue(p,a,b,c,d,e)
|
1008 |
#define IDirectPlayX_GetGroupData(p,a,b,c,d) (p)->lpVtbl->GetGroupData(p,a,b,c,d)
|
1009 |
#define IDirectPlayX_GetGroupName(p,a,b,c) (p)->lpVtbl->GetGroupName(p,a,b,c)
|
1010 |
#define IDirectPlayX_GetPlayerAddress(p,a,b,c) (p)->lpVtbl->GetPlayerAddress(p,a,b,c)
|
1011 |
#define IDirectPlayX_GetPlayerCaps(p,a,b,c) (p)->lpVtbl->GetPlayerCaps(p,a,b,c)
|
1012 |
#define IDirectPlayX_GetPlayerData(p,a,b,c,d) (p)->lpVtbl->GetPlayerData(p,a,b,c,d)
|
1013 |
#define IDirectPlayX_GetPlayerName(p,a,b,c) (p)->lpVtbl->GetPlayerName(p,a,b,c)
|
1014 |
#define IDirectPlayX_GetSessionDesc(p,a,b) (p)->lpVtbl->GetSessionDesc(p,a,b)
|
1015 |
#define IDirectPlayX_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
|
1016 |
#define IDirectPlayX_Open(p,a,b) (p)->lpVtbl->Open(p,a,b)
|
1017 |
#define IDirectPlayX_Receive(p,a,b,c,d,e) (p)->lpVtbl->Receive(p,a,b,c,d,e)
|
1018 |
#define IDirectPlayX_Send(p,a,b,c,d,e) (p)->lpVtbl->Send(p,a,b,c,d,e)
|
1019 |
#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)
|
1020 |
#define IDirectPlayX_SetGroupData(p,a,b,c,d) (p)->lpVtbl->SetGroupData(p,a,b,c,d)
|
1021 |
#define IDirectPlayX_SetGroupName(p,a,b,c) (p)->lpVtbl->SetGroupName(p,a,b,c)
|
1022 |
#define IDirectPlayX_SetPlayerData(p,a,b,c,d) (p)->lpVtbl->SetPlayerData(p,a,b,c,d)
|
1023 |
#define IDirectPlayX_SetPlayerName(p,a,b,c) (p)->lpVtbl->SetPlayerName(p,a,b,c)
|
1024 |
#define IDirectPlayX_SetSessionDesc(p,a,b) (p)->lpVtbl->SetSessionDesc(p,a,b)
|
1025 |
#define IDirectPlayX_AddGroupToGroup(p,a,b) (p)->lpVtbl->AddGroupToGroup(p,a,b)
|
1026 |
#define IDirectPlayX_CreateGroupInGroup(p,a,b,c,d,e,f) (p)->lpVtbl->CreateGroupInGroup(p,a,b,c,d,e,f)
|
1027 |
#define IDirectPlayX_DeleteGroupFromGroup(p,a,b) (p)->lpVtbl->DeleteGroupFromGroup(p,a,b)
|
1028 |
#define IDirectPlayX_EnumConnections(p,a,b,c,d) (p)->lpVtbl->EnumConnections(p,a,b,c,d)
|
1029 |
#define IDirectPlayX_EnumGroupsInGroup(p,a,b,c,d,e) (p)->lpVtbl->EnumGroupsInGroup(p,a,b,c,d,e)
|
1030 |
#define IDirectPlayX_GetGroupConnectionSettings(p,a,b,c,d) (p)->lpVtbl->GetGroupConnectionSettings(p,a,b,c,d)
|
1031 |
#define IDirectPlayX_InitializeConnection(p,a,b) (p)->lpVtbl->InitializeConnection(p,a,b)
|
1032 |
#define IDirectPlayX_SecureOpen(p,a,b,c,d) (p)->lpVtbl->SecureOpen(p,a,b,c,d)
|
1033 |
#define IDirectPlayX_SendChatMessage(p,a,b,c,d) (p)->lpVtbl->SendChatMessage(p,a,b,c,d)
|
1034 |
#define IDirectPlayX_SetGroupConnectionSettings(p,a,b,c) (p)->lpVtbl->SetGroupConnectionSettings(p,a,b,c)
|
1035 |
#define IDirectPlayX_StartSession(p,a,b) (p)->lpVtbl->StartSession(p,a,b)
|
1036 |
#define IDirectPlayX_GetGroupFlags(p,a,b) (p)->lpVtbl->GetGroupFlags(p,a,b)
|
1037 |
#define IDirectPlayX_GetGroupParent(p,a,b) (p)->lpVtbl->GetGroupParent(p,a,b)
|
1038 |
#define IDirectPlayX_GetPlayerAccount(p,a,b,c,d) (p)->lpVtbl->GetPlayerAccount(p,a,b,c,d)
|
1039 |
#define IDirectPlayX_GetPlayerFlags(p,a,b) (p)->lpVtbl->GetPlayerFlags(p,a,b)
|
1040 |
#define IDirectPlayX_GetGroupOwner(p,a,b) (p)->lpVtbl->GetGroupOwner(p,a,b)
|
1041 |
#define IDirectPlayX_SetGroupOwner(p,a,b) (p)->lpVtbl->SetGroupOwner(p,a,b)
|
1042 |
|
1043 |
#else /* C++ */
|
1044 |
|
1045 |
#define IDirectPlayX_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
|
1046 |
#define IDirectPlayX_AddRef(p) (p)->AddRef()
|
1047 |
#define IDirectPlayX_Release(p) (p)->Release()
|
1048 |
#define IDirectPlayX_AddPlayerToGroup(p,a,b) (p)->AddPlayerToGroup(a,b)
|
1049 |
#define IDirectPlayX_CancelMessage(p,a,b) (p)->CancelMessage(a,b)
|
1050 |
#define IDirectPlayX_CancelPriority(p,a,b,c) (p)->CancelPriority(a,b,c)
|
1051 |
#define IDirectPlayX_Close(p) (p)->Close()
|
1052 |
#define IDirectPlayX_CreateGroup(p,a,b,c,d,e) (p)->CreateGroup(a,b,c,d,e)
|
1053 |
#define IDirectPlayX_CreatePlayer(p,a,b,c,d,e,f) (p)->CreatePlayer(a,b,c,d,e,f)
|
1054 |
#define IDirectPlayX_DeletePlayerFromGroup(p,a,b) (p)->DeletePlayerFromGroup(a,b)
|
1055 |
#define IDirectPlayX_DestroyGroup(p,a) (p)->DestroyGroup(a)
|
1056 |
#define IDirectPlayX_DestroyPlayer(p,a) (p)->DestroyPlayer(a)
|
1057 |
#define IDirectPlayX_EnumGroupPlayers(p,a,b,c,d,e) (p)->EnumGroupPlayers(a,b,c,d,e)
|
1058 |
#define IDirectPlayX_EnumGroups(p,a,b,c,d) (p)->EnumGroups(a,b,c,d)
|
1059 |
#define IDirectPlayX_EnumPlayers(p,a,b,c,d) (p)->EnumPlayers(a,b,c,d)
|
1060 |
#define IDirectPlayX_EnumSessions(p,a,b,c,d,e) (p)->EnumSessions(a,b,c,d,e)
|
1061 |
#define IDirectPlayX_GetCaps(p,a,b) (p)->GetCaps(a,b)
|
1062 |
#define IDirectPlayX_GetMessageCount(p,a,b) (p)->GetMessageCount(a,b)
|
1063 |
#define IDirectPlayX_GetMessageQueue(p,a,b,c,d,e) (p)->GetMessageQueue(a,b,c,d,e)
|
1064 |
#define IDirectPlayX_GetGroupData(p,a,b,c,d) (p)->GetGroupData(a,b,c,d)
|
1065 |
#define IDirectPlayX_GetGroupName(p,a,b,c) (p)->GetGroupName(a,b,c)
|
1066 |
#define IDirectPlayX_GetPlayerAddress(p,a,b,c) (p)->GetPlayerAddress(a,b,c)
|
1067 |
#define IDirectPlayX_GetPlayerCaps(p,a,b,c) (p)->GetPlayerCaps(a,b,c)
|
1068 |
#define IDirectPlayX_GetPlayerData(p,a,b,c,d) (p)->GetPlayerData(a,b,c,d)
|
1069 |
#define IDirectPlayX_GetPlayerName(p,a,b,c) (p)->GetPlayerName(a,b,c)
|
1070 |
#define IDirectPlayX_GetSessionDesc(p,a,b) (p)->GetSessionDesc(a,b)
|
1071 |
#define IDirectPlayX_Initialize(p,a) (p)->Initialize(a)
|
1072 |
#define IDirectPlayX_Open(p,a,b) (p)->Open(a,b)
|
1073 |
#define IDirectPlayX_Receive(p,a,b,c,d,e) (p)->Receive(a,b,c,d,e)
|
1074 |
#define IDirectPlayX_Send(p,a,b,c,d,e) (p)->Send(a,b,c,d,e)
|
1075 |
#define IDirectPlayX_SendEx(p,a,b,c,d,e,f,g,h,i) (p)->SendEx(a,b,c,d,e,f,g,h,i)
|
1076 |
#define IDirectPlayX_SetGroupData(p,a,b,c,d) (p)->SetGroupData(a,b,c,d)
|
1077 |
#define IDirectPlayX_SetGroupName(p,a,b,c) (p)->SetGroupName(a,b,c)
|
1078 |
#define IDirectPlayX_SetPlayerData(p,a,b,c,d) (p)->SetPlayerData(a,b,c,d)
|
1079 |
#define IDirectPlayX_SetPlayerName(p,a,b,c) (p)->SetPlayerName(a,b,c)
|
1080 |
#define IDirectPlayX_SetSessionDesc(p,a,b) (p)->SetSessionDesc(a,b)
|
1081 |
#define IDirectPlayX_AddGroupToGroup(p,a,b) (p)->AddGroupToGroup(a,b)
|
1082 |
#define IDirectPlayX_CreateGroupInGroup(p,a,b,c,d,e,f) (p)->CreateGroupInGroup(a,b,c,d,e,f)
|
1083 |
#define IDirectPlayX_DeleteGroupFromGroup(p,a,b) (p)->DeleteGroupFromGroup(a,b)
|
1084 |
#define IDirectPlayX_EnumConnections(p,a,b,c,d) (p)->EnumConnections(a,b,c,d)
|
1085 |
#define IDirectPlayX_EnumGroupsInGroup(p,a,b,c,d,e) (p)->EnumGroupsInGroup(a,b,c,d,e)
|
1086 |
#define IDirectPlayX_GetGroupConnectionSettings(p,a,b,c,d) (p)->GetGroupConnectionSettings(a,b,c,d)
|
1087 |
#define IDirectPlayX_InitializeConnection(p,a,b) (p)->InitializeConnection(a,b)
|
1088 |
#define IDirectPlayX_SecureOpen(p,a,b,c,d) (p)->SecureOpen(a,b,c,d)
|
1089 |
#define IDirectPlayX_SendChatMessage(p,a,b,c,d) (p)->SendChatMessage(a,b,c,d)
|
1090 |
#define IDirectPlayX_SetGroupConnectionSettings(p,a,b,c) (p)->SetGroupConnectionSettings(a,b,c)
|
1091 |
#define IDirectPlayX_StartSession(p,a,b) (p)->StartSession(a,b)
|
1092 |
#define IDirectPlayX_GetGroupFlags(p,a,b) (p)->GetGroupFlags(a,b)
|
1093 |
#define IDirectPlayX_GetGroupParent(p,a,b) (p)->GetGroupParent(a,b)
|
1094 |
#define IDirectPlayX_GetPlayerAccount(p,a,b,c,d) (p)->GetPlayerAccount(a,b,c,d)
|
1095 |
#define IDirectPlayX_GetPlayerFlags(p,a,b) (p)->GetPlayerFlags(a,b)
|
1096 |
#define IDirectPlayX_GetGroupOwner(p,a,b) (p)->GetGroupOwner(a,b)
|
1097 |
#define IDirectPlayX_SetGroupOwner(p,a,b) (p)->SetGroupOwner(a,b)
|
1098 |
|
1099 |
#endif
|
1100 |
|
1101 |
/****************************************************************************
|
1102 |
*
|
1103 |
* EnumConnections API flags
|
1104 |
*
|
1105 |
****************************************************************************/
|
1106 |
|
1107 |
/*
|
1108 |
* Enumerate Service Providers
|
1109 |
*/
|
1110 |
#define DPCONNECTION_DIRECTPLAY 0x00000001
|
1111 |
|
1112 |
/*
|
1113 |
* Enumerate Lobby Providers
|
1114 |
*/
|
1115 |
#define DPCONNECTION_DIRECTPLAYLOBBY 0x00000002
|
1116 |
|
1117 |
|
1118 |
/****************************************************************************
|
1119 |
*
|
1120 |
* EnumPlayers API flags
|
1121 |
*
|
1122 |
****************************************************************************/
|
1123 |
|
1124 |
/*
|
1125 |
* Enumerate all players in the current session
|
1126 |
*/
|
1127 |
#define DPENUMPLAYERS_ALL 0x00000000
|
1128 |
#define DPENUMGROUPS_ALL DPENUMPLAYERS_ALL
|
1129 |
|
1130 |
|
1131 |
/*
|
1132 |
* Enumerate only local (created by this application) players
|
1133 |
* or groups
|
1134 |
*/
|
1135 |
#define DPENUMPLAYERS_LOCAL 0x00000008
|
1136 |
#define DPENUMGROUPS_LOCAL DPENUMPLAYERS_LOCAL
|
1137 |
|
1138 |
/*
|
1139 |
* Enumerate only remote (non-local) players
|
1140 |
* or groups
|
1141 |
*/
|
1142 |
#define DPENUMPLAYERS_REMOTE 0x00000010
|
1143 |
#define DPENUMGROUPS_REMOTE DPENUMPLAYERS_REMOTE
|
1144 |
|
1145 |
/*
|
1146 |
* Enumerate groups along with the players
|
1147 |
*/
|
1148 |
#define DPENUMPLAYERS_GROUP 0x00000020
|
1149 |
|
1150 |
/*
|
1151 |
* Enumerate players or groups in another session
|
1152 |
* (must supply lpguidInstance)
|
1153 |
*/
|
1154 |
#define DPENUMPLAYERS_SESSION 0x00000080
|
1155 |
#define DPENUMGROUPS_SESSION DPENUMPLAYERS_SESSION
|
1156 |
|
1157 |
/*
|
1158 |
* Enumerate server players
|
1159 |
*/
|
1160 |
#define DPENUMPLAYERS_SERVERPLAYER 0x00000100
|
1161 |
|
1162 |
/*
|
1163 |
* Enumerate spectator players
|
1164 |
*/
|
1165 |
#define DPENUMPLAYERS_SPECTATOR 0x00000200
|
1166 |
|
1167 |
/*
|
1168 |
* Enumerate shortcut groups
|
1169 |
*/
|
1170 |
#define DPENUMGROUPS_SHORTCUT 0x00000400
|
1171 |
|
1172 |
/*
|
1173 |
* Enumerate staging area groups
|
1174 |
*/
|
1175 |
#define DPENUMGROUPS_STAGINGAREA 0x00000800
|
1176 |
|
1177 |
/*
|
1178 |
* Enumerate hidden groups
|
1179 |
*/
|
1180 |
#define DPENUMGROUPS_HIDDEN 0x00001000
|
1181 |
|
1182 |
/*
|
1183 |
* Enumerate the group's owner
|
1184 |
*/
|
1185 |
#define DPENUMPLAYERS_OWNER 0x00002000
|
1186 |
|
1187 |
|
1188 |
/****************************************************************************
|
1189 |
*
|
1190 |
* CreatePlayer API flags
|
1191 |
*
|
1192 |
****************************************************************************/
|
1193 |
|
1194 |
/*
|
1195 |
* This flag indicates that this player should be designated
|
1196 |
* the server player. The app should specify this at CreatePlayer.
|
1197 |
*/
|
1198 |
#define DPPLAYER_SERVERPLAYER DPENUMPLAYERS_SERVERPLAYER
|
1199 |
|
1200 |
/*
|
1201 |
* This flag indicates that this player should be designated
|
1202 |
* a spectator. The app should specify this at CreatePlayer.
|
1203 |
*/
|
1204 |
#define DPPLAYER_SPECTATOR DPENUMPLAYERS_SPECTATOR
|
1205 |
|
1206 |
/*
|
1207 |
* This flag indicates that this player was created locally.
|
1208 |
* (returned from GetPlayerFlags)
|
1209 |
*/
|
1210 |
#define DPPLAYER_LOCAL DPENUMPLAYERS_LOCAL
|
1211 |
|
1212 |
/*
|
1213 |
* This flag indicates that this player is the group's owner
|
1214 |
* (Only returned in EnumGroupPlayers)
|
1215 |
*/
|
1216 |
#define DPPLAYER_OWNER DPENUMPLAYERS_OWNER
|
1217 |
|
1218 |
/****************************************************************************
|
1219 |
*
|
1220 |
* CreateGroup API flags
|
1221 |
*
|
1222 |
****************************************************************************/
|
1223 |
|
1224 |
|
1225 |
/*
|
1226 |
* This flag indicates that the StartSession can be called on the group.
|
1227 |
* The app should specify this at CreateGroup, or CreateGroupInGroup.
|
1228 |
*/
|
1229 |
#define DPGROUP_STAGINGAREA DPENUMGROUPS_STAGINGAREA
|
1230 |
|
1231 |
/*
|
1232 |
* This flag indicates that this group was created locally.
|
1233 |
* (returned from GetGroupFlags)
|
1234 |
*/
|
1235 |
#define DPGROUP_LOCAL DPENUMGROUPS_LOCAL
|
1236 |
|
1237 |
/*
|
1238 |
* This flag indicates that this group was created hidden.
|
1239 |
*/
|
1240 |
#define DPGROUP_HIDDEN DPENUMGROUPS_HIDDEN
|
1241 |
|
1242 |
|
1243 |
/****************************************************************************
|
1244 |
*
|
1245 |
* EnumSessions API flags
|
1246 |
*
|
1247 |
****************************************************************************/
|
1248 |
|
1249 |
/*
|
1250 |
* Enumerate sessions which can be joined
|
1251 |
*/
|
1252 |
#define DPENUMSESSIONS_AVAILABLE 0x00000001
|
1253 |
|
1254 |
/*
|
1255 |
* Enumerate all sessions even if they can't be joined.
|
1256 |
*/
|
1257 |
#define DPENUMSESSIONS_ALL 0x00000002
|
1258 |
|
1259 |
|
1260 |
/*
|
1261 |
* Start an asynchronous enum sessions
|
1262 |
*/
|
1263 |
#define DPENUMSESSIONS_ASYNC 0x00000010
|
1264 |
|
1265 |
/*
|
1266 |
* Stop an asynchronous enum sessions
|
1267 |
*/
|
1268 |
#define DPENUMSESSIONS_STOPASYNC 0x00000020
|
1269 |
|
1270 |
/*
|
1271 |
* Enumerate sessions even if they require a password
|
1272 |
*/
|
1273 |
#define DPENUMSESSIONS_PASSWORDREQUIRED 0x00000040
|
1274 |
|
1275 |
/*
|
1276 |
* Return status about progress of enumeration instead of
|
1277 |
* showing any status dialogs.
|
1278 |
*/
|
1279 |
#define DPENUMSESSIONS_RETURNSTATUS 0x00000080
|
1280 |
|
1281 |
/****************************************************************************
|
1282 |
*
|
1283 |
* GetCaps and GetPlayerCaps API flags
|
1284 |
*
|
1285 |
****************************************************************************/
|
1286 |
|
1287 |
/*
|
1288 |
* The latency returned should be for guaranteed message sending.
|
1289 |
* Default is non-guaranteed messaging.
|
1290 |
*/
|
1291 |
#define DPGETCAPS_GUARANTEED 0x00000001
|
1292 |
|
1293 |
|
1294 |
/****************************************************************************
|
1295 |
*
|
1296 |
* GetGroupData, GetPlayerData API flags
|
1297 |
* Remote and local Group/Player data is maintained separately.
|
1298 |
* Default is DPGET_REMOTE.
|
1299 |
*
|
1300 |
****************************************************************************/
|
1301 |
|
1302 |
/*
|
1303 |
* Get the remote data (set by any DirectPlay object in
|
1304 |
* the session using DPSET_REMOTE)
|
1305 |
*/
|
1306 |
#define DPGET_REMOTE 0x00000000
|
1307 |
|
1308 |
/*
|
1309 |
* Get the local data (set by this DirectPlay object
|
1310 |
* using DPSET_LOCAL)
|
1311 |
*/
|
1312 |
#define DPGET_LOCAL 0x00000001
|
1313 |
|
1314 |
|
1315 |
/****************************************************************************
|
1316 |
*
|
1317 |
* Open API flags
|
1318 |
*
|
1319 |
****************************************************************************/
|
1320 |
|
1321 |
/*
|
1322 |
* Join the session that is described by the DPSESSIONDESC2 structure
|
1323 |
*/
|
1324 |
#define DPOPEN_JOIN 0x00000001
|
1325 |
|
1326 |
/*
|
1327 |
* Create a new session as described by the DPSESSIONDESC2 structure
|
1328 |
*/
|
1329 |
#define DPOPEN_CREATE 0x00000002
|
1330 |
|
1331 |
/*
|
1332 |
* Return status about progress of open instead of showing
|
1333 |
* any status dialogs.
|
1334 |
*/
|
1335 |
#define DPOPEN_RETURNSTATUS DPENUMSESSIONS_RETURNSTATUS
|
1336 |
|
1337 |
|
1338 |
/****************************************************************************
|
1339 |
*
|
1340 |
* DPLCONNECTION flags
|
1341 |
*
|
1342 |
****************************************************************************/
|
1343 |
|
1344 |
/*
|
1345 |
* This application should create a new session as
|
1346 |
* described by the DPSESIONDESC structure
|
1347 |
*/
|
1348 |
#define DPLCONNECTION_CREATESESSION DPOPEN_CREATE
|
1349 |
|
1350 |
/*
|
1351 |
* This application should join the session described by
|
1352 |
* the DPSESIONDESC structure with the lpAddress data
|
1353 |
*/
|
1354 |
#define DPLCONNECTION_JOINSESSION DPOPEN_JOIN
|
1355 |
|
1356 |
/****************************************************************************
|
1357 |
*
|
1358 |
* Receive API flags
|
1359 |
* Default is DPRECEIVE_ALL
|
1360 |
*
|
1361 |
****************************************************************************/
|
1362 |
|
1363 |
/*
|
1364 |
* Get the first message in the queue
|
1365 |
*/
|
1366 |
#define DPRECEIVE_ALL 0x00000001
|
1367 |
|
1368 |
/*
|
1369 |
* Get the first message in the queue directed to a specific player
|
1370 |
*/
|
1371 |
#define DPRECEIVE_TOPLAYER 0x00000002
|
1372 |
|
1373 |
/*
|
1374 |
* Get the first message in the queue from a specific player
|
1375 |
*/
|
1376 |
#define DPRECEIVE_FROMPLAYER 0x00000004
|
1377 |
|
1378 |
/*
|
1379 |
* Get the message but don't remove it from the queue
|
1380 |
*/
|
1381 |
#define DPRECEIVE_PEEK 0x00000008
|
1382 |
|
1383 |
|
1384 |
/****************************************************************************
|
1385 |
*
|
1386 |
* Send API flags
|
1387 |
*
|
1388 |
****************************************************************************/
|
1389 |
|
1390 |
/*
|
1391 |
* Send the message using a guaranteed send method.
|
1392 |
* Default is non-guaranteed.
|
1393 |
*/
|
1394 |
#define DPSEND_GUARANTEED 0x00000001
|
1395 |
|
1396 |
|
1397 |
/*
|
1398 |
* This flag is obsolete. It is ignored by DirectPlay
|
1399 |
*/
|
1400 |
#define DPSEND_HIGHPRIORITY 0x00000002
|
1401 |
|
1402 |
/*
|
1403 |
* This flag is obsolete. It is ignored by DirectPlay
|
1404 |
*/
|
1405 |
#define DPSEND_OPENSTREAM 0x00000008
|
1406 |
|
1407 |
/*
|
1408 |
* This flag is obsolete. It is ignored by DirectPlay
|
1409 |
*/
|
1410 |
#define DPSEND_CLOSESTREAM 0x00000010
|
1411 |
|
1412 |
/*
|
1413 |
* Send the message digitally signed to ensure authenticity.
|
1414 |
*/
|
1415 |
#define DPSEND_SIGNED 0x00000020
|
1416 |
|
1417 |
/*
|
1418 |
* Send the message with encryption to ensure privacy.
|
1419 |
*/
|
1420 |
#define DPSEND_ENCRYPTED 0x00000040
|
1421 |
|
1422 |
/*
|
1423 |
* The message is a lobby system message
|
1424 |
*/
|
1425 |
#define DPSEND_LOBBYSYSTEMMESSAGE 0x00000080
|
1426 |
|
1427 |
|
1428 |
/*
|
1429 |
* Send message asynchronously, must check caps
|
1430 |
* before using this flag. It is always provided
|
1431 |
* if the protocol flag is set.
|
1432 |
*/
|
1433 |
#define DPSEND_ASYNC 0x00000200
|
1434 |
|
1435 |
/*
|
1436 |
* When an message is completed, don't tell me.
|
1437 |
* by default the application is notified with a system message.
|
1438 |
*/
|
1439 |
#define DPSEND_NOSENDCOMPLETEMSG 0x00000400
|
1440 |
|
1441 |
|
1442 |
/*
|
1443 |
* Maximum priority for sends available to applications
|
1444 |
*/
|
1445 |
#define DPSEND_MAX_PRI 0x0000FFFF
|
1446 |
#define DPSEND_MAX_PRIORITY DPSEND_MAX_PRI
|
1447 |
|
1448 |
|
1449 |
/****************************************************************************
|
1450 |
*
|
1451 |
* SetGroupData, SetGroupName, SetPlayerData, SetPlayerName,
|
1452 |
* SetSessionDesc API flags.
|
1453 |
* Default is DPSET_REMOTE.
|
1454 |
*
|
1455 |
****************************************************************************/
|
1456 |
|
1457 |
/*
|
1458 |
* Propagate the data to all players in the session
|
1459 |
*/
|
1460 |
#define DPSET_REMOTE 0x00000000
|
1461 |
|
1462 |
/*
|
1463 |
* Do not propagate the data to other players
|
1464 |
*/
|
1465 |
#define DPSET_LOCAL 0x00000001
|
1466 |
|
1467 |
/*
|
1468 |
* Used with DPSET_REMOTE, use guaranteed message send to
|
1469 |
* propagate the data
|
1470 |
*/
|
1471 |
#define DPSET_GUARANTEED 0x00000002
|
1472 |
|
1473 |
/****************************************************************************
|
1474 |
*
|
1475 |
* GetMessageQueue API flags.
|
1476 |
* Default is DPMESSAGEQUEUE_SEND
|
1477 |
*
|
1478 |
****************************************************************************/
|
1479 |
|
1480 |
/*
|
1481 |
* Get Send Queue - requires Service Provider Support
|
1482 |
*/
|
1483 |
#define DPMESSAGEQUEUE_SEND 0x00000001
|
1484 |
|
1485 |
/*
|
1486 |
* Get Receive Queue
|
1487 |
*/
|
1488 |
#define DPMESSAGEQUEUE_RECEIVE 0x00000002
|
1489 |
|
1490 |
|
1491 |
/****************************************************************************
|
1492 |
*
|
1493 |
* Connect API flags
|
1494 |
*
|
1495 |
****************************************************************************/
|
1496 |
|
1497 |
|
1498 |
/*
|
1499 |
* Start an asynchronous connect which returns status codes
|
1500 |
*/
|
1501 |
#define DPCONNECT_RETURNSTATUS (DPENUMSESSIONS_RETURNSTATUS)
|
1502 |
|
1503 |
|
1504 |
/****************************************************************************
|
1505 |
*
|
1506 |
* DirectPlay system messages and message data structures
|
1507 |
*
|
1508 |
* All system message come 'From' player DPID_SYSMSG. To determine what type
|
1509 |
* of message it is, cast the lpData from Receive to DPMSG_GENERIC and check
|
1510 |
* the dwType member against one of the following DPSYS_xxx constants. Once
|
1511 |
* a match is found, cast the lpData to the corresponding of the DPMSG_xxx
|
1512 |
* structures to access the data of the message.
|
1513 |
*
|
1514 |
****************************************************************************/
|
1515 |
|
1516 |
/*
|
1517 |
* A new player or group has been created in the session
|
1518 |
* Use DPMSG_CREATEPLAYERORGROUP. Check dwPlayerType to see if it
|
1519 |
* is a player or a group.
|
1520 |
*/
|
1521 |
#define DPSYS_CREATEPLAYERORGROUP 0x0003
|
1522 |
|
1523 |
/*
|
1524 |
* A player has been deleted from the session
|
1525 |
* Use DPMSG_DESTROYPLAYERORGROUP
|
1526 |
*/
|
1527 |
#define DPSYS_DESTROYPLAYERORGROUP 0x0005
|
1528 |
|
1529 |
/*
|
1530 |
* A player has been added to a group
|
1531 |
* Use DPMSG_ADDPLAYERTOGROUP
|
1532 |
*/
|
1533 |
#define DPSYS_ADDPLAYERTOGROUP 0x0007
|
1534 |
|
1535 |
/*
|
1536 |
* A player has been removed from a group
|
1537 |
* Use DPMSG_DELETEPLAYERFROMGROUP
|
1538 |
*/
|
1539 |
#define DPSYS_DELETEPLAYERFROMGROUP 0x0021
|
1540 |
|
1541 |
/*
|
1542 |
* This DirectPlay object lost its connection with all the
|
1543 |
* other players in the session.
|
1544 |
* Use DPMSG_SESSIONLOST.
|
1545 |
*/
|
1546 |
#define DPSYS_SESSIONLOST 0x0031
|
1547 |
|
1548 |
/*
|
1549 |
* The current host has left the session.
|
1550 |
* This DirectPlay object is now the host.
|
1551 |
* Use DPMSG_HOST.
|
1552 |
*/
|
1553 |
#define DPSYS_HOST 0x0101
|
1554 |
|
1555 |
/*
|
1556 |
* The remote data associated with a player or
|
1557 |
* group has changed. Check dwPlayerType to see
|
1558 |
* if it is a player or a group
|
1559 |
* Use DPMSG_SETPLAYERORGROUPDATA
|
1560 |
*/
|
1561 |
#define DPSYS_SETPLAYERORGROUPDATA 0x0102
|
1562 |
|
1563 |
/*
|
1564 |
* The name of a player or group has changed.
|
1565 |
* Check dwPlayerType to see if it is a player
|
1566 |
* or a group.
|
1567 |
* Use DPMSG_SETPLAYERORGROUPNAME
|
1568 |
*/
|
1569 |
#define DPSYS_SETPLAYERORGROUPNAME 0x0103
|
1570 |
|
1571 |
/*
|
1572 |
* The session description has changed.
|
1573 |
* Use DPMSG_SETSESSIONDESC
|
1574 |
*/
|
1575 |
#define DPSYS_SETSESSIONDESC 0x0104
|
1576 |
|
1577 |
/*
|
1578 |
* A group has been added to a group
|
1579 |
* Use DPMSG_ADDGROUPTOGROUP
|
1580 |
*/
|
1581 |
#define DPSYS_ADDGROUPTOGROUP 0x0105
|
1582 |
|
1583 |
/*
|
1584 |
* A group has been removed from a group
|
1585 |
* Use DPMSG_DELETEGROUPFROMGROUP
|
1586 |
*/
|
1587 |
#define DPSYS_DELETEGROUPFROMGROUP 0x0106
|
1588 |
|
1589 |
/*
|
1590 |
* A secure player-player message has arrived.
|
1591 |
* Use DPMSG_SECUREMESSAGE
|
1592 |
*/
|
1593 |
#define DPSYS_SECUREMESSAGE 0x0107
|
1594 |
|
1595 |
/*
|
1596 |
* Start a new session.
|
1597 |
* Use DPMSG_STARTSESSION
|
1598 |
*/
|
1599 |
#define DPSYS_STARTSESSION 0x0108
|
1600 |
|
1601 |
/*
|
1602 |
* A chat message has arrived
|
1603 |
* Use DPMSG_CHAT
|
1604 |
*/
|
1605 |
#define DPSYS_CHAT 0x0109
|
1606 |
|
1607 |
/*
|
1608 |
* The owner of a group has changed
|
1609 |
* Use DPMSG_SETGROUPOWNER
|
1610 |
*/
|
1611 |
#define DPSYS_SETGROUPOWNER 0x010A
|
1612 |
|
1613 |
/*
|
1614 |
* An async send has finished, failed or been cancelled
|
1615 |
* Use DPMSG_SENDCOMPLETE
|
1616 |
*/
|
1617 |
#define DPSYS_SENDCOMPLETE 0x010d
|
1618 |
|
1619 |
|
1620 |
/*
|
1621 |
* Used in the dwPlayerType field to indicate if it applies to a group
|
1622 |
* or a player
|
1623 |
*/
|
1624 |
#define DPPLAYERTYPE_GROUP 0x00000000
|
1625 |
#define DPPLAYERTYPE_PLAYER 0x00000001
|
1626 |
|
1627 |
|
1628 |
/*
|
1629 |
* DPMSG_GENERIC
|
1630 |
* Generic message structure used to identify the message type.
|
1631 |
*/
|
1632 |
typedef struct
|
1633 |
{
|
1634 |
DWORD dwType; // Message type
|
1635 |
} DPMSG_GENERIC, FAR *LPDPMSG_GENERIC;
|
1636 |
|
1637 |
/*
|
1638 |
* DPMSG_CREATEPLAYERORGROUP
|
1639 |
* System message generated when a new player or group
|
1640 |
* created in the session with information about it.
|
1641 |
*/
|
1642 |
typedef struct
|
1643 |
{
|
1644 |
DWORD dwType; // Message type
|
1645 |
DWORD dwPlayerType; // Is it a player or group
|
1646 |
DPID dpId; // ID of the player or group
|
1647 |
DWORD dwCurrentPlayers; // current # players & groups in session
|
1648 |
LPVOID lpData; // pointer to remote data
|
1649 |
DWORD dwDataSize; // size of remote data
|
1650 |
DPNAME dpnName; // structure with name info
|
1651 |
// the following fields are only available when using
|
1652 |
// the IDirectPlay3 interface or greater
|
1653 |
DPID dpIdParent; // id of parent group
|
1654 |
DWORD dwFlags; // player or group flags
|
1655 |
} DPMSG_CREATEPLAYERORGROUP, FAR *LPDPMSG_CREATEPLAYERORGROUP;
|
1656 |
|
1657 |
/*
|
1658 |
* DPMSG_DESTROYPLAYERORGROUP
|
1659 |
* System message generated when a player or group is being
|
1660 |
* destroyed in the session with information about it.
|
1661 |
*/
|
1662 |
typedef struct
|
1663 |
{
|
1664 |
DWORD dwType; // Message type
|
1665 |
DWORD dwPlayerType; // Is it a player or group
|
1666 |
DPID dpId; // player ID being deleted
|
1667 |
LPVOID lpLocalData; // copy of players local data
|
1668 |
DWORD dwLocalDataSize; // sizeof local data
|
1669 |
LPVOID lpRemoteData; // copy of players remote data
|
1670 |
DWORD dwRemoteDataSize; // sizeof remote data
|
1671 |
// the following fields are only available when using
|
1672 |
// the IDirectPlay3 interface or greater
|
1673 |
DPNAME dpnName; // structure with name info
|
1674 |
DPID dpIdParent; // id of parent group
|
1675 |
DWORD dwFlags; // player or group flags
|
1676 |
} DPMSG_DESTROYPLAYERORGROUP, FAR *LPDPMSG_DESTROYPLAYERORGROUP;
|
1677 |
|
1678 |
/*
|
1679 |
* DPMSG_ADDPLAYERTOGROUP
|
1680 |
* System message generated when a player is being added
|
1681 |
* to a group.
|
1682 |
*/
|
1683 |
typedef struct
|
1684 |
{
|
1685 |
DWORD dwType; // Message type
|
1686 |
DPID dpIdGroup; // group ID being added to
|
1687 |
DPID dpIdPlayer; // player ID being added
|
1688 |
} DPMSG_ADDPLAYERTOGROUP, FAR *LPDPMSG_ADDPLAYERTOGROUP;
|
1689 |
|
1690 |
/*
|
1691 |
* DPMSG_DELETEPLAYERFROMGROUP
|
1692 |
* System message generated when a player is being
|
1693 |
* removed from a group
|
1694 |
*/
|
1695 |
typedef DPMSG_ADDPLAYERTOGROUP DPMSG_DELETEPLAYERFROMGROUP;
|
1696 |
typedef DPMSG_DELETEPLAYERFROMGROUP FAR *LPDPMSG_DELETEPLAYERFROMGROUP;
|
1697 |
|
1698 |
/*
|
1699 |
* DPMSG_ADDGROUPTOGROUP
|
1700 |
* System message generated when a group is being added
|
1701 |
* to a group.
|
1702 |
*/
|
1703 |
typedef struct
|
1704 |
{
|
1705 |
DWORD dwType; // Message type
|
1706 |
DPID dpIdParentGroup; // group ID being added to
|
1707 |
DPID dpIdGroup; // group ID being added
|
1708 |
} DPMSG_ADDGROUPTOGROUP, FAR *LPDPMSG_ADDGROUPTOGROUP;
|
1709 |
|
1710 |
/*
|
1711 |
* DPMSG_DELETEGROUPFROMGROUP
|
1712 |
* System message generated when a GROUP is being
|
1713 |
* removed from a group
|
1714 |
*/
|
1715 |
typedef DPMSG_ADDGROUPTOGROUP DPMSG_DELETEGROUPFROMGROUP;
|
1716 |
typedef DPMSG_DELETEGROUPFROMGROUP FAR *LPDPMSG_DELETEGROUPFROMGROUP;
|
1717 |
|
1718 |
/*
|
1719 |
* DPMSG_SETPLAYERORGROUPDATA
|
1720 |
* System message generated when remote data for a player or
|
1721 |
* group has changed.
|
1722 |
*/
|
1723 |
typedef struct
|
1724 |
{
|
1725 |
DWORD dwType; // Message type
|
1726 |
DWORD dwPlayerType; // Is it a player or group
|
1727 |
DPID dpId; // ID of player or group
|
1728 |
LPVOID lpData; // pointer to remote data
|
1729 |
DWORD dwDataSize; // size of remote data
|
1730 |
} DPMSG_SETPLAYERORGROUPDATA, FAR *LPDPMSG_SETPLAYERORGROUPDATA;
|
1731 |
|
1732 |
/*
|
1733 |
* DPMSG_SETPLAYERORGROUPNAME
|
1734 |
* System message generated when the name of a player or
|
1735 |
* group has changed.
|
1736 |
*/
|
1737 |
typedef struct
|
1738 |
{
|
1739 |
DWORD dwType; // Message type
|
1740 |
DWORD dwPlayerType; // Is it a player or group
|
1741 |
DPID dpId; // ID of player or group
|
1742 |
DPNAME dpnName; // structure with new name info
|
1743 |
} DPMSG_SETPLAYERORGROUPNAME, FAR *LPDPMSG_SETPLAYERORGROUPNAME;
|
1744 |
|
1745 |
/*
|
1746 |
* DPMSG_SETSESSIONDESC
|
1747 |
* System message generated when session desc has changed
|
1748 |
*/
|
1749 |
typedef struct
|
1750 |
{
|
1751 |
DWORD dwType; // Message type
|
1752 |
DPSESSIONDESC2 dpDesc; // Session desc
|
1753 |
} DPMSG_SETSESSIONDESC, FAR *LPDPMSG_SETSESSIONDESC;
|
1754 |
|
1755 |
/*
|
1756 |
* DPMSG_HOST
|
1757 |
* System message generated when the host has migrated to this
|
1758 |
* DirectPlay object.
|
1759 |
*
|
1760 |
*/
|
1761 |
typedef DPMSG_GENERIC DPMSG_HOST;
|
1762 |
typedef DPMSG_HOST FAR *LPDPMSG_HOST;
|
1763 |
|
1764 |
/*
|
1765 |
* DPMSG_SESSIONLOST
|
1766 |
* System message generated when the connection to the session is lost.
|
1767 |
*
|
1768 |
*/
|
1769 |
typedef DPMSG_GENERIC DPMSG_SESSIONLOST;
|
1770 |
typedef DPMSG_SESSIONLOST FAR *LPDPMSG_SESSIONLOST;
|
1771 |
|
1772 |
/*
|
1773 |
* DPMSG_SECUREMESSAGE
|
1774 |
* System message generated when a player requests a secure send
|
1775 |
*/
|
1776 |
typedef struct
|
1777 |
{
|
1778 |
DWORD dwType; // Message Type
|
1779 |
DWORD dwFlags; // Signed/Encrypted
|
1780 |
DPID dpIdFrom; // ID of Sending Player
|
1781 |
LPVOID lpData; // Player message
|
1782 |
DWORD dwDataSize; // Size of player message
|
1783 |
} DPMSG_SECUREMESSAGE, FAR *LPDPMSG_SECUREMESSAGE;
|
1784 |
|
1785 |
/*
|
1786 |
* DPMSG_STARTSESSION
|
1787 |
* System message containing all information required to
|
1788 |
* start a new session
|
1789 |
*/
|
1790 |
typedef struct
|
1791 |
{
|
1792 |
DWORD dwType; // Message type
|
1793 |
LPDPLCONNECTION lpConn; // DPLCONNECTION structure
|
1794 |
} DPMSG_STARTSESSION, FAR *LPDPMSG_STARTSESSION;
|
1795 |
|
1796 |
/*
|
1797 |
* DPMSG_CHAT
|
1798 |
* System message containing a chat message
|
1799 |
*/
|
1800 |
typedef struct
|
1801 |
{
|
1802 |
DWORD dwType; // Message type
|
1803 |
DWORD dwFlags; // Message flags
|
1804 |
DPID idFromPlayer; // ID of the Sending Player
|
1805 |
DPID idToPlayer; // ID of the To Player
|
1806 |
DPID idToGroup; // ID of the To Group
|
1807 |
LPDPCHAT lpChat; // Pointer to a structure containing the chat message
|
1808 |
} DPMSG_CHAT, FAR *LPDPMSG_CHAT;
|
1809 |
|
1810 |
/*
|
1811 |
* DPMSG_SETGROUPOWNER
|
1812 |
* System message generated when the owner of a group has changed
|
1813 |
*/
|
1814 |
typedef struct
|
1815 |
{
|
1816 |
DWORD dwType; // Message type
|
1817 |
DPID idGroup; // ID of the group
|
1818 |
DPID idNewOwner; // ID of the player that is the new owner
|
1819 |
DPID idOldOwner; // ID of the player that used to be the owner
|
1820 |
} DPMSG_SETGROUPOWNER, FAR *LPDPMSG_SETGROUPOWNER;
|
1821 |
|
1822 |
/*
|
1823 |
* DPMSG_SENDCOMPLETE
|
1824 |
* System message generated when finished with an Async Send message
|
1825 |
*
|
1826 |
* NOTE SENDPARMS has an overlay for DPMSG_SENDCOMPLETE, don't
|
1827 |
* change this message w/o changing SENDPARMS.
|
1828 |
*/
|
1829 |
typedef struct
|
1830 |
{
|
1831 |
DWORD dwType;
|
1832 |
DPID idFrom;
|
1833 |
DPID idTo;
|
1834 |
DWORD dwFlags;
|
1835 |
DWORD dwPriority;
|
1836 |
DWORD dwTimeout;
|
1837 |
LPVOID lpvContext;
|
1838 |
DWORD dwMsgID;
|
1839 |
HRESULT hr;
|
1840 |
DWORD dwSendTime;
|
1841 |
} DPMSG_SENDCOMPLETE, *LPDPMSG_SENDCOMPLETE;
|
1842 |
|
1843 |
/****************************************************************************
|
1844 |
*
|
1845 |
* DIRECTPLAY ERRORS
|
1846 |
*
|
1847 |
* Errors are represented by negative values and cannot be combined.
|
1848 |
*
|
1849 |
****************************************************************************/
|
1850 |
#define DP_OK S_OK
|
1851 |
#define DPERR_ALREADYINITIALIZED MAKE_DPHRESULT( 5 )
|
1852 |
#define DPERR_ACCESSDENIED MAKE_DPHRESULT( 10 )
|
1853 |
#define DPERR_ACTIVEPLAYERS MAKE_DPHRESULT( 20 )
|
1854 |
#define DPERR_BUFFERTOOSMALL MAKE_DPHRESULT( 30 )
|
1855 |
#define DPERR_CANTADDPLAYER MAKE_DPHRESULT( 40 )
|
1856 |
#define DPERR_CANTCREATEGROUP MAKE_DPHRESULT( 50 )
|
1857 |
#define DPERR_CANTCREATEPLAYER MAKE_DPHRESULT( 60 )
|
1858 |
#define DPERR_CANTCREATESESSION MAKE_DPHRESULT( 70 )
|
1859 |
#define DPERR_CAPSNOTAVAILABLEYET MAKE_DPHRESULT( 80 )
|
1860 |
#define DPERR_EXCEPTION MAKE_DPHRESULT( 90 )
|
1861 |
#define DPERR_GENERIC E_FAIL
|
1862 |
#define DPERR_INVALIDFLAGS MAKE_DPHRESULT( 120 )
|
1863 |
#define DPERR_INVALIDOBJECT MAKE_DPHRESULT( 130 )
|
1864 |
#define DPERR_INVALIDPARAM E_INVALIDARG
|
1865 |
#define DPERR_INVALIDPARAMS DPERR_INVALIDPARAM
|
1866 |
#define DPERR_INVALIDPLAYER MAKE_DPHRESULT( 150 )
|
1867 |
#define DPERR_INVALIDGROUP MAKE_DPHRESULT( 155 )
|
1868 |
#define DPERR_NOCAPS MAKE_DPHRESULT( 160 )
|
1869 |
#define DPERR_NOCONNECTION MAKE_DPHRESULT( 170 )
|
1870 |
#define DPERR_NOMEMORY E_OUTOFMEMORY
|
1871 |
#define DPERR_OUTOFMEMORY DPERR_NOMEMORY
|
1872 |
#define DPERR_NOMESSAGES MAKE_DPHRESULT( 190 )
|
1873 |
#define DPERR_NONAMESERVERFOUND MAKE_DPHRESULT( 200 )
|
1874 |
#define DPERR_NOPLAYERS MAKE_DPHRESULT( 210 )
|
1875 |
#define DPERR_NOSESSIONS MAKE_DPHRESULT( 220 )
|
1876 |
#define DPERR_PENDING E_PENDING
|
1877 |
#define DPERR_SENDTOOBIG MAKE_DPHRESULT( 230 )
|
1878 |
#define DPERR_TIMEOUT MAKE_DPHRESULT( 240 )
|
1879 |
#define DPERR_UNAVAILABLE MAKE_DPHRESULT( 250 )
|
1880 |
#define DPERR_UNSUPPORTED E_NOTIMPL
|
1881 |
#define DPERR_BUSY MAKE_DPHRESULT( 270 )
|
1882 |
#define DPERR_USERCANCEL MAKE_DPHRESULT( 280 )
|
1883 |
#define DPERR_NOINTERFACE E_NOINTERFACE
|
1884 |
#define DPERR_CANNOTCREATESERVER MAKE_DPHRESULT( 290 )
|
1885 |
#define DPERR_PLAYERLOST MAKE_DPHRESULT( 300 )
|
1886 |
#define DPERR_SESSIONLOST MAKE_DPHRESULT( 310 )
|
1887 |
#define DPERR_UNINITIALIZED MAKE_DPHRESULT( 320 )
|
1888 |
#define DPERR_NONEWPLAYERS MAKE_DPHRESULT( 330 )
|
1889 |
#define DPERR_INVALIDPASSWORD MAKE_DPHRESULT( 340 )
|
1890 |
#define DPERR_CONNECTING MAKE_DPHRESULT( 350 )
|
1891 |
#define DPERR_CONNECTIONLOST MAKE_DPHRESULT( 360 )
|
1892 |
#define DPERR_UNKNOWNMESSAGE MAKE_DPHRESULT( 370 )
|
1893 |
#define DPERR_CANCELFAILED MAKE_DPHRESULT( 380 )
|
1894 |
#define DPERR_INVALIDPRIORITY MAKE_DPHRESULT( 390 )
|
1895 |
#define DPERR_NOTHANDLED MAKE_DPHRESULT( 400 )
|
1896 |
#define DPERR_CANCELLED MAKE_DPHRESULT( 410 )
|
1897 |
#define DPERR_ABORTED MAKE_DPHRESULT( 420 )
|
1898 |
|
1899 |
|
1900 |
#define DPERR_BUFFERTOOLARGE MAKE_DPHRESULT( 1000 )
|
1901 |
#define DPERR_CANTCREATEPROCESS MAKE_DPHRESULT( 1010 )
|
1902 |
#define DPERR_APPNOTSTARTED MAKE_DPHRESULT( 1020 )
|
1903 |
#define DPERR_INVALIDINTERFACE MAKE_DPHRESULT( 1030 )
|
1904 |
#define DPERR_NOSERVICEPROVIDER MAKE_DPHRESULT( 1040 )
|
1905 |
#define DPERR_UNKNOWNAPPLICATION MAKE_DPHRESULT( 1050 )
|
1906 |
#define DPERR_NOTLOBBIED MAKE_DPHRESULT( 1070 )
|
1907 |
#define DPERR_SERVICEPROVIDERLOADED MAKE_DPHRESULT( 1080 )
|
1908 |
#define DPERR_ALREADYREGISTERED MAKE_DPHRESULT( 1090 )
|
1909 |
#define DPERR_NOTREGISTERED MAKE_DPHRESULT( 1100 )
|
1910 |
|
1911 |
//
|
1912 |
// Security related errors
|
1913 |
//
|
1914 |
#define DPERR_AUTHENTICATIONFAILED MAKE_DPHRESULT( 2000 )
|
1915 |
#define DPERR_CANTLOADSSPI MAKE_DPHRESULT( 2010 )
|
1916 |
#define DPERR_ENCRYPTIONFAILED MAKE_DPHRESULT( 2020 )
|
1917 |
#define DPERR_SIGNFAILED MAKE_DPHRESULT( 2030 )
|
1918 |
#define DPERR_CANTLOADSECURITYPACKAGE MAKE_DPHRESULT( 2040 )
|
1919 |
#define DPERR_ENCRYPTIONNOTSUPPORTED MAKE_DPHRESULT( 2050 )
|
1920 |
#define DPERR_CANTLOADCAPI MAKE_DPHRESULT( 2060 )
|
1921 |
#define DPERR_NOTLOGGEDIN MAKE_DPHRESULT( 2070 )
|
1922 |
#define DPERR_LOGONDENIED MAKE_DPHRESULT( 2080 )
|
1923 |
|
1924 |
|
1925 |
/****************************************************************************
|
1926 |
*
|
1927 |
* dplay 1.0 obsolete structures + interfaces
|
1928 |
* Included for compatibility only. New apps should
|
1929 |
* use IDirectPlay2
|
1930 |
*
|
1931 |
****************************************************************************/
|
1932 |
|
1933 |
// define this to ignore obsolete interfaces and constants
|
1934 |
#ifndef IDIRECTPLAY2_OR_GREATER
|
1935 |
|
1936 |
#define DPOPEN_OPENSESSION DPOPEN_JOIN
|
1937 |
#define DPOPEN_CREATESESSION DPOPEN_CREATE
|
1938 |
|
1939 |
#define DPENUMSESSIONS_PREVIOUS 0x00000004
|
1940 |
|
1941 |
#define DPENUMPLAYERS_PREVIOUS 0x00000004
|
1942 |
|
1943 |
#define DPSEND_GUARANTEE DPSEND_GUARANTEED
|
1944 |
#define DPSEND_TRYONCE 0x00000004
|
1945 |
|
1946 |
#define DPCAPS_NAMESERVICE 0x00000001
|
1947 |
#define DPCAPS_NAMESERVER DPCAPS_ISHOST
|
1948 |
#define DPCAPS_GUARANTEED 0x00000004
|
1949 |
|
1950 |
#define DPLONGNAMELEN 52
|
1951 |
#define DPSHORTNAMELEN 20
|
1952 |
#define DPSESSIONNAMELEN 32
|
1953 |
#define DPPASSWORDLEN 16
|
1954 |
#define DPUSERRESERVED 16
|
1955 |
|
1956 |
#define DPSYS_ADDPLAYER 0x0003
|
1957 |
#define DPSYS_DELETEPLAYER 0x0005
|
1958 |
|
1959 |
#define DPSYS_DELETEGROUP 0x0020
|
1960 |
#define DPSYS_DELETEPLAYERFROMGRP 0x0021
|
1961 |
#define DPSYS_CONNECT 0x484b
|
1962 |
|
1963 |
typedef struct
|
1964 |
{
|
1965 |
DWORD dwType;
|
1966 |
DWORD dwPlayerType;
|
1967 |
DPID dpId;
|
1968 |
char szLongName[DPLONGNAMELEN];
|
1969 |
char szShortName[DPSHORTNAMELEN];
|
1970 |
DWORD dwCurrentPlayers;
|
1971 |
} DPMSG_ADDPLAYER;
|
1972 |
|
1973 |
typedef DPMSG_ADDPLAYER DPMSG_ADDGROUP;
|
1974 |
|
1975 |
typedef struct
|
1976 |
{
|
1977 |
DWORD dwType;
|
1978 |
DPID dpIdGroup;
|
1979 |
DPID dpIdPlayer;
|
1980 |
} DPMSG_GROUPADD;
|
1981 |
|
1982 |
typedef DPMSG_GROUPADD DPMSG_GROUPDELETE;
|
1983 |
typedef struct
|
1984 |
{
|
1985 |
DWORD dwType;
|
1986 |
DPID dpId;
|
1987 |
} DPMSG_DELETEPLAYER;
|
1988 |
|
1989 |
typedef BOOL (PASCAL *LPDPENUMPLAYERSCALLBACK)(
|
1990 |
DPID dpId,
|
1991 |
LPSTR lpFriendlyName,
|
1992 |
LPSTR lpFormalName,
|
1993 |
DWORD dwFlags,
|
1994 |
LPVOID lpContext );
|
1995 |
|
1996 |
typedef struct
|
1997 |
{
|
1998 |
DWORD dwSize;
|
1999 |
GUID guidSession;
|
2000 |
DWORD_PTR dwSession;
|
2001 |
DWORD dwMaxPlayers;
|
2002 |
DWORD dwCurrentPlayers;
|
2003 |
DWORD dwFlags;
|
2004 |
char szSessionName[DPSESSIONNAMELEN];
|
2005 |
char szUserField[DPUSERRESERVED];
|
2006 |
DWORD_PTR dwReserved1;
|
2007 |
char szPassword[DPPASSWORDLEN];
|
2008 |
DWORD_PTR dwReserved2;
|
2009 |
DWORD_PTR dwUser1;
|
2010 |
DWORD_PTR dwUser2;
|
2011 |
DWORD_PTR dwUser3;
|
2012 |
DWORD_PTR dwUser4;
|
2013 |
} DPSESSIONDESC,*LPDPSESSIONDESC;
|
2014 |
|
2015 |
typedef BOOL (PASCAL * LPDPENUMSESSIONSCALLBACK)(
|
2016 |
LPDPSESSIONDESC lpDPSessionDesc,
|
2017 |
LPVOID lpContext,
|
2018 |
LPDWORD lpdwTimeOut,
|
2019 |
DWORD dwFlags);
|
2020 |
|
2021 |
/*
|
2022 |
* IDirectPlay
|
2023 |
*/
|
2024 |
#undef INTERFACE
|
2025 |
#define INTERFACE IDirectPlay
|
2026 |
DECLARE_INTERFACE_( IDirectPlay, IUnknown )
|
2027 |
{
|
2028 |
/*** IUnknown methods ***/
|
2029 |
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
|
2030 |
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
|
2031 |
STDMETHOD_(ULONG,Release) (THIS) PURE;
|
2032 |
/*** IDirectPlay methods ***/
|
2033 |
STDMETHOD(AddPlayerToGroup) (THIS_ DPID, DPID) PURE;
|
2034 |
STDMETHOD(Close) (THIS) PURE;
|
2035 |
STDMETHOD(CreatePlayer) (THIS_ LPDPID,LPSTR,LPSTR,LPHANDLE) PURE;
|
2036 |
STDMETHOD(CreateGroup) (THIS_ LPDPID,LPSTR,LPSTR) PURE;
|
2037 |
STDMETHOD(DeletePlayerFromGroup)(THIS_ DPID,DPID) PURE;
|
2038 |
STDMETHOD(DestroyPlayer) (THIS_ DPID) PURE;
|
2039 |
STDMETHOD(DestroyGroup) (THIS_ DPID) PURE;
|
2040 |
STDMETHOD(EnableNewPlayers) (THIS_ BOOL) PURE;
|
2041 |
STDMETHOD(EnumGroupPlayers) (THIS_ DPID, LPDPENUMPLAYERSCALLBACK,LPVOID,DWORD) PURE;
|
2042 |
STDMETHOD(EnumGroups) (THIS_ DWORD, LPDPENUMPLAYERSCALLBACK,LPVOID,DWORD) PURE;
|
2043 |
STDMETHOD(EnumPlayers) (THIS_ DWORD, LPDPENUMPLAYERSCALLBACK,LPVOID,DWORD) PURE;
|
2044 |
STDMETHOD(EnumSessions) (THIS_ LPDPSESSIONDESC,DWORD,LPDPENUMSESSIONSCALLBACK,LPVOID,DWORD) PURE;
|
2045 |
STDMETHOD(GetCaps) (THIS_ LPDPCAPS) PURE;
|
2046 |
STDMETHOD(GetMessageCount) (THIS_ DPID, LPDWORD) PURE;
|
2047 |
STDMETHOD(GetPlayerCaps) (THIS_ DPID, LPDPCAPS) PURE;
|
2048 |
STDMETHOD(GetPlayerName) (THIS_ DPID,LPSTR,LPDWORD,LPSTR,LPDWORD) PURE;
|
2049 |
STDMETHOD(Initialize) (THIS_ LPGUID) PURE;
|
2050 |
STDMETHOD(Open) (THIS_ LPDPSESSIONDESC) PURE;
|
2051 |
STDMETHOD(Receive) (THIS_ LPDPID,LPDPID,DWORD,LPVOID,LPDWORD) PURE;
|
2052 |
STDMETHOD(SaveSession) (THIS_ LPSTR) PURE;
|
2053 |
STDMETHOD(Send) (THIS_ DPID, DPID, DWORD, LPVOID, DWORD) PURE;
|
2054 |
STDMETHOD(SetPlayerName) (THIS_ DPID,LPSTR,LPSTR) PURE;
|
2055 |
};
|
2056 |
|
2057 |
/****************************************************************************
|
2058 |
*
|
2059 |
* IDirectPlay interface macros
|
2060 |
*
|
2061 |
****************************************************************************/
|
2062 |
|
2063 |
#if !defined(__cplusplus) || defined(CINTERFACE)
|
2064 |
|
2065 |
#define IDirectPlay_AddPlayerToGroup(p,a,b) (p)->lpVtbl->AddPlayerToGroup(p,a,b)
|
2066 |
#define IDirectPlay_Close(p) (p)->lpVtbl->Close(p)
|
2067 |
#define IDirectPlay_CreateGroup(p,a,b,c) (p)->lpVtbl->CreateGroup(p,a,b,c)
|
2068 |
#define IDirectPlay_CreatePlayer(p,a,b,c,d) (p)->lpVtbl->CreatePlayer(p,a,b,c,d)
|
2069 |
#define IDirectPlay_DeletePlayerFromGroup(p,a,b) (p)->lpVtbl->DeletePlayerFromGroup(p,a,b)
|
2070 |
#define IDirectPlay_DestroyGroup(p,a) (p)->lpVtbl->DestroyGroup(p,a)
|
2071 |
#define IDirectPlay_DestroyPlayer(p,a) (p)->lpVtbl->DestroyPlayer(p,a)
|
2072 |
#define IDirectPlay_EnableNewPlayers(p,a) (p)->lpVtbl->EnableNewPlayers(p,a)
|
2073 |
#define IDirectPlay_EnumGroupPlayers(p,a,b,c,d) (p)->lpVtbl->EnumGroupPlayers(p,a,b,c,d)
|
2074 |
#define IDirectPlay_EnumGroups(p,a,b,c,d) (p)->lpVtbl->EnumGroups(p,a,b,c,d)
|
2075 |
#define IDirectPlay_EnumPlayers(p,a,b,c,d) (p)->lpVtbl->EnumPlayers(p,a,b,c,d)
|
2076 |
#define IDirectPlay_EnumSessions(p,a,b,c,d,e) (p)->lpVtbl->EnumSessions(p,a,b,c,d,e)
|
2077 |
#define IDirectPlay_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a)
|
2078 |
#define IDirectPlay_GetMessageCount(p,a,b) (p)->lpVtbl->GetMessageCount(p,a,b)
|
2079 |
#define IDirectPlay_GetPlayerCaps(p,a,b) (p)->lpVtbl->GetPlayerCaps(p,a,b)
|
2080 |
#define IDirectPlay_GetPlayerName(p,a,b,c,d,e) (p)->lpVtbl->GetPlayerName(p,a,b,c,d,e)
|
2081 |
#define IDirectPlay_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
|
2082 |
#define IDirectPlay_Open(p,a) (p)->lpVtbl->Open(p,a)
|
2083 |
#define IDirectPlay_Receive(p,a,b,c,d,e) (p)->lpVtbl->Receive(p,a,b,c,d,e)
|
2084 |
#define IDirectPlay_SaveSession(p,a) (p)->lpVtbl->SaveSession(p,a)
|
2085 |
#define IDirectPlay_Send(p,a,b,c,d,e) (p)->lpVtbl->Send(p,a,b,c,d,e)
|
2086 |
#define IDirectPlay_SetPlayerName(p,a,b,c) (p)->lpVtbl->SetPlayerName(p,a,b,c)
|
2087 |
|
2088 |
#else /* C++ */
|
2089 |
|
2090 |
#define IDirectPlay_AddPlayerToGroup(p,a,b) (p)->AddPlayerToGroup(a,b)
|
2091 |
#define IDirectPlay_Close(p) (p)->Close()
|
2092 |
#define IDirectPlay_CreateGroup(p,a,b,c) (p)->CreateGroup(a,b,c)
|
2093 |
#define IDirectPlay_CreatePlayer(p,a,b,c,d) (p)->CreatePlayer(a,b,c,d)
|
2094 |
#define IDirectPlay_DeletePlayerFromGroup(p,a,b) (p)->DeletePlayerFromGroup(a,b)
|
2095 |
#define IDirectPlay_DestroyGroup(p,a) (p)->DestroyGroup(a)
|
2096 |
#define IDirectPlay_DestroyPlayer(p,a) (p)->DestroyPlayer(a)
|
2097 |
#define IDirectPlay_EnableNewPlayers(p,a) (p)->EnableNewPlayers(a)
|
2098 |
#define IDirectPlay_EnumGroupPlayers(p,a,b,c,d) (p)->EnumGroupPlayers(a,b,c,d)
|
2099 |
#define IDirectPlay_EnumGroups(p,a,b,c,d) (p)->EnumGroups(a,b,c,d)
|
2100 |
#define IDirectPlay_EnumPlayers(p,a,b,c,d) (p)->EnumPlayers(a,b,c,d)
|
2101 |
#define IDirectPlay_EnumSessions(p,a,b,c,d,e) (p)->EnumSessions(a,b,c,d,e)
|
2102 |
#define IDirectPlay_GetCaps(p,a) (p)->GetCaps(a)
|
2103 |
#define IDirectPlay_GetMessageCount(p,a,b) (p)->GetMessageCount(a,b)
|
2104 |
#define IDirectPlay_GetPlayerCaps(p,a,b) (p)->GetPlayerCaps(a,b)
|
2105 |
#define IDirectPlay_GetPlayerName(p,a,b,c,d,e) (p)->GetPlayerName(a,b,c,d,e)
|
2106 |
#define IDirectPlay_Initialize(p,a) (p)->Initialize(a)
|
2107 |
#define IDirectPlay_Open(p,a) (p)->Open(a)
|
2108 |
#define IDirectPlay_Receive(p,a,b,c,d,e) (p)->Receive(a,b,c,d,e)
|
2109 |
#define IDirectPlay_SaveSession(p,a) (p)->SaveSession(a)
|
2110 |
#define IDirectPlay_Send(p,a,b,c,d,e) (p)->Send(a,b,c,d,e)
|
2111 |
#define IDirectPlay_SetPlayerName(p,a,b,c) (p)->SetPlayerName(a,b,c)
|
2112 |
|
2113 |
#endif
|
2114 |
|
2115 |
DEFINE_GUID(IID_IDirectPlay, 0x5454e9a0, 0xdb65, 0x11ce, 0x92, 0x1c, 0x00, 0xaa, 0x00, 0x6c, 0x49, 0x72);
|
2116 |
|
2117 |
#endif // IDIRECTPLAY2_OR_GREATER
|
2118 |
|
2119 |
/****************************************************************************
|
2120 |
*
|
2121 |
* IDirectPlay macros (included regardless of IDIRECTPLAY2_OR_GREATER flag)
|
2122 |
*
|
2123 |
****************************************************************************/
|
2124 |
|
2125 |
#if !defined(__cplusplus) || defined(CINTERFACE)
|
2126 |
|
2127 |
#define IDirectPlay_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
|
2128 |
#define IDirectPlay_AddRef(p) (p)->lpVtbl->AddRef(p)
|
2129 |
#define IDirectPlay_Release(p) (p)->lpVtbl->Release(p)
|
2130 |
|
2131 |
#else
|
2132 |
|
2133 |
#define IDirectPlay_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
|
2134 |
#define IDirectPlay_AddRef(p) (p)->AddRef()
|
2135 |
#define IDirectPlay_Release(p) (p)->Release()
|
2136 |
|
2137 |
#endif // IDirectPlay interface macros
|
2138 |
|
2139 |
#ifdef __cplusplus
|
2140 |
};
|
2141 |
#endif
|
2142 |
|
2143 |
#pragma warning(default:4201)
|
2144 |
|
2145 |
#endif
|
2146 |
|