/[cvs]/api/include/dplay8.h
ViewVC logotype

Contents of /api/include/dplay8.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1.1.1 - (show annotations) (vendor branch)
Sun Jul 1 20:47:59 2001 UTC (22 years, 10 months ago) by bearsoft
Branch: lazy, MAIN
CVS Tags: start, HEAD
Changes since 1.1: +0 -0 lines
File MIME type: text/plain
First import

1 /*==========================================================================;
2 *
3 * Copyright (C) 1998-2000 Microsoft Corporation. All Rights Reserved.
4 *
5 * File: DPlay8.h
6 * Content: DirectPlay8 include file
7 *
8 ***************************************************************************/
9
10 #ifndef __DIRECTPLAY8_H__
11 #define __DIRECTPLAY8_H__
12
13 #include <ole2.h> // for DECLARE_INTERFACE and HRESULT
14
15 #include "dpaddr.h"
16
17 #ifdef __cplusplus
18 extern "C" {
19 #endif
20
21
22 /****************************************************************************
23 *
24 * DirectPlay8 CLSIDs
25 *
26 ****************************************************************************/
27
28 // {743F1DC6-5ABA-429f-8BDF-C54D03253DC2}
29 DEFINE_GUID(CLSID_DirectPlay8Client,
30 0x743f1dc6, 0x5aba, 0x429f, 0x8b, 0xdf, 0xc5, 0x4d, 0x3, 0x25, 0x3d, 0xc2);
31
32 // {286F484D-375E-4458-A272-B138E2F80A6A}
33 DEFINE_GUID(CLSID_DirectPlay8Peer,
34 0x286f484d, 0x375e, 0x4458, 0xa2, 0x72, 0xb1, 0x38, 0xe2, 0xf8, 0xa, 0x6a);
35
36 // {DA825E1B-6830-43d7-835D-0B5AD82956A2}
37 DEFINE_GUID(CLSID_DirectPlay8Server,
38 0xda825e1b, 0x6830, 0x43d7, 0x83, 0x5d, 0xb, 0x5a, 0xd8, 0x29, 0x56, 0xa2);
39
40
41 /****************************************************************************
42 *
43 * DirectPlay8 Interface IIDs
44 *
45 ****************************************************************************/
46
47 // {5102DACD-241B-11d3-AEA7-006097B01411}
48 DEFINE_GUID(IID_IDirectPlay8Client,
49 0x5102dacd, 0x241b, 0x11d3, 0xae, 0xa7, 0x0, 0x60, 0x97, 0xb0, 0x14, 0x11);
50
51 // {5102DACF-241B-11d3-AEA7-006097B01411}
52 DEFINE_GUID(IID_IDirectPlay8Peer,
53 0x5102dacf, 0x241b, 0x11d3, 0xae, 0xa7, 0x0, 0x60, 0x97, 0xb0, 0x14, 0x11);
54
55 // {5102DACE-241B-11d3-AEA7-006097B01411}
56 DEFINE_GUID(IID_IDirectPlay8Server,
57 0x5102dace, 0x241b, 0x11d3, 0xae, 0xa7, 0x0, 0x60, 0x97, 0xb0, 0x14, 0x11);
58
59 /****************************************************************************
60 *
61 * DirectPlay8 Service Provider GUIDs
62 *
63 ****************************************************************************/
64
65 // {53934290-628D-11D2-AE0F-006097B01411}
66 DEFINE_GUID(CLSID_DP8SP_IPX, 0x53934290, 0x628d, 0x11d2, 0xae, 0xf, 0x0, 0x60, 0x97, 0xb0, 0x14, 0x11);
67
68 // {6D4A3650-628D-11D2-AE0F-006097B01411}
69 DEFINE_GUID(CLSID_DP8SP_MODEM, 0x6d4a3650, 0x628d, 0x11d2, 0xae, 0xf, 0x0, 0x60, 0x97, 0xb0, 0x14, 0x11);
70
71 // {743B5D60-628D-11D2-AE0F-006097B01411}
72 DEFINE_GUID(CLSID_DP8SP_SERIAL, 0x743b5d60, 0x628d, 0x11d2, 0xae, 0xf, 0x0, 0x60, 0x97, 0xb0, 0x14, 0x11);
73
74 // {EBFE7BA0-628D-11D2-AE0F-006097B01411}
75 DEFINE_GUID(CLSID_DP8SP_TCPIP, 0xebfe7ba0, 0x628d, 0x11d2, 0xae, 0xf, 0x0, 0x60, 0x97, 0xb0, 0x14, 0x11);
76
77 /****************************************************************************
78 *
79 * DirectPlay8 Interface Pointer definitions
80 *
81 ****************************************************************************/
82
83 typedef struct IDirectPlay8Peer *PDIRECTPLAY8PEER;
84 typedef struct IDirectPlay8Server *PDIRECTPLAY8SERVER;
85 typedef struct IDirectPlay8Client *PDIRECTPLAY8CLIENT;
86
87
88 /****************************************************************************
89 *
90 * DirectPlay8 Forward Declarations For External Types
91 *
92 ****************************************************************************/
93
94 typedef struct IDirectPlay8LobbiedApplication *PDNLOBBIEDAPPLICATION;
95 typedef struct IDirectPlay8Address IDirectPlay8Address;
96
97 /****************************************************************************
98 *
99 * DirectPlay8 Callback Functions
100 *
101 ****************************************************************************/
102
103 //
104 // Callback Function Type Definition
105 //
106 typedef HRESULT (WINAPI *PFNDPNMESSAGEHANDLER)(PVOID,DWORD,PVOID);
107
108 /****************************************************************************
109 *
110 * DirectPlay8 Datatypes (Non-Structure / Non-Message)
111 *
112 ****************************************************************************/
113
114 //
115 // Player IDs. Used to uniquely identify a player in a session
116 //
117 typedef DWORD DPNID, *PDPNID;
118
119 //
120 // Used as identifiers for operations
121 //
122 typedef DWORD DPNHANDLE, *PDPNHANDLE;
123
124 /****************************************************************************
125 *
126 * DirectPlay8 Message Identifiers
127 *
128 ****************************************************************************/
129
130 #define DPN_MSGID_OFFSET 0xFFFF0000
131 #define DPN_MSGID_ADD_PLAYER_TO_GROUP ( DPN_MSGID_OFFSET | 0x0001 )
132 #define DPN_MSGID_APPLICATION_DESC ( DPN_MSGID_OFFSET | 0x0002 )
133 #define DPN_MSGID_ASYNC_OP_COMPLETE ( DPN_MSGID_OFFSET | 0x0003 )
134 #define DPN_MSGID_CLIENT_INFO ( DPN_MSGID_OFFSET | 0x0004 )
135 #define DPN_MSGID_CONNECT_COMPLETE ( DPN_MSGID_OFFSET | 0x0005 )
136 #define DPN_MSGID_CREATE_GROUP ( DPN_MSGID_OFFSET | 0x0006 )
137 #define DPN_MSGID_CREATE_PLAYER ( DPN_MSGID_OFFSET | 0x0007 )
138 #define DPN_MSGID_DESTROY_GROUP ( DPN_MSGID_OFFSET | 0x0008 )
139 #define DPN_MSGID_DESTROY_PLAYER ( DPN_MSGID_OFFSET | 0x0009 )
140 #define DPN_MSGID_ENUM_HOSTS_QUERY ( DPN_MSGID_OFFSET | 0x000a )
141 #define DPN_MSGID_ENUM_HOSTS_RESPONSE ( DPN_MSGID_OFFSET | 0x000b )
142 #define DPN_MSGID_GROUP_INFO ( DPN_MSGID_OFFSET | 0x000c )
143 #define DPN_MSGID_HOST_MIGRATE ( DPN_MSGID_OFFSET | 0x000d )
144 #define DPN_MSGID_INDICATE_CONNECT ( DPN_MSGID_OFFSET | 0x000e )
145 #define DPN_MSGID_INDICATED_CONNECT_ABORTED ( DPN_MSGID_OFFSET | 0x000f )
146 #define DPN_MSGID_PEER_INFO ( DPN_MSGID_OFFSET | 0x0010 )
147 #define DPN_MSGID_RECEIVE ( DPN_MSGID_OFFSET | 0x0011 )
148 #define DPN_MSGID_REMOVE_PLAYER_FROM_GROUP ( DPN_MSGID_OFFSET | 0x0012 )
149 #define DPN_MSGID_RETURN_BUFFER ( DPN_MSGID_OFFSET | 0x0013 )
150 #define DPN_MSGID_SEND_COMPLETE ( DPN_MSGID_OFFSET | 0x0014 )
151 #define DPN_MSGID_SERVER_INFO ( DPN_MSGID_OFFSET | 0x0015 )
152 #define DPN_MSGID_TERMINATE_SESSION ( DPN_MSGID_OFFSET | 0x0016 )
153
154 /****************************************************************************
155 *
156 * DirectPlay8 Constants
157 *
158 ****************************************************************************/
159
160 #define DPNID_ALL_PLAYERS_GROUP 0
161
162 //
163 // DESTROY_GROUP reasons
164 //
165 #define DPNDESTROYGROUPREASON_NORMAL 0x0001
166 #define DPNDESTROYGROUPREASON_AUTODESTRUCTED 0x0002
167 #define DPNDESTROYGROUPREASON_SESSIONTERMINATED 0x0003
168
169 //
170 // DESTROY_PLAYER reasons
171 //
172 #define DPNDESTROYPLAYERREASON_NORMAL 0x0001
173 #define DPNDESTROYPLAYERREASON_CONNECTIONLOST 0x0002
174 #define DPNDESTROYPLAYERREASON_SESSIONTERMINATED 0x0003
175 #define DPNDESTROYPLAYERREASON_HOSTDESTROYEDPLAYER 0x0004
176
177 /****************************************************************************
178 *
179 * DirectPlay8 Flags
180 *
181 ****************************************************************************/
182
183 //
184 // Asynchronous operation flags (For Async Ops)
185 //
186 #define DPNOP_SYNC 0x80000000
187
188 //
189 // Add player to group flags (For AddPlayerToGroup)
190 //
191 #define DPNADDPLAYERTOGROUP_SYNC DPNOP_SYNC
192
193 //
194 // Cancel flags
195 //
196 #define DPNCANCEL_CONNECT 0x0001
197 #define DPNCANCEL_ENUM 0x0002
198 #define DPNCANCEL_SEND 0x0004
199 #define DPNCANCEL_ALL_OPERATIONS 0x8000
200
201 //
202 // Connect flags (For Connect)
203 //
204 #define DPNCONNECT_SYNC DPNOP_SYNC
205 #define DPNCONNECT_OKTOQUERYFORADDRESSING 0x0001
206
207 //
208 // Create group flags (For CreateGroup)
209 //
210 #define DPNCREATEGROUP_SYNC DPNOP_SYNC
211
212 //
213 // Destroy group flags (For DestroyGroup)
214 //
215 #define DPNDESTROYGROUP_SYNC DPNOP_SYNC
216
217 //
218 // Enumerate clients and groups flags (For EnumPlayersAndGroups)
219 //
220 #define DPNENUM_PLAYERS 0x0001
221 #define DPNENUM_GROUPS 0x0010
222
223 //
224 // Enum hosts flags (For EnumHosts)
225 //
226 #define DPNENUMHOSTS_SYNC DPNOP_SYNC
227 #define DPNENUMHOSTS_OKTOQUERYFORADDRESSING 0x0001
228 #define DPNENUMHOSTS_NOBROADCASTFALLBACK 0x0002
229
230 //
231 // Enum service provider flags (For EnumSP)
232 //
233 #define DPNENUMSERVICEPROVIDERS_ALL 0x0001
234
235 //
236 // Get send queue info flags (For GetSendQueueInfo)
237 //
238 #define DPNGETSENDQUEUEINFO_PRIORITY_NORMAL 0x0001
239 #define DPNGETSENDQUEUEINFO_PRIORITY_HIGH 0x0002
240 #define DPNGETSENDQUEUEINFO_PRIORITY_LOW 0x0004
241
242 //
243 // Group information flags (For Group Info)
244 //
245 #define DPNGROUP_AUTODESTRUCT 0x0001
246
247 //
248 // Host flags (For Host)
249 //
250 #define DPNHOST_OKTOQUERYFORADDRESSING 0x0001
251
252 //
253 // Set info
254 //
255 #define DPNINFO_NAME 0x0001
256 #define DPNINFO_DATA 0x0002
257
258 //
259 // Initialize flags (For Initialize)
260 //
261 #define DPNINITIALIZE_DISABLEPARAMVAL 0x0001
262
263 //
264 // Register Lobby flags
265 //
266 #define DPNLOBBY_REGISTER 0x0001
267 #define DPNLOBBY_UNREGISTER 0x0002
268
269 //
270 // Player information flags (For Player Info / Player Messages)
271 //
272 #define DPNPLAYER_LOCAL 0x0002
273 #define DPNPLAYER_HOST 0x0004
274
275 //
276 // Remove player from group flags (For RemovePlayerFromGroup)
277 //
278 #define DPNREMOVEPLAYERFROMGROUP_SYNC DPNOP_SYNC
279
280 //
281 // Send flags (For Send/SendTo)
282 //
283 #define DPNSEND_SYNC DPNOP_SYNC
284 #define DPNSEND_NOCOPY 0x0001
285 #define DPNSEND_NOCOMPLETE 0x0002
286 #define DPNSEND_COMPLETEONPROCESS 0x0004
287 #define DPNSEND_GUARANTEED 0x0008
288 #define DPNSEND_NONSEQUENTIAL 0x0010
289 #define DPNSEND_NOLOOPBACK 0x0020
290 #define DPNSEND_PRIORITY_LOW 0x0040
291 #define DPNSEND_PRIORITY_HIGH 0x0080
292
293 //
294 // Session Flags (for DPN_APPLICATION_DESC)
295 //
296 #define DPNSESSION_CLIENT_SERVER 0x0001
297 #define DPNSESSION_MIGRATE_HOST 0x0004
298 #define DPNSESSION_NODPNSVR 0x0040
299 #define DPNSESSION_REQUIREPASSWORD 0x0080
300
301 //
302 // Set client info flags (For SetClientInfo)
303 //
304 #define DPNSETCLIENTINFO_SYNC DPNOP_SYNC
305
306 //
307 // Set group info flags (For SetGroupInfo)
308 //
309 #define DPNSETGROUPINFO_SYNC DPNOP_SYNC
310
311 //
312 // Set peer info flags (For SetPeerInfo)
313 //
314 #define DPNSETPEERINFO_SYNC DPNOP_SYNC
315
316 //
317 // Set server info flags (For SetServerInfo)
318 //
319 #define DPNSETSERVERINFO_SYNC DPNOP_SYNC
320
321 //
322 // SP capabilities flags
323 //
324 #define DPNSPCAPS_SUPPORTSDPNSRV 0x0001
325 #define DPNSPCAPS_SUPPORTSBROADCAST 0x0002
326 #define DPNSPCAPS_SUPPORTSALLADAPTERS 0x0004
327
328 /****************************************************************************
329 *
330 * DirectPlay8 Structures (Non-Message)
331 *
332 ****************************************************************************/
333
334 //
335 // Application description
336 //
337 typedef struct _DPN_APPLICATION_DESC
338 {
339 DWORD dwSize; // Size of this structure
340 DWORD dwFlags; // Flags (DPNSESSION_...)
341 GUID guidInstance; // Instance GUID
342 GUID guidApplication; // Application GUID
343 DWORD dwMaxPlayers; // Maximum # of players allowed (0=no limit)
344 DWORD dwCurrentPlayers; // Current # of players allowed
345 WCHAR *pwszSessionName; // Name of the session
346 WCHAR *pwszPassword; // Password for the session
347 PVOID pvReservedData;
348 DWORD dwReservedDataSize;
349 PVOID pvApplicationReservedData;
350 DWORD dwApplicationReservedDataSize;
351 } DPN_APPLICATION_DESC, *PDPN_APPLICATION_DESC;
352
353 //
354 // Generic Buffer Description
355 //
356 typedef struct _BUFFERDESC
357 {
358 DWORD dwBufferSize;
359 BYTE * UNALIGNED pBufferData;
360 } BUFFERDESC, DPN_BUFFER_DESC, *PDPN_BUFFER_DESC;
361
362 typedef BUFFERDESC FAR * PBUFFERDESC;
363
364 //
365 // DirectPlay8 capabilities
366 //
367 typedef struct _DPN_CAPS
368 {
369 DWORD dwSize; // Size of this structure
370 DWORD dwFlags; // Flags
371 DWORD dwConnectTimeout; // ms before a connect request times out
372 DWORD dwConnectRetries; // # of times to attempt the connection
373 DWORD dwTimeoutUntilKeepAlive; // ms of inactivity before a keep alive is sent
374 } DPN_CAPS, *PDPN_CAPS;
375
376 // Connection Statistics information
377
378 typedef struct _DPN_CONNECTION_INFO
379 {
380 DWORD dwSize;
381 DWORD dwRoundTripLatencyMS;
382 DWORD dwThroughputBPS;
383 DWORD dwPeakThroughputBPS;
384
385 DWORD dwBytesSentGuaranteed;
386 DWORD dwPacketsSentGuaranteed;
387 DWORD dwBytesSentNonGuaranteed;
388 DWORD dwPacketsSentNonGuaranteed;
389
390 DWORD dwBytesRetried; // Guaranteed only
391 DWORD dwPacketsRetried; // Guaranteed only
392 DWORD dwBytesDropped; // Non Guaranteed only
393 DWORD dwPacketsDropped; // Non Guaranteed only
394
395 DWORD dwMessagesTransmittedHighPriority;
396 DWORD dwMessagesTimedOutHighPriority;
397 DWORD dwMessagesTransmittedNormalPriority;
398 DWORD dwMessagesTimedOutNormalPriority;
399 DWORD dwMessagesTransmittedLowPriority;
400 DWORD dwMessagesTimedOutLowPriority;
401
402 DWORD dwBytesReceivedGuaranteed;
403 DWORD dwPacketsReceivedGuaranteed;
404 DWORD dwBytesReceivedNonGuaranteed;
405 DWORD dwPacketsReceivedNonGuaranteed;
406 DWORD dwMessagesReceived;
407
408 } DPN_CONNECTION_INFO, *PDPN_CONNECTION_INFO;
409
410 //
411 // Group information strucutre
412 //
413 typedef struct _DPN_GROUP_INFO
414 {
415 DWORD dwSize; // size of this structure
416 DWORD dwInfoFlags; // information contained
417 PWSTR pwszName; // Unicode Name
418 PVOID pvData; // data block
419 DWORD dwDataSize; // size in BYTES of data block
420 DWORD dwGroupFlags; // group flags (DPNGROUP_...)
421 } DPN_GROUP_INFO, *PDPN_GROUP_INFO;
422
423 //
424 // Player information structure
425 //
426 typedef struct _DPN_PLAYER_INFO
427 {
428 DWORD dwSize; // size of this structure
429 DWORD dwInfoFlags; // information contained
430 PWSTR pwszName; // Unicode Name
431 PVOID pvData; // data block
432 DWORD dwDataSize; // size in BYTES of data block
433 DWORD dwPlayerFlags; // player flags (DPNPLAYER_...)
434 } DPN_PLAYER_INFO, *PDPN_PLAYER_INFO;
435
436 typedef struct _DPN_SECURITY_CREDENTIALS DPN_SECURITY_CREDENTIALS, *PDPN_SECURITY_CREDENTIALS;
437 typedef struct _DPN_SECURITY_DESC DPN_SECURITY_DESC, *PDPN_SECURITY_DESC;
438
439 //
440 // Service provider & adapter enumeration structure
441 //
442 typedef struct _DPN_SERVICE_PROVIDER_INFO
443 {
444 DWORD dwFlags;
445 GUID guid; // SP Guid
446 WCHAR *pwszName; // Friendly Name
447 PVOID pvReserved;
448 DWORD dwReserved;
449 } DPN_SERVICE_PROVIDER_INFO, *PDPN_SERVICE_PROVIDER_INFO;
450
451 //
452 // Service provider caps structure
453 //
454 typedef struct _DPN_SP_CAPS
455 {
456 DWORD dwSize; // Size of this structure
457 DWORD dwFlags; // Flags ((DPNSPCAPS_...)
458 DWORD dwNumThreads; // # of worker threads to use
459 DWORD dwDefaultEnumCount; // default # of enum requests
460 DWORD dwDefaultEnumRetryInterval; // default ms between enum requests
461 DWORD dwDefaultEnumTimeout; // default enum timeout
462 DWORD dwMaxEnumPayloadSize; // maximum size in bytes for enum payload data
463 DWORD dwBuffersPerThread; // number of receive buffers per thread
464 DWORD dwSystemBufferSize; // amount of buffering to do in addition to posted receive buffers
465 } DPN_SP_CAPS, *PDPN_SP_CAPS;
466
467
468 /****************************************************************************
469 *
470 * IDirectPlay8 message handler call back structures
471 *
472 ****************************************************************************/
473
474 //
475 // Add player to group strucutre for message handler
476 // (DPN_MSGID_ADD_PLAYER_TO_GROUP)
477 //
478 typedef struct _DPNMSG_ADD_PLAYER_TO_GROUP
479 {
480 DWORD dwSize; // Size of this structure
481 DPNID dpnidGroup; // DPNID of group
482 PVOID pvGroupContext; // Group context value
483 DPNID dpnidPlayer; // DPNID of added player
484 PVOID pvPlayerContext; // Player context value
485 } DPNMSG_ADD_PLAYER_TO_GROUP, *PDPNMSG_ADD_PLAYER_TO_GROUP;
486
487 //
488 // Async operation completion structure for message handler
489 // (DPN_MSGID_ASYNC_OP_COMPLETE)
490 //
491 typedef struct _DPNMSG_ASYNC_OP_COMPLETE
492 {
493 DWORD dwSize; // Size of this structure
494 DPNHANDLE hAsyncOp; // DirectPlay8 async operation handle
495 PVOID pvUserContext; // User context supplied
496 HRESULT hResultCode; // HRESULT of operation
497 } DPNMSG_ASYNC_OP_COMPLETE, *PDPNMSG_ASYNC_OP_COMPLETE;
498
499 //
500 // Client info structure for message handler
501 // (DPN_MSGID_CLIENT_INFO)
502 //
503 typedef struct _DPNMSG_CLIENT_INFO
504 {
505 DWORD dwSize; // Size of this structure
506 DPNID dpnidClient; // DPNID of client
507 PVOID pvPlayerContext; // Player context value
508 } DPNMSG_CLIENT_INFO, *PDPNMSG_CLIENT_INFO;
509
510 //
511 // Connect complete structure for message handler
512 // (DPN_MSGID_CONNECT_COMPLETE)
513 //
514 typedef struct _DPNMSG_CONNECT_COMPLETE
515 {
516 DWORD dwSize; // Size of this structure
517 DPNHANDLE hAsyncOp; // DirectPlay8 Async operation handle
518 PVOID pvUserContext; // User context supplied at Connect
519 HRESULT hResultCode; // HRESULT of connection attempt
520 PVOID pvApplicationReplyData; // Connection reply data from Host/Server
521 DWORD dwApplicationReplyDataSize; // Size (in bytes) of pvApplicationReplyData
522 } DPNMSG_CONNECT_COMPLETE, *PDPNMSG_CONNECT_COMPLETE;
523
524 //
525 // Create group structure for message handler
526 // (DPN_MSGID_CREATE_GROUP)
527 //
528 typedef struct _DPNMSG_CREATE_GROUP
529 {
530 DWORD dwSize; // Size of this structure
531 DPNID dpnidGroup; // DPNID of new group
532 DPNID dpnidOwner; // Owner of newgroup
533 PVOID pvGroupContext; // Group context value
534 } DPNMSG_CREATE_GROUP, *PDPNMSG_CREATE_GROUP;
535
536 //
537 // Create player structure for message handler
538 // (DPN_MSGID_CREATE_PLAYER)
539 //
540 typedef struct _DPNMSG_CREATE_PLAYER
541 {
542 DWORD dwSize; // Size of this structure
543 DPNID dpnidPlayer; // DPNID of new player
544 PVOID pvPlayerContext; // Player context value
545 } DPNMSG_CREATE_PLAYER, *PDPNMSG_CREATE_PLAYER;
546
547 //
548 // Destroy group structure for message handler
549 // (DPN_MSGID_DESTROY_GROUP)
550 //
551 typedef struct _DPNMSG_DESTROY_GROUP
552 {
553 DWORD dwSize; // Size of this structure
554 DPNID dpnidGroup; // DPNID of destroyed group
555 PVOID pvGroupContext; // Group context value
556 DWORD dwReason; // Information only
557 } DPNMSG_DESTROY_GROUP, *PDPNMSG_DESTROY_GROUP;
558
559 //
560 // Destroy player structure for message handler
561 // (DPN_MSGID_DESTROY_PLAYER)
562 //
563 typedef struct _DPNMSG_DESTROY_PLAYER
564 {
565 DWORD dwSize; // Size of this structure
566 DPNID dpnidPlayer; // DPNID of leaving player
567 PVOID pvPlayerContext; // Player context value
568 DWORD dwReason; // Information only
569 } DPNMSG_DESTROY_PLAYER, *PDPNMSG_DESTROY_PLAYER;
570
571 //
572 // Enumeration request received structure for message handler
573 // (DPN_MSGID_ENUM_HOSTS_QUERY)
574 //
575 typedef struct _DPNMSG_ENUM_HOSTS_QUERY
576 {
577 DWORD dwSize; // Size of this structure.
578 IDirectPlay8Address *pAddressSender; // Address of client who sent the request
579 IDirectPlay8Address *pAddressDevice; // Address of device request was received on
580 PVOID pvReceivedData; // Request data (set on client)
581 DWORD dwReceivedDataSize; // Request data size (set on client)
582 DWORD dwMaxResponseDataSize; // Max allowable size of enum response
583 PVOID pvResponseData; // Optional query repsonse (user set)
584 DWORD dwResponseDataSize; // Optional query response size (user set)
585 PVOID pvResponseContext; // Optional query response context (user set)
586 } DPNMSG_ENUM_HOSTS_QUERY, *PDPNMSG_ENUM_HOSTS_QUERY;
587
588 //
589 // Enumeration response received structure for message handler
590 // (DPN_MSGID_ENUM_HOSTS_RESPONSE)
591 //
592 typedef struct _DPNMSG_ENUM_HOSTS_RESPONSE
593 {
594 DWORD dwSize; // Size of this structure
595 IDirectPlay8Address *pAddressSender; // Address of host who responded
596 IDirectPlay8Address *pAddressDevice; // Device response was received on
597 const DPN_APPLICATION_DESC *pApplicationDescription; // Application description for the session
598 PVOID pvResponseData; // Optional response data (set on host)
599 DWORD dwResponseDataSize; // Optional response data size (set on host)
600 PVOID pvUserContext; // Context value supplied for enumeration
601 DWORD dwRoundTripLatencyMS; // Round trip latency in MS
602 } DPNMSG_ENUM_HOSTS_RESPONSE, *PDPNMSG_ENUM_HOSTS_RESPONSE;
603
604 //
605 // Group info structure for message handler
606 // (DPN_MSGID_GROUP_INFO)
607 //
608 typedef struct _DPNMSG_GROUP_INFO
609 {
610 DWORD dwSize; // Size of this structure
611 DPNID dpnidGroup; // DPNID of group
612 PVOID pvGroupContext; // Group context value
613 } DPNMSG_GROUP_INFO, *PDPNMSG_GROUP_INFO;
614
615 //
616 // Migrate host structure for message handler
617 // (DPN_MSGID_HOST_MIGRATE)
618 //
619 typedef struct _DPNMSG_HOST_MIGRATE
620 {
621 DWORD dwSize; // Size of this structure
622 DPNID dpnidNewHost; // DPNID of new Host player
623 PVOID pvPlayerContext; // Player context value
624 } DPNMSG_HOST_MIGRATE, *PDPNMSG_HOST_MIGRATE;
625
626 //
627 // Indicate connect structure for message handler
628 // (DPN_MSGID_INDICATE_CONNECT)
629 //
630 typedef struct _DPNMSG_INDICATE_CONNECT
631 {
632 DWORD dwSize; // Size of this structure
633 PVOID pvUserConnectData; // Connecting player data
634 DWORD dwUserConnectDataSize; // Size (in bytes) of pvUserConnectData
635 PVOID pvReplyData; // Connection reply data
636 DWORD dwReplyDataSize; // Size (in bytes) of pvReplyData
637 PVOID pvReplyContext; // Buffer context for pvReplyData
638 PVOID pvPlayerContext; // Player context preset
639 IDirectPlay8Address *pAddressPlayer;// Address of connecting player
640 IDirectPlay8Address *pAddressDevice;// Address of device receiving connect attempt
641 } DPNMSG_INDICATE_CONNECT, *PDPNMSG_INDICATE_CONNECT;
642
643 //
644 // Indicated connect aborted structure for message handler
645 // (DPN_MSGID_INDICATED_CONNECT_ABORTED)
646 //
647 typedef struct _DPNMSG_INDICATED_CONNECT_ABORTED
648 {
649 DWORD dwSize; // Size of this structure
650 PVOID pvPlayerContext; // Player context preset from DPNMSG_INDICATE_CONNECT
651 } DPNMSG_INDICATED_CONNECT_ABORTED, *PDPNMSG_INDICATED_CONNECT_ABORTED;
652
653 //
654 // Peer info structure for message handler
655 // (DPN_MSGID_PEER_INFO)
656 //
657 typedef struct _DPNMSG_PEER_INFO
658 {
659 DWORD dwSize; // Size of this structure
660 DPNID dpnidPeer; // DPNID of peer
661 PVOID pvPlayerContext; // Player context value
662 } DPNMSG_PEER_INFO, *PDPNMSG_PEER_INFO;
663
664 //
665 // Receive structure for message handler
666 // (DPN_MSGID_RECEIVE)
667 //
668 typedef struct _DPNMSG_RECEIVE
669 {
670 DWORD dwSize; // Size of this structure
671 DPNID dpnidSender; // DPNID of sending player
672 PVOID pvPlayerContext; // Player context value of sending player
673 PBYTE pReceiveData; // Received data
674 DWORD dwReceiveDataSize; // Size (in bytes) of pReceiveData
675 DPNHANDLE hBufferHandle; // Buffer handle for pReceiveData
676 } DPNMSG_RECEIVE, *PDPNMSG_RECEIVE;
677
678 //
679 // Remove player from group structure for message handler
680 // (DPN_MSGID_REMOVE_PLAYER_FROM_GROUP)
681 //
682 typedef struct _DPNMSG_REMOVE_PLAYER_FROM_GROUP
683 {
684 DWORD dwSize; // Size of this structure
685 DPNID dpnidGroup; // DPNID of group
686 PVOID pvGroupContext; // Group context value
687 DPNID dpnidPlayer; // DPNID of deleted player
688 PVOID pvPlayerContext; // Player context value
689 } DPNMSG_REMOVE_PLAYER_FROM_GROUP, *PDPNMSG_REMOVE_PLAYER_FROM_GROUP;
690
691 //
692 // Returned buffer structure for message handler
693 // (DPN_MSGID_RETURN_BUFFER)
694 //
695 typedef struct _DPNMSG_RETURN_BUFFER
696 {
697 DWORD dwSize; // Size of this structure
698 HRESULT hResultCode; // Return value of operation
699 PVOID pvBuffer; // Buffer being returned
700 PVOID pvUserContext; // Context associated with buffer
701 } DPNMSG_RETURN_BUFFER, *PDPNMSG_RETURN_BUFFER;
702
703 //
704 // Send complete structure for message handler
705 // (DPN_MSGID_SEND_COMPLETE)
706 //
707 typedef struct _DPNMSG_SEND_COMPLETE
708 {
709 DWORD dwSize; // Size of this structure
710 DPNHANDLE hAsyncOp; // DirectPlay8 Async operation handle
711 PVOID pvUserContext; // User context supplied at Send/SendTo
712 HRESULT hResultCode; // HRESULT of send
713 DWORD dwSendTime; // Send time in ms
714 } DPNMSG_SEND_COMPLETE, *PDPNMSG_SEND_COMPLETE;
715
716 //
717 // Server info structure for message handler
718 // (DPN_MSGID_SERVER_INFO)
719 //
720 typedef struct _DPNMSG_SERVER_INFO
721 {
722 DWORD dwSize; // Size of this structure
723 DPNID dpnidServer; // DPNID of server
724 PVOID pvPlayerContext; // Player context value
725 } DPNMSG_SERVER_INFO, *PDPNMSG_SERVER_INFO;
726
727 //
728 // Terminated session structure for message handler
729 // (DPN_MSGID_TERMINATE_SESSION)
730 //
731 typedef struct _DPNMSG_TERMINATE_SESSION
732 {
733 DWORD dwSize; // Size of this structure
734 HRESULT hResultCode; // Reason
735 PVOID pvTerminateData; // Data passed from Host/Server
736 DWORD dwTerminateDataSize;// Size (in bytes) of pvTerminateData
737 } DPNMSG_TERMINATE_SESSION, *PDPNMSG_TERMINATE_SESSION;
738
739
740 /****************************************************************************
741 *
742 * DirectPlay8 Functions
743 *
744 ****************************************************************************/
745
746 extern HRESULT WINAPI DirectPlay8Create( const GUID * pcIID, void **ppvInterface, IUnknown *pUnknown);
747
748 /****************************************************************************
749 *
750 * DirectPlay8 Application Interfaces
751 *
752 ****************************************************************************/
753
754 //
755 // COM definition for DirectPlay8 Client interface
756 //
757 #undef INTERFACE // External COM Implementation
758 #define INTERFACE IDirectPlay8Client
759 DECLARE_INTERFACE_(IDirectPlay8Client,IUnknown)
760 {
761 /*** IUnknown methods ***/
762 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID *ppvObj) PURE;
763 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
764 STDMETHOD_(ULONG,Release) (THIS) PURE;
765 /*** IDirectPlay8Client methods ***/
766 STDMETHOD(Initialize) (THIS_ PVOID const pvUserContext, const PFNDPNMESSAGEHANDLER pfn, const DWORD dwFlags) PURE;
767 STDMETHOD(EnumServiceProviders) (THIS_ const GUID *const pguidServiceProvider, const GUID *const pguidApplication, DPN_SERVICE_PROVIDER_INFO *const pSPInfoBuffer, PDWORD const pcbEnumData, PDWORD const pcReturned, const DWORD dwFlags) PURE;
768 STDMETHOD(EnumHosts) (THIS_ PDPN_APPLICATION_DESC const pApplicationDesc,IDirectPlay8Address *const pAddrHost,IDirectPlay8Address *const pDeviceInfo,PVOID const pUserEnumData,const DWORD dwUserEnumDataSize,const DWORD dwEnumCount,const DWORD dwRetryInterval,const DWORD dwTimeOut,PVOID const pvUserContext,DPNHANDLE *const pAsyncHandle,const DWORD dwFlags) PURE;
769 STDMETHOD(CancelAsyncOperation) (THIS_ const DPNHANDLE hAsyncHandle, const DWORD dwFlags) PURE;
770 STDMETHOD(Connect) (THIS_ const DPN_APPLICATION_DESC *const pdnAppDesc,IDirectPlay8Address *const pHostAddr,IDirectPlay8Address *const pDeviceInfo,const DPN_SECURITY_DESC *const pdnSecurity,const DPN_SECURITY_CREDENTIALS *const pdnCredentials,const void *const pvUserConnectData,const DWORD dwUserConnectDataSize,void *const pvAsyncContext,DPNHANDLE *const phAsyncHandle,const DWORD dwFlags) PURE;
771 STDMETHOD(Send) (THIS_ const DPN_BUFFER_DESC *const prgBufferDesc,const DWORD cBufferDesc,const DWORD dwTimeOut,void *const pvAsyncContext,DPNHANDLE *const phAsyncHandle,const DWORD dwFlags) PURE;
772 STDMETHOD(GetSendQueueInfo) (THIS_ DWORD *const pdwNumMsgs, DWORD *const pdwNumBytes, const DWORD dwFlags) PURE;
773 STDMETHOD(GetApplicationDesc) (THIS_ DPN_APPLICATION_DESC *const pAppDescBuffer, DWORD *const pcbDataSize, const DWORD dwFlags) PURE;
774 STDMETHOD(SetClientInfo) (THIS_ const DPN_PLAYER_INFO *const pdpnPlayerInfo,PVOID const pvAsyncContext,DPNHANDLE *const phAsyncHandle, const DWORD dwFlags) PURE;
775 STDMETHOD(GetServerInfo) (THIS_ DPN_PLAYER_INFO *const pdpnPlayerInfo,DWORD *const pdwSize,const DWORD dwFlags) PURE;
776 STDMETHOD(GetServerAddress) (THIS_ IDirectPlay8Address **const pAddress,const DWORD dwFlags) PURE;
777 STDMETHOD(Close) (THIS_ const DWORD dwFlags) PURE;
778 STDMETHOD(ReturnBuffer) (THIS_ const DPNHANDLE hBufferHandle,const DWORD dwFlags) PURE;
779 STDMETHOD(GetCaps) (THIS_ DPN_CAPS *const pdpCaps,const DWORD dwFlags) PURE;
780 STDMETHOD(SetCaps) (THIS_ const DPN_CAPS *const pdpCaps, const DWORD dwFlags) PURE;
781 STDMETHOD(SetSPCaps) (THIS_ const GUID * const pguidSP, const DPN_SP_CAPS *const pdpspCaps, const DWORD dwFlags ) PURE;
782 STDMETHOD(GetSPCaps) (THIS_ const GUID * const pguidSP,DPN_SP_CAPS *const pdpspCaps,const DWORD dwFlags) PURE;
783 STDMETHOD(GetConnectionInfo) (THIS_ DPN_CONNECTION_INFO *const pdpConnectionInfo,const DWORD dwFlags) PURE;
784 STDMETHOD(RegisterLobby) (THIS_ const DPNHANDLE dpnHandle, IDirectPlay8LobbiedApplication *const pIDP8LobbiedApplication,const DWORD dwFlags) PURE;
785 };
786
787 //
788 // COM definition for DirectPlay8 Server interface
789 //
790 #undef INTERFACE // External COM Implementation
791 #define INTERFACE IDirectPlay8Server
792 DECLARE_INTERFACE_(IDirectPlay8Server,IUnknown)
793 {
794 /*** IUnknown methods ***/
795 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID *ppvObj) PURE;
796 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
797 STDMETHOD_(ULONG,Release) (THIS) PURE;
798 /*** IDirectPlay8Server methods ***/
799 STDMETHOD(Initialize) (THIS_ PVOID const pvUserContext, const PFNDPNMESSAGEHANDLER pfn, const DWORD dwFlags) PURE;
800 STDMETHOD(EnumServiceProviders) (THIS_ const GUID *const pguidServiceProvider,const GUID *const pguidApplication,DPN_SERVICE_PROVIDER_INFO *const pSPInfoBuffer,PDWORD const pcbEnumData,PDWORD const pcReturned,const DWORD dwFlags) PURE;
801 STDMETHOD(CancelAsyncOperation) (THIS_ const DPNHANDLE hAsyncHandle,const DWORD dwFlags) PURE;
802 STDMETHOD(GetSendQueueInfo) (THIS_ const DPNID dpnid,DWORD *const pdwNumMsgs, DWORD *const pdwNumBytes, const DWORD dwFlags) PURE;
803 STDMETHOD(GetApplicationDesc) (THIS_ DPN_APPLICATION_DESC *const pAppDescBuffer, DWORD *const pcbDataSize, const DWORD dwFlags) PURE;
804 STDMETHOD(SetServerInfo) (THIS_ const DPN_PLAYER_INFO *const pdpnPlayerInfo,PVOID const pvAsyncContext, DPNHANDLE *const phAsyncHandle, const DWORD dwFlags) PURE;
805 STDMETHOD(GetClientInfo) (THIS_ const DPNID dpnid,DPN_PLAYER_INFO *const pdpnPlayerInfo,DWORD *const pdwSize,const DWORD dwFlags) PURE;
806 STDMETHOD(GetClientAddress) (THIS_ const DPNID dpnid,IDirectPlay8Address **const pAddress,const DWORD dwFlags) PURE;
807 STDMETHOD(GetLocalHostAddresses) (THIS_ IDirectPlay8Address **const prgpAddress,DWORD *const pcAddress,const DWORD dwFlags) PURE;
808 STDMETHOD(SetApplicationDesc) (THIS_ const DPN_APPLICATION_DESC *const pad, const DWORD dwFlags) PURE;
809 STDMETHOD(Host) (THIS_ const DPN_APPLICATION_DESC *const pdnAppDesc,IDirectPlay8Address **const prgpDeviceInfo,const DWORD cDeviceInfo,const DPN_SECURITY_DESC *const pdnSecurity,const DPN_SECURITY_CREDENTIALS *const pdnCredentials,void *const pvPlayerContext,const DWORD dwFlags) PURE;
810 STDMETHOD(SendTo) (THIS_ const DPNID dpnid,const DPN_BUFFER_DESC *const prgBufferDesc,const DWORD cBufferDesc,const DWORD dwTimeOut,void *const pvAsyncContext,DPNHANDLE *const phAsyncHandle,const DWORD dwFlags) PURE;
811 STDMETHOD(CreateGroup) (THIS_ const DPN_GROUP_INFO *const pdpnGroupInfo,void *const pvGroupContext,void *const pvAsyncContext,DPNHANDLE *const phAsyncHandle,const DWORD dwFlags) PURE;
812 STDMETHOD(DestroyGroup) (THIS_ const DPNID idGroup, PVOID const pvAsyncContext, DPNHANDLE *const phAsyncHandle, const DWORD dwFlags) PURE;
813 STDMETHOD(AddPlayerToGroup) (THIS_ const DPNID idGroup, const DPNID idClient, PVOID const pvAsyncContext, DPNHANDLE *const phAsyncHandle, const DWORD dwFlags) PURE;
814 STDMETHOD(RemovePlayerFromGroup) (THIS_ const DPNID idGroup, const DPNID idClient, PVOID const pvAsyncContext, DPNHANDLE *const phAsyncHandle, const DWORD dwFlags) PURE;
815 STDMETHOD(SetGroupInfo) (THIS_ const DPNID dpnid,DPN_GROUP_INFO *const pdpnGroupInfo,PVOID const pvAsyncContext,DPNHANDLE *const phAsyncHandle, const DWORD dwFlags) PURE;
816 STDMETHOD(GetGroupInfo) (THIS_ const DPNID dpnid,DPN_GROUP_INFO *const pdpnGroupInfo,DWORD *const pdwSize,const DWORD dwFlags) PURE;
817 STDMETHOD(EnumPlayersAndGroups) (THIS_ DPNID *const prgdpnid, DWORD *const pcdpnid, const DWORD dwFlags) PURE;
818 STDMETHOD(EnumGroupMembers) (THIS_ const DPNID dpnid, DPNID *const prgdpnid, DWORD *const pcdpnid, const DWORD dwFlags) PURE;
819 STDMETHOD(Close) (THIS_ const DWORD dwFlags) PURE;
820 STDMETHOD(DestroyClient) (THIS_ const DPNID dpnidClient, const void *const pvDestroyData, const DWORD dwDestroyDataSize, const DWORD dwFlags) PURE;
821 STDMETHOD(ReturnBuffer) (THIS_ const DPNHANDLE hBufferHandle,const DWORD dwFlags) PURE;
822 STDMETHOD(GetPlayerContext) (THIS_ const DPNID dpnid,PVOID *const ppvPlayerContext,const DWORD dwFlags) PURE;
823 STDMETHOD(GetGroupContext) (THIS_ const DPNID dpnid,PVOID *const ppvGroupContext,const DWORD dwFlags) PURE;
824 STDMETHOD(GetCaps) (THIS_ DPN_CAPS *const pdpCaps,const DWORD dwFlags) PURE;
825 STDMETHOD(SetCaps) (THIS_ const DPN_CAPS *const pdpCaps, const DWORD dwFlags) PURE;
826 STDMETHOD(SetSPCaps) (THIS_ const GUID * const pguidSP, const DPN_SP_CAPS *const pdpspCaps, const DWORD dwFlags ) PURE;
827 STDMETHOD(GetSPCaps) (THIS_ const GUID * const pguidSP, DPN_SP_CAPS *const pdpspCaps,const DWORD dwFlags) PURE;
828 STDMETHOD(GetConnectionInfo) (THIS_ const DPNID dpnid, DPN_CONNECTION_INFO *const pdpConnectionInfo,const DWORD dwFlags) PURE;
829 STDMETHOD(RegisterLobby) (THIS_ const DPNHANDLE dpnHandle, IDirectPlay8LobbiedApplication *const pIDP8LobbiedApplication,const DWORD dwFlags) PURE;
830 };
831
832 //
833 // COM definition for DirectPlay8 Peer interface
834 //
835 #undef INTERFACE // External COM Implementation
836 #define INTERFACE IDirectPlay8Peer
837 DECLARE_INTERFACE_(IDirectPlay8Peer,IUnknown)
838 {
839 /*** IUnknown methods ***/
840 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID *ppvObj) PURE;
841 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
842 STDMETHOD_(ULONG,Release) (THIS) PURE;
843 /*** IDirectPlay8Peer methods ***/
844 STDMETHOD(Initialize) (THIS_ PVOID const pvUserContext, const PFNDPNMESSAGEHANDLER pfn, const DWORD dwFlags) PURE;
845 STDMETHOD(EnumServiceProviders) (THIS_ const GUID *const pguidServiceProvider, const GUID *const pguidApplication, DPN_SERVICE_PROVIDER_INFO *const pSPInfoBuffer, DWORD *const pcbEnumData, DWORD *const pcReturned, const DWORD dwFlags) PURE;
846 STDMETHOD(CancelAsyncOperation) (THIS_ const DPNHANDLE hAsyncHandle, const DWORD dwFlags) PURE;
847 STDMETHOD(Connect) (THIS_ const DPN_APPLICATION_DESC *const pdnAppDesc,IDirectPlay8Address *const pHostAddr,IDirectPlay8Address *const pDeviceInfo,const DPN_SECURITY_DESC *const pdnSecurity,const DPN_SECURITY_CREDENTIALS *const pdnCredentials,const void *const pvUserConnectData,const DWORD dwUserConnectDataSize,void *const pvPlayerContext,void *const pvAsyncContext,DPNHANDLE *const phAsyncHandle,const DWORD dwFlags) PURE;
848 STDMETHOD(SendTo) (THIS_ const DPNID dpnid,const DPN_BUFFER_DESC *const prgBufferDesc,const DWORD cBufferDesc,const DWORD dwTimeOut,void *const pvAsyncContext,DPNHANDLE *const phAsyncHandle,const DWORD dwFlags) PURE;
849 STDMETHOD(GetSendQueueInfo) (THIS_ const DPNID dpnid, DWORD *const pdwNumMsgs, DWORD *const pdwNumBytes, const DWORD dwFlags) PURE;
850 STDMETHOD(Host) (THIS_ const DPN_APPLICATION_DESC *const pdnAppDesc,IDirectPlay8Address **const prgpDeviceInfo,const DWORD cDeviceInfo,const DPN_SECURITY_DESC *const pdnSecurity,const DPN_SECURITY_CREDENTIALS *const pdnCredentials,void *const pvPlayerContext,const DWORD dwFlags) PURE;
851 STDMETHOD(GetApplicationDesc) (THIS_ DPN_APPLICATION_DESC *const pAppDescBuffer, DWORD *const pcbDataSize, const DWORD dwFlags) PURE;
852 STDMETHOD(SetApplicationDesc) (THIS_ const DPN_APPLICATION_DESC *const pad, const DWORD dwFlags) PURE;
853 STDMETHOD(CreateGroup) (THIS_ const DPN_GROUP_INFO *const pdpnGroupInfo,void *const pvGroupContext,void *const pvAsyncContext,DPNHANDLE *const phAsyncHandle,const DWORD dwFlags) PURE;
854 STDMETHOD(DestroyGroup) (THIS_ const DPNID idGroup, PVOID const pvAsyncContext, DPNHANDLE *const phAsyncHandle, const DWORD dwFlags) PURE;
855 STDMETHOD(AddPlayerToGroup) (THIS_ const DPNID idGroup, const DPNID idClient, PVOID const pvAsyncContext, DPNHANDLE *const phAsyncHandle, const DWORD dwFlags) PURE;
856 STDMETHOD(RemovePlayerFromGroup) (THIS_ const DPNID idGroup, const DPNID idClient, PVOID const pvAsyncContext, DPNHANDLE *const phAsyncHandle, const DWORD dwFlags) PURE;
857 STDMETHOD(SetGroupInfo) (THIS_ const DPNID dpnid,DPN_GROUP_INFO *const pdpnGroupInfo,PVOID const pvAsyncContext,DPNHANDLE *const phAsyncHandle, const DWORD dwFlags) PURE;
858 STDMETHOD(GetGroupInfo) (THIS_ const DPNID dpnid,DPN_GROUP_INFO *const pdpnGroupInfo,DWORD *const pdwSize,const DWORD dwFlags) PURE;
859 STDMETHOD(EnumPlayersAndGroups) (THIS_ DPNID *const prgdpnid, DWORD *const pcdpnid, const DWORD dwFlags) PURE;
860 STDMETHOD(EnumGroupMembers) (THIS_ const DPNID dpnid, DPNID *const prgdpnid, DWORD *const pcdpnid, const DWORD dwFlags) PURE;
861 STDMETHOD(SetPeerInfo) (THIS_ const DPN_PLAYER_INFO *const pdpnPlayerInfo,PVOID const pvAsyncContext,DPNHANDLE *const phAsyncHandle, const DWORD dwFlags) PURE;
862 STDMETHOD(GetPeerInfo) (THIS_ const DPNID dpnid,DPN_PLAYER_INFO *const pdpnPlayerInfo,DWORD *const pdwSize,const DWORD dwFlags) PURE;
863 STDMETHOD(GetPeerAddress) (THIS_ const DPNID dpnid,IDirectPlay8Address **const pAddress,const DWORD dwFlags) PURE;
864 STDMETHOD(GetLocalHostAddresses) (THIS_ IDirectPlay8Address **const prgpAddress,DWORD *const pcAddress,const DWORD dwFlags) PURE;
865 STDMETHOD(Close) (THIS_ const DWORD dwFlags) PURE;
866 STDMETHOD(EnumHosts) (THIS_ PDPN_APPLICATION_DESC const pApplicationDesc,IDirectPlay8Address *const pAddrHost,IDirectPlay8Address *const pDeviceInfo,PVOID const pUserEnumData,const DWORD dwUserEnumDataSize,const DWORD dwEnumCount,const DWORD dwRetryInterval,const DWORD dwTimeOut,PVOID const pvUserContext,DPNHANDLE *const pAsyncHandle,const DWORD dwFlags) PURE;
867 STDMETHOD(DestroyPeer) (THIS_ const DPNID dpnidClient, const void *const pvDestroyData, const DWORD dwDestroyDataSize, const DWORD dwFlags) PURE;
868 STDMETHOD(ReturnBuffer) (THIS_ const DPNHANDLE hBufferHandle,const DWORD dwFlags) PURE;
869 STDMETHOD(GetPlayerContext) (THIS_ const DPNID dpnid,PVOID *const ppvPlayerContext,const DWORD dwFlags) PURE;
870 STDMETHOD(GetGroupContext) (THIS_ const DPNID dpnid,PVOID *const ppvGroupContext,const DWORD dwFlags) PURE;
871 STDMETHOD(GetCaps) (THIS_ DPN_CAPS *const pdpCaps,const DWORD dwFlags) PURE;
872 STDMETHOD(SetCaps) (THIS_ const DPN_CAPS *const pdpCaps, const DWORD dwFlags) PURE;
873 STDMETHOD(SetSPCaps) (THIS_ const GUID * const pguidSP, const DPN_SP_CAPS *const pdpspCaps, const DWORD dwFlags ) PURE;
874 STDMETHOD(GetSPCaps) (THIS_ const GUID * const pguidSP, DPN_SP_CAPS *const pdpspCaps,const DWORD dwFlags) PURE;
875 STDMETHOD(GetConnectionInfo) (THIS_ const DPNID dpnid, DPN_CONNECTION_INFO *const pdpConnectionInfo,const DWORD dwFlags) PURE;
876 STDMETHOD(RegisterLobby) (THIS_ const DPNHANDLE dpnHandle, IDirectPlay8LobbiedApplication *const pIDP8LobbiedApplication,const DWORD dwFlags) PURE;
877 STDMETHOD(TerminateSession) (THIS_ void *const pvTerminateData,const DWORD dwTerminateDataSize,const DWORD dwFlags) PURE;
878 };
879
880
881 /****************************************************************************
882 *
883 * IDirectPlay8 application interface macros
884 *
885 ****************************************************************************/
886
887 #if !defined(__cplusplus) || defined(CINTERFACE)
888
889 #define IDirectPlay8Client_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
890 #define IDirectPlay8Client_AddRef(p) (p)->lpVtbl->AddRef(p)
891 #define IDirectPlay8Client_Release(p) (p)->lpVtbl->Release(p)
892 #define IDirectPlay8Client_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c)
893 #define IDirectPlay8Client_EnumServiceProviders(p,a,b,c,d,e,f) (p)->lpVtbl->EnumServiceProviders(p,a,b,c,d,e,f)
894 #define IDirectPlay8Client_EnumHosts(p,a,b,c,d,e,f,g,h,i,j,k) (p)->lpVtbl->EnumHosts(p,a,b,c,d,e,f,g,h,i,j,k)
895 #define IDirectPlay8Client_CancelAsyncOperation(p,a,b) (p)->lpVtbl->CancelAsyncOperation(p,a,b)
896 #define IDirectPlay8Client_Connect(p,a,b,c,d,e,f,g,h,i,j) (p)->lpVtbl->Connect(p,a,b,c,d,e,f,g,h,i,j)
897 #define IDirectPlay8Client_Send(p,a,b,c,d,e,f) (p)->lpVtbl->Send(p,a,b,c,d,e,f)
898 #define IDirectPlay8Client_GetSendQueueInfo(p,a,b,c) (p)->lpVtbl->GetSendQueueInfo(p,a,b,c)
899 #define IDirectPlay8Client_GetApplicationDesc(p,a,b,c) (p)->lpVtbl->GetApplicationDesc(p,a,b,c)
900 #define IDirectPlay8Client_SetClientInfo(p,a,b,c,d) (p)->lpVtbl->SetClientInfo(p,a,b,c,d)
901 #define IDirectPlay8Client_GetServerInfo(p,a,b,c) (p)->lpVtbl->GetServerInfo(p,a,b,c)
902 #define IDirectPlay8Client_GetServerAddress(p,a,b) (p)->lpVtbl->GetServerAddress(p,a,b)
903 #define IDirectPlay8Client_Close(p,a) (p)->lpVtbl->Close(p,a)
904 #define IDirectPlay8Client_ReturnBuffer(p,a,b) (p)->lpVtbl->ReturnBuffer(p,a,b)
905 #define IDirectPlay8Client_GetCaps(p,a,b) (p)->lpVtbl->GetCaps(p,a,b)
906 #define IDirectPlay8Client_SetCaps(p,a,b) (p)->lpVtbl->SetCaps(p,a,b)
907 #define IDirectPlay8Client_SetSPCaps(p,a,b,c) (p)->lpVtbl->SetSPCaps(p,a,b,c)
908 #define IDirectPlay8Client_GetSPCaps(p,a,b,c) (p)->lpVtbl->GetSPCaps(p,a,b,c)
909 #define IDirectPlay8Client_GetConnectionInfo(p,a,b) (p)->lpVtbl->GetConnectionInfo(p,a,b)
910 #define IDirectPlay8Client_RegisterLobby(p,a,b,c) (p)->lpVtbl->RegisterLobby(p,a,b,c)
911
912 #define IDirectPlay8Server_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
913 #define IDirectPlay8Server_AddRef(p) (p)->lpVtbl->AddRef(p)
914 #define IDirectPlay8Server_Release(p) (p)->lpVtbl->Release(p)
915 #define IDirectPlay8Server_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c)
916 #define IDirectPlay8Server_EnumServiceProviders(p,a,b,c,d,e,f) (p)->lpVtbl->EnumServiceProviders(p,a,b,c,d,e,f)
917 #define IDirectPlay8Server_CancelAsyncOperation(p,a,b) (p)->lpVtbl->CancelAsyncOperation(p,a,b)
918 #define IDirectPlay8Server_GetSendQueueInfo(p,a,b,c,d) (p)->lpVtbl->GetSendQueueInfo(p,a,b,c,d)
919 #define IDirectPlay8Server_GetApplicationDesc(p,a,b,c) (p)->lpVtbl->GetApplicationDesc(p,a,b,c)
920 #define IDirectPlay8Server_SetServerInfo(p,a,b,c,d) (p)->lpVtbl->SetServerInfo(p,a,b,c,d)
921 #define IDirectPlay8Server_GetClientInfo(p,a,b,c,d) (p)->lpVtbl->GetClientInfo(p,a,b,c,d)
922 #define IDirectPlay8Server_GetClientAddress(p,a,b,c) (p)->lpVtbl->GetClientAddress(p,a,b,c)
923 #define IDirectPlay8Server_GetLocalHostAddresses(p,a,b,c) (p)->lpVtbl->GetLocalHostAddresses(p,a,b,c)
924 #define IDirectPlay8Server_SetApplicationDesc(p,a,b) (p)->lpVtbl->SetApplicationDesc(p,a,b)
925 #define IDirectPlay8Server_Host(p,a,b,c,d,e,f,g) (p)->lpVtbl->Host(p,a,b,c,d,e,f,g)
926 #define IDirectPlay8Server_SendTo(p,a,b,c,d,e,f,g) (p)->lpVtbl->SendTo(p,a,b,c,d,e,f,g)
927 #define IDirectPlay8Server_CreateGroup(p,a,b,c,d,e) (p)->lpVtbl->CreateGroup(p,a,b,c,d,e)
928 #define IDirectPlay8Server_DestroyGroup(p,a,b,c,d) (p)->lpVtbl->DestroyGroup(p,a,b,c,d)
929 #define IDirectPlay8Server_AddPlayerToGroup(p,a,b,c,d,e) (p)->lpVtbl->AddPlayerToGroup(p,a,b,c,d,e)
930 #define IDirectPlay8Server_RemovePlayerFromGroup(p,a,b,c,d,e) (p)->lpVtbl->RemovePlayerFromGroup(p,a,b,c,d,e)
931 #define IDirectPlay8Server_SetGroupInfo(p,a,b,c,d,e) (p)->lpVtbl->SetGroupInfo(p,a,b,c,d,e)
932 #define IDirectPlay8Server_GetGroupInfo(p,a,b,c,d) (p)->lpVtbl->GetGroupInfo(p,a,b,c,d)
933 #define IDirectPlay8Server_EnumPlayersAndGroups(p,a,b,c) (p)->lpVtbl->EnumPlayersAndGroups(p,a,b,c)
934 #define IDirectPlay8Server_EnumGroupMembers(p,a,b,c,d) (p)->lpVtbl->EnumGroupMembers(p,a,b,c,d)
935 #define IDirectPlay8Server_Close(p,a) (p)->lpVtbl->Close(p,a)
936 #define IDirectPlay8Server_DestroyClient(p,a,b,c,d) (p)->lpVtbl->DestroyClient(p,a,b,c,d)
937 #define IDirectPlay8Server_ReturnBuffer(p,a,b) (p)->lpVtbl->ReturnBuffer(p,a,b)
938 #define IDirectPlay8Server_GetPlayerContext(p,a,b,c) (p)->lpVtbl->GetPlayerContext(p,a,b,c)
939 #define IDirectPlay8Server_GetGroupContext(p,a,b,c) (p)->lpVtbl->GetGroupContext(p,a,b,c)
940 #define IDirectPlay8Server_GetCaps(p,a,b) (p)->lpVtbl->GetCaps(p,a,b)
941 #define IDirectPlay8Server_SetCaps(p,a,b) (p)->lpVtbl->SetCaps(p,a,b)
942 #define IDirectPlay8Server_SetSPCaps(p,a,b,c) (p)->lpVtbl->SetSPCaps(p,a,b,c)
943 #define IDirectPlay8Server_GetSPCaps(p,a,b,c) (p)->lpVtbl->GetSPCaps(p,a,b,c)
944 #define IDirectPlay8Server_GetConnectionInfo(p,a,b,c) (p)->lpVtbl->GetConnectionInfo(p,a,b,c)
945 #define IDirectPlay8Server_RegisterLobby(p,a,b,c) (p)->lpVtbl->RegisterLobby(p,a,b,c)
946
947 #define IDirectPlay8Peer_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
948 #define IDirectPlay8Peer_AddRef(p) (p)->lpVtbl->AddRef(p)
949 #define IDirectPlay8Peer_Release(p) (p)->lpVtbl->Release(p)
950 #define IDirectPlay8Peer_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c)
951 #define IDirectPlay8Peer_EnumServiceProviders(p,a,b,c,d,e,f) (p)->lpVtbl->EnumServiceProviders(p,a,b,c,d,e,f)
952 #define IDirectPlay8Peer_EnumHosts(p,a,b,c,d,e,f,g,h,i,j,k) (p)->lpVtbl->EnumHosts(p,a,b,c,d,e,f,g,h,i,j,k)
953
954 #define IDirectPlay8Peer_CancelAsyncOperation(p,a,b) (p)->lpVtbl->CancelAsyncOperation(p,a,b)
955 #define IDirectPlay8Peer_Connect(p,a,b,c,d,e,f,g,h,i,j,k) (p)->lpVtbl->Connect(p,a,b,c,d,e,f,g,h,i,j,k)
956 #define IDirectPlay8Peer_SendTo(p,a,b,c,d,e,f,g) (p)->lpVtbl->SendTo(p,a,b,c,d,e,f,g)
957 #define IDirectPlay8Peer_GetSendQueueInfo(p,a,b,c,d) (p)->lpVtbl->GetSendQueueInfo(p,a,b,c,d)
958 #define IDirectPlay8Peer_Host(p,a,b,c,d,e,f,g) (p)->lpVtbl->Host(p,a,b,c,d,e,f,g)
959 #define IDirectPlay8Peer_GetApplicationDesc(p,a,b,c) (p)->lpVtbl->GetApplicationDesc(p,a,b,c)
960 #define IDirectPlay8Peer_SetApplicationDesc(p,a,b) (p)->lpVtbl->SetApplicationDesc(p,a,b)
961 #define IDirectPlay8Peer_CreateGroup(p,a,b,c,d,e) (p)->lpVtbl->CreateGroup(p,a,b,c,d,e)
962 #define IDirectPlay8Peer_DestroyGroup(p,a,b,c,d) (p)->lpVtbl->DestroyGroup(p,a,b,c,d)
963 #define IDirectPlay8Peer_AddPlayerToGroup(p,a,b,c,d,e) (p)->lpVtbl->AddPlayerToGroup(p,a,b,c,d,e)
964 #define IDirectPlay8Peer_RemovePlayerFromGroup(p,a,b,c,d,e) (p)->lpVtbl->RemovePlayerFromGroup(p,a,b,c,d,e)
965 #define IDirectPlay8Peer_SetGroupInfo(p,a,b,c,d,e) (p)->lpVtbl->SetGroupInfo(p,a,b,c,d,e)
966 #define IDirectPlay8Peer_GetGroupInfo(p,a,b,c,d) (p)->lpVtbl->GetGroupInfo(p,a,b,c,d)
967 #define IDirectPlay8Peer_EnumPlayersAndGroups(p,a,b,c) (p)->lpVtbl->EnumPlayersAndGroups(p,a,b,c)
968 #define IDirectPlay8Peer_EnumGroupMembers(p,a,b,c,d) (p)->lpVtbl->EnumGroupMembers(p,a,b,c,d)
969 #define IDirectPlay8Peer_SetPeerInfo(p,a,b,c,d) (p)->lpVtbl->SetPeerInfo(p,a,b,c,d)
970 #define IDirectPlay8Peer_GetPeerInfo(p,a,b,c,d) (p)->lpVtbl->GetPeerInfo(p,a,b,c,d)
971 #define IDirectPlay8Peer_GetPeerAddress(p,a,b,c) (p)->lpVtbl->GetPeerAddress(p,a,b,c)
972 #define IDirectPlay8Peer_GetLocalHostAddresses(p,a,b,c) (p)->lpVtbl->GetLocalHostAddresses(p,a,b,c)
973 #define IDirectPlay8Peer_Close(p,a) (p)->lpVtbl->Close(p,a)
974 #define IDirectPlay8Peer_EnumHosts(p,a,b,c,d,e,f,g,h,i,j,k) (p)->lpVtbl->EnumHosts(p,a,b,c,d,e,f,g,h,i,j,k)
975 #define IDirectPlay8Peer_DestroyPeer(p,a,b,c,d) (p)->lpVtbl->DestroyPeer(p,a,b,c,d)
976 #define IDirectPlay8Peer_ReturnBuffer(p,a,b) (p)->lpVtbl->ReturnBuffer(p,a,b)
977 #define IDirectPlay8Peer_GetPlayerContext(p,a,b,c) (p)->lpVtbl->GetPlayerContext(p,a,b,c)
978 #define IDirectPlay8Peer_GetGroupContext(p,a,b,c) (p)->lpVtbl->GetGroupContext(p,a,b,c)
979 #define IDirectPlay8Peer_GetCaps(p,a,b) (p)->lpVtbl->GetCaps(p,a,b)
980 #define IDirectPlay8Peer_SetCaps(p,a,b) (p)->lpVtbl->SetCaps(p,a,b)
981 #define IDirectPlay8Peer_SetSPCaps(p,a,b,c) (p)->lpVtbl->SetSPCaps(p,a,b,c)
982 #define IDirectPlay8Peer_GetSPCaps(p,a,b,c) (p)->lpVtbl->GetSPCaps(p,a,b,c)
983 #define IDirectPlay8Peer_GetConnectionInfo(p,a,b,c) (p)->lpVtbl->GetConnectionInfo(p,a,b,c)
984 #define IDirectPlay8Peer_RegisterLobby(p,a,b,c) (p)->lpVtbl->RegisterLobby(p,a,b,c)
985 #define IDirectPlay8Peer_TerminateSession(p,a,b,c) (p)->lpVtbl->TerminateSession(p,a,b,c)
986
987 #else /* C++ */
988
989 #define IDirectPlay8Client_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
990 #define IDirectPlay8Client_AddRef(p) (p)->AddRef()
991 #define IDirectPlay8Client_Release(p) (p)->Release()
992 #define IDirectPlay8Client_Initialize(p,a,b,c) (p)->Initialize(a,b,c)
993 #define IDirectPlay8Client_EnumServiceProviders(p,a,b,c,d,e,f) (p)->EnumServiceProviders(a,b,c,d,e,f)
994 #define IDirectPlay8Client_EnumHosts(p,a,b,c,d,e,f,g,h,i,j,k) (p)->EnumHosts(a,b,c,d,e,f,g,h,i,j,k)
995 #define IDirectPlay8Client_CancelAsyncOperation(p,a,b) (p)->CancelAsyncOperation(a,b)
996 #define IDirectPlay8Client_Connect(p,a,b,c,d,e,f,g,h,i,j) (p)->Connect(a,b,c,d,e,f,g,h,i,j)
997 #define IDirectPlay8Client_Send(p,a,b,c,d,e,f) (p)->Send(a,b,c,d,e,f)
998 #define IDirectPlay8Client_GetSendQueueInfo(p,a,b,c) (p)->GetSendQueueInfo(a,b,c)
999 #define IDirectPlay8Client_GetApplicationDesc(p,a,b,c) (p)->GetApplicationDesc(a,b,c)
1000 #define IDirectPlay8Client_SetClientInfo(p,a,b,c,d) (p)->SetClientInfo(a,b,c,d)
1001 #define IDirectPlay8Client_GetServerInfo(p,a,b,c) (p)->GetServerInfo(a,b,c)
1002 #define IDirectPlay8Client_GetServerAddress(p,a,b) (p)->GetServerAddress(a,b)
1003 #define IDirectPlay8Client_Close(p,a) (p)->Close(a)
1004 #define IDirectPlay8Client_ReturnBuffer(p,a,b) (p)->ReturnBuffer(a,b)
1005 #define IDirectPlay8Client_GetCaps(p,a,b) (p)->GetCaps(a,b)
1006 #define IDirectPlay8Client_SetCaps(p,a,b) (p)->SetCaps(a,b)
1007 #define IDirectPlay8Client_SetSPCaps(p,a,b,c) (p)->SetSPCaps(a,b,c)
1008 #define IDirectPlay8Client_GetSPCaps(p,a,b,c) (p)->GetSPCaps(a,b,c)
1009 #define IDirectPlay8Client_GetConnectionInfo(p,a,b) (p)->GetConnectionInfo(a,b)
1010 #define IDirectPlay8Client_RegisterLobby(p,a,b,c) (p)->RegisterLobby(a,b,c)
1011
1012 #define IDirectPlay8Server_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
1013 #define IDirectPlay8Server_AddRef(p) (p)->AddRef()
1014 #define IDirectPlay8Server_Release(p) (p)->Release()
1015 #define IDirectPlay8Server_Initialize(p,a,b,c) (p)->Initialize(a,b,c)
1016 #define IDirectPlay8Server_EnumServiceProviders(p,a,b,c,d,e,f) (p)->EnumServiceProviders(a,b,c,d,e,f)
1017 #define IDirectPlay8Server_CancelAsyncOperation(p,a,b) (p)->CancelAsyncOperation(a,b)
1018 #define IDirectPlay8Server_GetSendQueueInfo(p,a,b,c,d) (p)->GetSendQueueInfo(a,b,c,d)
1019 #define IDirectPlay8Server_GetApplicationDesc(p,a,b,c) (p)->GetApplicationDesc(a,b,c)
1020 #define IDirectPlay8Server_SetServerInfo(p,a,b,c,d) (p)->SetServerInfo(a,b,c,d)
1021 #define IDirectPlay8Server_GetClientInfo(p,a,b,c,d) (p)->GetClientInfo(a,b,c,d)
1022 #define IDirectPlay8Server_GetClientAddress(p,a,b,c) (p)->GetClientAddress(a,b,c)
1023 #define IDirectPlay8Server_GetLocalHostAddresses(p,a,b,c) (p)->GetLocalHostAddresses(a,b,c)
1024 #define IDirectPlay8Server_SetApplicationDesc(p,a,b) (p)->SetApplicationDesc(a,b)
1025 #define IDirectPlay8Server_Host(p,a,b,c,d,e,f,g) (p)->Host(a,b,c,d,e,f,g)
1026 #define IDirectPlay8Server_SendTo(p,a,b,c,d,e,f,g) (p)->SendTo(a,b,c,d,e,f,g)
1027 #define IDirectPlay8Server_CreateGroup(p,a,b,c,d,e) (p)->CreateGroup(a,b,c,d,e)
1028 #define IDirectPlay8Server_DestroyGroup(p,a,b,c,d) (p)->DestroyGroup(a,b,c,d)
1029 #define IDirectPlay8Server_AddPlayerToGroup(p,a,b,c,d,e) (p)->AddPlayerToGroup(a,b,c,d,e)
1030 #define IDirectPlay8Server_RemovePlayerFromGroup(p,a,b,c,d,e) (p)->RemovePlayerFromGroup(a,b,c,d,e)
1031 #define IDirectPlay8Server_SetGroupInfo(p,a,b,c,d,e) (p)->SetGroupInfo(a,b,c,d,e)
1032 #define IDirectPlay8Server_GetGroupInfo(p,a,b,c,d) (p)->GetGroupInfo(a,b,c,d)
1033 #define IDirectPlay8Server_EnumPlayersAndGroups(p,a,b,c) (p)->EnumPlayersAndGroups(a,b,c)
1034 #define IDirectPlay8Server_EnumGroupMembers(p,a,b,c,d) (p)->EnumGroupMembers(a,b,c,d)
1035 #define IDirectPlay8Server_Close(p,a) (p)->Close(a)
1036 #define IDirectPlay8Server_DestroyClient(p,a,b,c,d) (p)->DestroyClient(a,b,c,d)
1037 #define IDirectPlay8Server_ReturnBuffer(p,a,b) (p)->ReturnBuffer(a,b)
1038 #define IDirectPlay8Server_GetPlayerContext(p,a,b,c) (p)->GetPlayerContext(a,b,c)
1039 #define IDirectPlay8Server_GetGroupContext(p,a,b,c) (p)->GetGroupContext(a,b,c)
1040 #define IDirectPlay8Server_GetCaps(p,a,b) (p)->GetCaps(a,b)
1041 #define IDirectPlay8Server_SetCaps(p,a,b) (p)->SetCaps(a,b)
1042 #define IDirectPlay8Server_SetSPCaps(p,a,b,c) (p)->SetSPCaps(a,b,c)
1043 #define IDirectPlay8Server_GetSPCaps(p,a,b,c) (p)->GetSPCaps(a,b,c)
1044 #define IDirectPlay8Server_GetConnectionInfo(p,a,b,c) (p)->GetConnectionInfo(a,b,c)
1045 #define IDirectPlay8Server_RegisterLobby(p,a,b,c) (p)->RegisterLobby(a,b,c)
1046
1047 #define IDirectPlay8Peer_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
1048 #define IDirectPlay8Peer_AddRef(p) (p)->AddRef()
1049 #define IDirectPlay8Peer_Release(p) (p)->Release()
1050 #define IDirectPlay8Peer_Initialize(p,a,b,c) (p)->Initialize(a,b,c)
1051 #define IDirectPlay8Peer_EnumServiceProviders(p,a,b,c,d,e,f) (p)->EnumServiceProviders(a,b,c,d,e,f)
1052 #define IDirectPlay8Peer_EnumHosts(p,a,b,c,d,e,f,g,h,i,j,k) (p)->EnumHosts(a,b,c,d,e,f,g,h,i,j,k)
1053 #define IDirectPlay8Peer_CancelAsyncOperation(p,a,b) (p)->CancelAsyncOperation(a,b)
1054 #define IDirectPlay8Peer_Connect(p,a,b,c,d,e,f,g,h,i,j,k) (p)->Connect(a,b,c,d,e,f,g,h,i,j,k)
1055 #define IDirectPlay8Peer_SendTo(p,a,b,c,d,e,f,g) (p)->SendTo(a,b,c,d,e,f,g)
1056 #define IDirectPlay8Peer_GetSendQueueInfo(p,a,b,c,d) (p)->GetSendQueueInfo(a,b,c,d)
1057 #define IDirectPlay8Peer_Host(p,a,b,c,d,e,f,g) (p)->Host(a,b,c,d,e,f,g)
1058 #define IDirectPlay8Peer_GetApplicationDesc(p,a,b,c) (p)->GetApplicationDesc(a,b,c)
1059 #define IDirectPlay8Peer_SetApplicationDesc(p,a,b) (p)->SetApplicationDesc(a,b)
1060 #define IDirectPlay8Peer_CreateGroup(p,a,b,c,d,e) (p)->CreateGroup(a,b,c,d,e)
1061 #define IDirectPlay8Peer_DestroyGroup(p,a,b,c,d) (p)->DestroyGroup(a,b,c,d)
1062 #define IDirectPlay8Peer_AddPlayerToGroup(p,a,b,c,d,e) (p)->AddPlayerToGroup(a,b,c,d,e)
1063 #define IDirectPlay8Peer_RemovePlayerFromGroup(p,a,b,c,d,e) (p)->RemovePlayerFromGroup(a,b,c,d,e)
1064 #define IDirectPlay8Peer_SetGroupInfo(p,a,b,c,d,e) (p)->SetGroupInfo(a,b,c,d,e)
1065 #define IDirectPlay8Peer_GetGroupInfo(p,a,b,c,d) (p)->GetGroupInfo(a,b,c,d)
1066 #define IDirectPlay8Peer_EnumPlayersAndGroups(p,a,b,c) (p)->EnumPlayersAndGroups(a,b,c)
1067 #define IDirectPlay8Peer_EnumGroupMembers(p,a,b,c,d) (p)->EnumGroupMembers(a,b,c,d)
1068 #define IDirectPlay8Peer_SetPeerInfo(p,a,b,c,d) (p)->SetPeerInfo(a,b,c,d)
1069 #define IDirectPlay8Peer_GetPeerInfo(p,a,b,c,d) (p)->GetPeerInfo(a,b,c,d)
1070 #define IDirectPlay8Peer_GetPeerAddress(p,a,b,c) (p)->GetPeerAddress(a,b,c)
1071 #define IDirectPlay8Peer_GetLocalHostAddresses(p,a,b,c) (p)->GetLocalHostAddresses(a,b,c)
1072 #define IDirectPlay8Peer_Close(p,a) (p)->Close(a)
1073 #define IDirectPlay8Peer_EnumHosts(p,a,b,c,d,e,f,g,h,i,j,k) (p)->EnumHosts(a,b,c,d,e,f,g,h,i,j,k)
1074 #define IDirectPlay8Peer_DestroyPeer(p,a,b,c,d) (p)->DestroyPeer(a,b,c,d)
1075 #define IDirectPlay8Peer_ReturnBuffer(p,a,b) (p)->ReturnBuffer(a,b)
1076 #define IDirectPlay8Peer_GetPlayerContext(p,a,b,c) (p)->GetPlayerContext(a,b,c)
1077 #define IDirectPlay8Peer_GetGroupContext(p,a,b,c) (p)->GetGroupContext(a,b,c)
1078 #define IDirectPlay8Peer_GetCaps(p,a,b) (p)->GetCaps(a,b)
1079 #define IDirectPlay8Peer_SetCaps(p,a,b) (p)->SetCaps(a,b)
1080 #define IDirectPlay8Peer_SetSPCaps(p,a,b,c) (p)->SetSPCaps(a,b,c)
1081 #define IDirectPlay8Peer_GetSPCaps(p,a,b,c) (p)->GetSPCaps(a,b,c)
1082 #define IDirectPlay8Peer_GetConnectionInfo(p,a,b,c) (p)->GetConnectionInfo(a,b,c)
1083 #define IDirectPlay8Peer_RegisterLobby(p,a,b,c) (p)->RegisterLobby(a,b,c)
1084 #define IDirectPlay8Peer_TerminateSession(p,a,b,c) (p)->TerminateSession(a,b,c)
1085
1086 #endif
1087
1088 /****************************************************************************
1089 *
1090 * DIRECTPLAY8 ERRORS
1091 *
1092 * Errors are represented by negative values and cannot be combined.
1093 *
1094 ****************************************************************************/
1095
1096 #define _DPN_FACILITY_CODE 0x015
1097 #define _DPNHRESULT_BASE 0x8000
1098 #define MAKE_DPNHRESULT( code ) MAKE_HRESULT( 1, _DPN_FACILITY_CODE, ( code + _DPNHRESULT_BASE ) )
1099
1100 #define DPN_OK S_OK
1101
1102 #define DPNSUCCESS_EQUAL MAKE_HRESULT( 0, _DPN_FACILITY_CODE, ( 0x5 + _DPNHRESULT_BASE ) )
1103 #define DPNSUCCESS_NOTEQUAL MAKE_HRESULT( 0, _DPN_FACILITY_CODE, (0x0A + _DPNHRESULT_BASE ) )
1104 #define DPNSUCCESS_PENDING MAKE_HRESULT( 0, _DPN_FACILITY_CODE, (0x0e + _DPNHRESULT_BASE ) )
1105
1106 #define DPNERR_ABORTED MAKE_DPNHRESULT( 0x30 )
1107 #define DPNERR_ADDRESSING MAKE_DPNHRESULT( 0x40 )
1108 #define DPNERR_ALREADYCLOSING MAKE_DPNHRESULT( 0x50 )
1109 #define DPNERR_ALREADYCONNECTED MAKE_DPNHRESULT( 0x60 )
1110 #define DPNERR_ALREADYDISCONNECTING MAKE_DPNHRESULT( 0x70 )
1111 #define DPNERR_ALREADYINITIALIZED MAKE_DPNHRESULT( 0x80 )
1112 #define DPNERR_ALREADYREGISTERED MAKE_DPNHRESULT( 0x90 )
1113 #define DPNERR_BUFFERTOOSMALL MAKE_DPNHRESULT( 0x100 )
1114 #define DPNERR_CANNOTCANCEL MAKE_DPNHRESULT( 0x110 )
1115 #define DPNERR_CANTCREATEGROUP MAKE_DPNHRESULT( 0x120 )
1116 #define DPNERR_CANTCREATEPLAYER MAKE_DPNHRESULT( 0x130 )
1117 #define DPNERR_CANTLAUNCHAPPLICATION MAKE_DPNHRESULT( 0x140 )
1118 #define DPNERR_CONNECTING MAKE_DPNHRESULT( 0x150 )
1119 #define DPNERR_CONNECTIONLOST MAKE_DPNHRESULT( 0x160 )
1120 #define DPNERR_CONVERSION MAKE_DPNHRESULT( 0x170 )
1121 #define DPNERR_DATATOOLARGE MAKE_DPNHRESULT( 0x175 )
1122 #define DPNERR_DOESNOTEXIST MAKE_DPNHRESULT( 0x180 )
1123 #define DPNERR_DUPLICATECOMMAND MAKE_DPNHRESULT( 0x190 )
1124 #define DPNERR_ENDPOINTNOTRECEIVING MAKE_DPNHRESULT( 0x200 )
1125 #define DPNERR_ENUMQUERYTOOLARGE MAKE_DPNHRESULT( 0x210 )
1126 #define DPNERR_ENUMRESPONSETOOLARGE MAKE_DPNHRESULT( 0x220 )
1127 #define DPNERR_EXCEPTION MAKE_DPNHRESULT( 0x230 )
1128 #define DPNERR_GENERIC E_FAIL
1129 #define DPNERR_GROUPNOTEMPTY MAKE_DPNHRESULT( 0x240 )
1130 #define DPNERR_HOSTING MAKE_DPNHRESULT( 0x250 )
1131 #define DPNERR_HOSTREJECTEDCONNECTION MAKE_DPNHRESULT( 0x260 )
1132 #define DPNERR_HOSTTERMINATEDSESSION MAKE_DPNHRESULT( 0x270 )
1133 #define DPNERR_INCOMPLETEADDRESS MAKE_DPNHRESULT( 0x280 )
1134 #define DPNERR_INVALIDADDRESSFORMAT MAKE_DPNHRESULT( 0x290 )
1135 #define DPNERR_INVALIDAPPLICATION MAKE_DPNHRESULT( 0x300 )
1136 #define DPNERR_INVALIDCOMMAND MAKE_DPNHRESULT( 0x310 )
1137 #define DPNERR_INVALIDDEVICEADDRESS MAKE_DPNHRESULT( 0x320 )
1138 #define DPNERR_INVALIDENDPOINT MAKE_DPNHRESULT( 0x330 )
1139 #define DPNERR_INVALIDFLAGS MAKE_DPNHRESULT( 0x340 )
1140 #define DPNERR_INVALIDGROUP MAKE_DPNHRESULT( 0x350 )
1141 #define DPNERR_INVALIDHANDLE MAKE_DPNHRESULT( 0x360 )
1142 #define DPNERR_INVALIDHOSTADDRESS MAKE_DPNHRESULT( 0x370 )
1143 #define DPNERR_INVALIDINSTANCE MAKE_DPNHRESULT( 0x380 )
1144 #define DPNERR_INVALIDINTERFACE MAKE_DPNHRESULT( 0x390 )
1145 #define DPNERR_INVALIDOBJECT MAKE_DPNHRESULT( 0x400 )
1146 #define DPNERR_INVALIDPARAM E_INVALIDARG
1147 #define DPNERR_INVALIDPASSWORD MAKE_DPNHRESULT( 0x410 )
1148 #define DPNERR_INVALIDPLAYER MAKE_DPNHRESULT( 0x420 )
1149 #define DPNERR_INVALIDPOINTER E_POINTER
1150 #define DPNERR_INVALIDPRIORITY MAKE_DPNHRESULT( 0x430 )
1151 #define DPNERR_INVALIDSTRING MAKE_DPNHRESULT( 0x440 )
1152 #define DPNERR_INVALIDURL MAKE_DPNHRESULT( 0x450 )
1153 #define DPNERR_INVALIDVERSION MAKE_DPNHRESULT( 0x460 )
1154 #define DPNERR_NOCAPS MAKE_DPNHRESULT( 0x470 )
1155 #define DPNERR_NOCONNECTION MAKE_DPNHRESULT( 0x480 )
1156 #define DPNERR_NOHOSTPLAYER MAKE_DPNHRESULT( 0x490 )
1157 #define DPNERR_NOINTERFACE E_NOINTERFACE
1158 #define DPNERR_NOMOREADDRESSCOMPONENTS MAKE_DPNHRESULT( 0x500 )
1159 #define DPNERR_NORESPONSE MAKE_DPNHRESULT( 0x510 )
1160 #define DPNERR_NOTALLOWED MAKE_DPNHRESULT( 0x520 )
1161 #define DPNERR_NOTHOST MAKE_DPNHRESULT( 0x530 )
1162 #define DPNERR_NOTREADY MAKE_DPNHRESULT( 0x540 )
1163 #define DPNERR_NOTREGISTERED MAKE_DPNHRESULT( 0x550 )
1164 #define DPNERR_OUTOFMEMORY E_OUTOFMEMORY
1165 #define DPNERR_PENDING DPNSUCCESS_PENDING
1166 #define DPNERR_PLAYERALREADYINGROUP MAKE_DPNHRESULT( 0x560 )
1167 #define DPNERR_PLAYERLOST MAKE_DPNHRESULT( 0x570 )
1168 #define DPNERR_PLAYERNOTINGROUP MAKE_DPNHRESULT( 0x580 )
1169 #define DPNERR_PLAYERNOTREACHABLE MAKE_DPNHRESULT( 0x590 )
1170 #define DPNERR_SENDTOOLARGE MAKE_DPNHRESULT( 0x600 )
1171 #define DPNERR_SESSIONFULL MAKE_DPNHRESULT( 0x610 )
1172 #define DPNERR_TABLEFULL MAKE_DPNHRESULT( 0x620 )
1173 #define DPNERR_TIMEDOUT MAKE_DPNHRESULT( 0x630 )
1174 #define DPNERR_UNINITIALIZED MAKE_DPNHRESULT( 0x640 )
1175 #define DPNERR_UNSUPPORTED E_NOTIMPL
1176 #define DPNERR_USERCANCEL MAKE_DPNHRESULT( 0x650 )
1177
1178 #ifdef __cplusplus
1179 }
1180 #endif
1181
1182 #endif
1183

root@recompile.se
ViewVC Help
Powered by ViewVC 1.1.26