2 * Copyright (C) 2003 Raphael Junqueira
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 #ifndef __WINE_DPLAY8_H
20 #define __WINE_DPLAY8_H
27 #endif /* defined(__cplusplus) */
30 typedef HRESULT (WINAPI *PFNDPNMESSAGEHANDLER)(PVOID, DWORD, PVOID);
31 typedef DWORD DPNID, *PDPNID;
32 typedef DWORD DPNHANDLE, *PDPNHANDLE;
34 /*****************************************************************************
35 * DirectPlay8 Message Id
37 #define DPN_MSGID_OFFSET 0xFFFF0000
38 #define DPN_MSGID_ADD_PLAYER_TO_GROUP (DPN_MSGID_OFFSET | 0x0001)
39 #define DPN_MSGID_APPLICATION_DESC (DPN_MSGID_OFFSET | 0x0002)
40 #define DPN_MSGID_ASYNC_OP_COMPLETE (DPN_MSGID_OFFSET | 0x0003)
41 #define DPN_MSGID_CLIENT_INFO (DPN_MSGID_OFFSET | 0x0004)
42 #define DPN_MSGID_CONNECT_COMPLETE (DPN_MSGID_OFFSET | 0x0005)
43 #define DPN_MSGID_CREATE_GROUP (DPN_MSGID_OFFSET | 0x0006)
44 #define DPN_MSGID_CREATE_PLAYER (DPN_MSGID_OFFSET | 0x0007)
45 #define DPN_MSGID_DESTROY_GROUP (DPN_MSGID_OFFSET | 0x0008)
46 #define DPN_MSGID_DESTROY_PLAYER (DPN_MSGID_OFFSET | 0x0009)
47 #define DPN_MSGID_ENUM_HOSTS_QUERY (DPN_MSGID_OFFSET | 0x000A)
48 #define DPN_MSGID_ENUM_HOSTS_RESPONSE (DPN_MSGID_OFFSET | 0x000B)
49 #define DPN_MSGID_GROUP_INFO (DPN_MSGID_OFFSET | 0x000C)
50 #define DPN_MSGID_HOST_MIGRATE (DPN_MSGID_OFFSET | 0x000D)
51 #define DPN_MSGID_INDICATE_CONNECT (DPN_MSGID_OFFSET | 0x000E)
52 #define DPN_MSGID_INDICATED_CONNECT_ABORTED (DPN_MSGID_OFFSET | 0x000F)
53 #define DPN_MSGID_PEER_INFO (DPN_MSGID_OFFSET | 0x0010)
54 #define DPN_MSGID_RECEIVE (DPN_MSGID_OFFSET | 0x0011)
55 #define DPN_MSGID_REMOVE_PLAYER_FROM_GROUP (DPN_MSGID_OFFSET | 0x0012)
56 #define DPN_MSGID_RETURN_BUFFER (DPN_MSGID_OFFSET | 0x0013)
57 #define DPN_MSGID_SEND_COMPLETE (DPN_MSGID_OFFSET | 0x0014)
58 #define DPN_MSGID_SERVER_INFO (DPN_MSGID_OFFSET | 0x0015)
59 #define DPN_MSGID_TERMINATE_SESSION (DPN_MSGID_OFFSET | 0x0016)
61 /*****************************************************************************
64 #define _DPN_FACILITY_CODE 0x015
65 #define _DPNHRESULT_BASE 0x8000
66 #define MAKE_DPNHRESULT(code) MAKE_HRESULT(1, _DPN_FACILITY_CODE, (code + _DPNHRESULT_BASE))
68 #define DPNSUCCESS_EQUAL MAKE_HRESULT(0, _DPN_FACILITY_CODE, (0x05 + _DPNHRESULT_BASE))
69 #define DPNSUCCESS_NOTEQUAL MAKE_HRESULT(0, _DPN_FACILITY_CODE, (0x0A + _DPNHRESULT_BASE))
70 #define DPNSUCCESS_PENDING MAKE_HRESULT(0, _DPN_FACILITY_CODE, (0x0E + _DPNHRESULT_BASE))
73 #define DPNERR_GENERIC E_FAIL
74 #define DPNERR_INVALIDPARAM E_INVALIDARG
75 #define DPNERR_UNSUPPORTED E_NOTIMPL
76 #define DPNERR_NOINTERFACE E_NOINTERFACE
77 #define DPNERR_OUTOFMEMORY E_OUTOFMEMORY
78 #define DPNERR_INVALIDPOINTER E_POINTER
79 #define DPNERR_PENDING DPNSUCCESS_PENDING
80 #define DPNERR_ABORTED MAKE_DPNHRESULT(0x030)
81 #define DPNERR_ADDRESSING MAKE_DPNHRESULT(0x040)
82 #define DPNERR_ALREADYCLOSING MAKE_DPNHRESULT(0x050)
83 #define DPNERR_ALREADYCONNECTED MAKE_DPNHRESULT(0x060)
84 #define DPNERR_ALREADYDISCONNECTING MAKE_DPNHRESULT(0x070)
85 #define DPNERR_ALREADYINITIALIZED MAKE_DPNHRESULT(0x080)
86 #define DPNERR_ALREADYREGISTERED MAKE_DPNHRESULT(0x090)
87 #define DPNERR_BUFFERTOOSMALL MAKE_DPNHRESULT(0x100)
88 #define DPNERR_CANNOTCANCEL MAKE_DPNHRESULT(0x110)
89 #define DPNERR_CANTCREATEGROUP MAKE_DPNHRESULT(0x120)
90 #define DPNERR_CANTCREATEPLAYER MAKE_DPNHRESULT(0x130)
91 #define DPNERR_CANTLAUNCHAPPLICATION MAKE_DPNHRESULT(0x140)
92 #define DPNERR_CONNECTING MAKE_DPNHRESULT(0x150)
93 #define DPNERR_CONNECTIONLOST MAKE_DPNHRESULT(0x160)
94 #define DPNERR_CONVERSION MAKE_DPNHRESULT(0x170)
95 #define DPNERR_DATATOOLARGE MAKE_DPNHRESULT(0x175)
96 #define DPNERR_DOESNOTEXIST MAKE_DPNHRESULT(0x180)
97 #define DPNERR_DUPLICATECOMMAND MAKE_DPNHRESULT(0x190)
98 #define DPNERR_ENDPOINTNOTRECEIVING MAKE_DPNHRESULT(0x200)
99 #define DPNERR_ENUMQUERYTOOLARGE MAKE_DPNHRESULT(0x210)
100 #define DPNERR_ENUMRESPONSETOOLARGE MAKE_DPNHRESULT(0x220)
101 #define DPNERR_EXCEPTION MAKE_DPNHRESULT(0x230)
102 #define DPNERR_GROUPNOTEMPTY MAKE_DPNHRESULT(0x240)
103 #define DPNERR_HOSTING MAKE_DPNHRESULT(0x250)
104 #define DPNERR_HOSTREJECTEDCONNECTION MAKE_DPNHRESULT(0x260)
105 #define DPNERR_HOSTTERMINATEDSESSION MAKE_DPNHRESULT(0x270)
106 #define DPNERR_INCOMPLETEADDRESS MAKE_DPNHRESULT(0x280)
107 #define DPNERR_INVALIDADDRESSFORMAT MAKE_DPNHRESULT(0x290)
108 #define DPNERR_INVALIDAPPLICATION MAKE_DPNHRESULT(0x300)
109 #define DPNERR_INVALIDCOMMAND MAKE_DPNHRESULT(0x310)
110 #define DPNERR_INVALIDDEVICEADDRESS MAKE_DPNHRESULT(0x320)
111 #define DPNERR_INVALIDENDPOINT MAKE_DPNHRESULT(0x330)
112 #define DPNERR_INVALIDFLAGS MAKE_DPNHRESULT(0x340)
113 #define DPNERR_INVALIDGROUP MAKE_DPNHRESULT(0x350)
114 #define DPNERR_INVALIDHANDLE MAKE_DPNHRESULT(0x360)
115 #define DPNERR_INVALIDHOSTADDRESS MAKE_DPNHRESULT(0x370)
116 #define DPNERR_INVALIDINSTANCE MAKE_DPNHRESULT(0x380)
117 #define DPNERR_INVALIDINTERFACE MAKE_DPNHRESULT(0x390)
118 #define DPNERR_INVALIDOBJECT MAKE_DPNHRESULT(0x400)
119 #define DPNERR_INVALIDPASSWORD MAKE_DPNHRESULT(0x410)
120 #define DPNERR_INVALIDPLAYER MAKE_DPNHRESULT(0x420)
121 #define DPNERR_INVALIDPRIORITY MAKE_DPNHRESULT(0x430)
122 #define DPNERR_INVALIDSTRING MAKE_DPNHRESULT(0x440)
123 #define DPNERR_INVALIDURL MAKE_DPNHRESULT(0x450)
124 #define DPNERR_INVALIDVERSION MAKE_DPNHRESULT(0x460)
125 #define DPNERR_NOCAPS MAKE_DPNHRESULT(0x470)
126 #define DPNERR_NOCONNECTION MAKE_DPNHRESULT(0x480)
127 #define DPNERR_NOHOSTPLAYER MAKE_DPNHRESULT(0x490)
128 #define DPNERR_NOMOREADDRESSCOMPONENTS MAKE_DPNHRESULT(0x500)
129 #define DPNERR_NORESPONSE MAKE_DPNHRESULT(0x510)
130 #define DPNERR_NOTALLOWED MAKE_DPNHRESULT(0x520)
131 #define DPNERR_NOTHOST MAKE_DPNHRESULT(0x530)
132 #define DPNERR_NOTREADY MAKE_DPNHRESULT(0x540)
133 #define DPNERR_NOTREGISTERED MAKE_DPNHRESULT(0x550)
134 #define DPNERR_PLAYERALREADYINGROUP MAKE_DPNHRESULT(0x560)
135 #define DPNERR_PLAYERLOST MAKE_DPNHRESULT(0x570)
136 #define DPNERR_PLAYERNOTINGROUP MAKE_DPNHRESULT(0x580)
137 #define DPNERR_PLAYERNOTREACHABLE MAKE_DPNHRESULT(0x590)
138 #define DPNERR_SENDTOOLARGE MAKE_DPNHRESULT(0x600)
139 #define DPNERR_SESSIONFULL MAKE_DPNHRESULT(0x610)
140 #define DPNERR_TABLEFULL MAKE_DPNHRESULT(0x620)
141 #define DPNERR_TIMEDOUT MAKE_DPNHRESULT(0x630)
142 #define DPNERR_UNINITIALIZED MAKE_DPNHRESULT(0x640)
143 #define DPNERR_USERCANCEL MAKE_DPNHRESULT(0x650)
145 /*****************************************************************************
146 * DirectPlay8 defines
148 #define DPNOP_SYNC 0x80000000
149 #define DPNADDPLAYERTOGROUP_SYNC DPNOP_SYNC
150 #define DPNCANCEL_CONNECT 0x0001
151 #define DPNCANCEL_ENUM 0x0002
152 #define DPNCANCEL_SEND 0x0004
153 #define DPNCANCEL_ALL_OPERATIONS 0x8000
154 #define DPNCONNECT_SYNC DPNOP_SYNC
155 #define DPNCONNECT_OKTOQUERYFORADDRESSING 0x0001
156 #define DPNCREATEGROUP_SYNC DPNOP_SYNC
157 #define DPNDESTROYGROUP_SYNC DPNOP_SYNC
158 #define DPNENUM_PLAYERS 0x0001
159 #define DPNENUM_GROUPS 0x0010
160 #define DPNENUMHOSTS_SYNC DPNOP_SYNC
161 #define DPNENUMHOSTS_OKTOQUERYFORADDRESSING 0x0001
162 #define DPNENUMHOSTS_NOBROADCASTFALLBACK 0x0002
163 #define DPNENUMSERVICEPROVIDERS_ALL 0x0001
164 #define DPNGETSENDQUEUEINFO_PRIORITY_NORMAL 0x0001
165 #define DPNGETSENDQUEUEINFO_PRIORITY_HIGH 0x0002
166 #define DPNGETSENDQUEUEINFO_PRIORITY_LOW 0x0004
167 #define DPNGROUP_AUTODESTRUCT 0x0001
168 #define DPNHOST_OKTOQUERYFORADDRESSING 0x0001
169 #define DPNINFO_NAME 0x0001
170 #define DPNINFO_DATA 0x0002
171 #define DPNINITIALIZE_DISABLEPARAMVAL 0x0001
172 #define DPNLOBBY_REGISTER 0x0001
173 #define DPNLOBBY_UNREGISTER 0x0002
174 #define DPNPLAYER_LOCAL 0x0002
175 #define DPNPLAYER_HOST 0x0004
176 #define DPNREMOVEPLAYERFROMGROUP_SYNC DPNOP_SYNC
177 #define DPNSEND_SYNC DPNOP_SYNC
178 #define DPNSEND_NOCOPY 0x0001
179 #define DPNSEND_NOCOMPLETE 0x0002
180 #define DPNSEND_COMPLETEONPROCESS 0x0004
181 #define DPNSEND_GUARANTEED 0x0008
182 #define DPNSEND_NONSEQUENTIAL 0x0010
183 #define DPNSEND_NOLOOPBACK 0x0020
184 #define DPNSEND_PRIORITY_LOW 0x0040
185 #define DPNSEND_PRIORITY_HIGH 0x0080
186 #define DPNSESSION_CLIENT_SERVER 0x0001
187 #define DPNSESSION_MIGRATE_HOST 0x0004
188 #define DPNSESSION_NODPNSVR 0x0040
189 #define DPNSESSION_REQUIREPASSWORD 0x0080
190 #define DPNSETCLIENTINFO_SYNC DPNOP_SYNC
191 #define DPNSETGROUPINFO_SYNC DPNOP_SYNC
192 #define DPNSETPEERINFO_SYNC DPNOP_SYNC
193 #define DPNSETSERVERINFO_SYNC DPNOP_SYNC
194 #define DPNSPCAPS_SUPPORTSDPNSRV 0x0001
195 #define DPNSPCAPS_SUPPORTSBROADCAST 0x0002
196 #define DPNSPCAPS_SUPPORTSALLADAPTERS 0x0004
199 /*****************************************************************************
200 * DirectPlay8 structures Typedefs
202 typedef struct _DPN_APPLICATION_DESC {
206 GUID guidApplication;
208 DWORD dwCurrentPlayers;
209 WCHAR* pwszSessionName;
211 PVOID pvReservedData;
212 DWORD dwReservedDataSize;
213 PVOID pvApplicationReservedData;
214 DWORD dwApplicationReservedDataSize;
215 } DPN_APPLICATION_DESC, *PDPN_APPLICATION_DESC;
217 typedef struct _BUFFERDESC {
220 } BUFFERDESC, DPN_BUFFER_DESC, *PDPN_BUFFER_DESC, FAR * PBUFFERDESC;
222 typedef struct _DPN_CAPS {
225 DWORD dwConnectTimeout;
226 DWORD dwConnectRetries;
227 DWORD dwTimeoutUntilKeepAlive;
228 } DPN_CAPS, *PDPN_CAPS;
230 typedef struct _DPN_CONNECTION_INFO {
232 DWORD dwRoundTripLatencyMS;
233 DWORD dwThroughputBPS;
234 DWORD dwPeakThroughputBPS;
235 DWORD dwBytesSentGuaranteed;
236 DWORD dwPacketsSentGuaranteed;
237 DWORD dwBytesSentNonGuaranteed;
238 DWORD dwPacketsSentNonGuaranteed;
239 DWORD dwBytesRetried;
240 DWORD dwPacketsRetried;
241 DWORD dwBytesDropped;
242 DWORD dwPacketsDropped;
243 DWORD dwMessagesTransmittedHighPriority;
244 DWORD dwMessagesTimedOutHighPriority;
245 DWORD dwMessagesTransmittedNormalPriority;
246 DWORD dwMessagesTimedOutNormalPriority;
247 DWORD dwMessagesTransmittedLowPriority;
248 DWORD dwMessagesTimedOutLowPriority;
249 DWORD dwBytesReceivedGuaranteed;
250 DWORD dwPacketsReceivedGuaranteed;
251 DWORD dwBytesReceivedNonGuaranteed;
252 DWORD dwPacketsReceivedNonGuaranteed;
253 DWORD dwMessagesReceived;
254 } DPN_CONNECTION_INFO, *PDPN_CONNECTION_INFO;
256 typedef struct _DPN_GROUP_INFO {
263 } DPN_GROUP_INFO, *PDPN_GROUP_INFO;
265 typedef struct _DPN_PLAYER_INFO {
272 } DPN_PLAYER_INFO, *PDPN_PLAYER_INFO;
274 typedef struct _DPN_SERVICE_PROVIDER_INFO {
280 } DPN_SERVICE_PROVIDER_INFO, *PDPN_SERVICE_PROVIDER_INFO;
282 typedef struct _DPN_SP_CAPS {
286 DWORD dwDefaultEnumCount;
287 DWORD dwDefaultEnumRetryInterval;
288 DWORD dwDefaultEnumTimeout;
289 DWORD dwMaxEnumPayloadSize;
290 DWORD dwBuffersPerThread;
291 DWORD dwSystemBufferSize;
292 } DPN_SP_CAPS, *PDPN_SP_CAPS;
294 typedef struct _DPN_SECURITY_CREDENTIALS DPN_SECURITY_CREDENTIALS, *PDPN_SECURITY_CREDENTIALS;
295 typedef struct _DPN_SECURITY_DESC DPN_SECURITY_DESC, *PDPN_SECURITY_DESC;
297 typedef struct _DPNMSG_ADD_PLAYER_TO_GROUP {
300 PVOID pvGroupContext;
302 PVOID pvPlayerContext;
303 } DPNMSG_ADD_PLAYER_TO_GROUP, *PDPNMSG_ADD_PLAYER_TO_GROUP;
305 typedef struct _DPNMSG_ASYNC_OP_COMPLETE {
310 } DPNMSG_ASYNC_OP_COMPLETE, *PDPNMSG_ASYNC_OP_COMPLETE;
312 typedef struct _DPNMSG_CLIENT_INFO {
315 PVOID pvPlayerContext;
316 } DPNMSG_CLIENT_INFO, *PDPNMSG_CLIENT_INFO;
318 typedef struct _DPNMSG_CONNECT_COMPLETE {
323 PVOID pvApplicationReplyData;
324 DWORD dwApplicationReplyDataSize;
325 } DPNMSG_CONNECT_COMPLETE, *PDPNMSG_CONNECT_COMPLETE;
327 typedef struct _DPNMSG_CREATE_GROUP {
331 PVOID pvGroupContext;
332 } DPNMSG_CREATE_GROUP, *PDPNMSG_CREATE_GROUP;
334 typedef struct _DPNMSG_CREATE_PLAYER {
337 PVOID pvPlayerContext;
338 } DPNMSG_CREATE_PLAYER, *PDPNMSG_CREATE_PLAYER;
340 typedef struct _DPNMSG_DESTROY_GROUP {
343 PVOID pvGroupContext;
345 } DPNMSG_DESTROY_GROUP, *PDPNMSG_DESTROY_GROUP;
347 typedef struct _DPNMSG_DESTROY_PLAYER {
350 PVOID pvPlayerContext;
352 } DPNMSG_DESTROY_PLAYER, *PDPNMSG_DESTROY_PLAYER;
354 typedef struct _DPNMSG_ENUM_HOSTS_QUERY {
356 IDirectPlay8Address* pAddressSender;
357 IDirectPlay8Address* pAddressDevice;
358 PVOID pvReceivedData;
359 DWORD dwReceivedDataSize;
360 DWORD dwMaxResponseDataSize;
361 PVOID pvResponseData;
362 DWORD dwResponseDataSize;
363 PVOID pvResponseContext;
364 } DPNMSG_ENUM_HOSTS_QUERY, *PDPNMSG_ENUM_HOSTS_QUERY;
366 typedef struct _DPNMSG_ENUM_HOSTS_RESPONSE {
368 IDirectPlay8Address* pAddressSender;
369 IDirectPlay8Address* pAddressDevice;
370 const DPN_APPLICATION_DESC* pApplicationDescription;
371 PVOID pvResponseData;
372 DWORD dwResponseDataSize;
374 DWORD dwRoundTripLatencyMS;
375 } DPNMSG_ENUM_HOSTS_RESPONSE, *PDPNMSG_ENUM_HOSTS_RESPONSE;
377 typedef struct _DPNMSG_GROUP_INFO {
380 PVOID pvGroupContext;
381 } DPNMSG_GROUP_INFO, *PDPNMSG_GROUP_INFO;
383 typedef struct _DPNMSG_HOST_MIGRATE {
386 PVOID pvPlayerContext;
387 } DPNMSG_HOST_MIGRATE, *PDPNMSG_HOST_MIGRATE;
389 typedef struct _DPNMSG_INDICATE_CONNECT {
391 PVOID pvUserConnectData;
392 DWORD dwUserConnectDataSize;
394 DWORD dwReplyDataSize;
395 PVOID pvReplyContext;
396 PVOID pvPlayerContext;
397 IDirectPlay8Address* pAddressPlayer;
398 IDirectPlay8Address* pAddressDevice;
399 } DPNMSG_INDICATE_CONNECT, *PDPNMSG_INDICATE_CONNECT;
401 typedef struct _DPNMSG_INDICATED_CONNECT_ABORTED {
403 PVOID pvPlayerContext;
404 } DPNMSG_INDICATED_CONNECT_ABORTED, *PDPNMSG_INDICATED_CONNECT_ABORTED;
406 typedef struct _DPNMSG_PEER_INFO {
409 PVOID pvPlayerContext;
410 } DPNMSG_PEER_INFO, *PDPNMSG_PEER_INFO;
412 typedef struct _DPNMSG_RECEIVE {
415 PVOID pvPlayerContext;
417 DWORD dwReceiveDataSize;
418 DPNHANDLE hBufferHandle;
419 } DPNMSG_RECEIVE, *PDPNMSG_RECEIVE;
421 typedef struct _DPNMSG_REMOVE_PLAYER_FROM_GROUP {
424 PVOID pvGroupContext;
426 PVOID pvPlayerContext;
427 } DPNMSG_REMOVE_PLAYER_FROM_GROUP, *PDPNMSG_REMOVE_PLAYER_FROM_GROUP;
429 typedef struct _DPNMSG_RETURN_BUFFER {
434 } DPNMSG_RETURN_BUFFER, *PDPNMSG_RETURN_BUFFER;
436 typedef struct _DPNMSG_SEND_COMPLETE {
442 } DPNMSG_SEND_COMPLETE, *PDPNMSG_SEND_COMPLETE;
444 typedef struct _DPNMSG_SERVER_INFO {
447 PVOID pvPlayerContext;
448 } DPNMSG_SERVER_INFO, *PDPNMSG_SERVER_INFO;
450 typedef struct _DPNMSG_TERMINATE_SESSION {
453 PVOID pvTerminateData;
454 DWORD dwTerminateDataSize;
455 } DPNMSG_TERMINATE_SESSION, *PDPNMSG_TERMINATE_SESSION;
458 /*****************************************************************************
459 * Predeclare the interfaces
461 DEFINE_GUID(CLSID_DirectPlay8Peer, 0x286f484d,0x375e,0x4458,0xa2,0x72,0xb1,0x38,0xe2,0xf8,0xa,0x6a);
462 DEFINE_GUID(CLSID_DirectPlay8Client, 0x743f1dc6,0x5aba,0x429f,0x8b,0xdf,0xc5,0x4d,0x3,0x25,0x3d,0xc2);
463 DEFINE_GUID(CLSID_DirectPlay8Server, 0xda825e1b,0x6830,0x43d7,0x83,0x5d,0xb,0x5a,0xd8,0x29,0x56,0xa2);
465 DEFINE_GUID(IID_IDirectPlay8Peer, 0x5102dacf,0x241b,0x11d3,0xae,0xa7,0x0,0x60,0x97,0xb0,0x14,0x11);
466 typedef struct IDirectPlay8Peer *PDIRECTPLAY8PEER;
467 DEFINE_GUID(IID_IDirectPlay8Client, 0x5102dacd,0x241b,0x11d3,0xae,0xa7,0x0,0x60,0x97,0xb0,0x14,0x11);
468 typedef struct IDirectPlay8Client *PDIRECTPLAY8CLIENT;
469 DEFINE_GUID(IID_IDirectPlay8Server, 0x5102dace,0x241b,0x11d3,0xae,0xa7,0x0,0x60,0x97,0xb0,0x14,0x11);
470 typedef struct IDirectPlay8Server *PDIRECTPLAY8SERVER;
472 DEFINE_GUID(CLSID_DP8SP_IPX, 0x53934290,0x628d,0x11d2,0xae,0xf,0x0,0x60,0x97,0xb0,0x14,0x11);
473 DEFINE_GUID(CLSID_DP8SP_TCPIP, 0xebfe7ba0,0x628d,0x11d2,0xae,0xf,0x0,0x60,0x97,0xb0,0x14,0x11);
474 DEFINE_GUID(CLSID_DP8SP_SERIAL, 0x743b5d60,0x628d,0x11d2,0xae,0xf,0x0,0x60,0x97,0xb0,0x14,0x11);
475 DEFINE_GUID(CLSID_DP8SP_MODEM, 0x6d4a3650,0x628d,0x11d2,0xae,0xf,0x0,0x60,0x97,0xb0,0x14,0x11);
478 typedef struct IDirectPlay8LobbiedApplication *PDNLOBBIEDAPPLICATION;
479 typedef struct IDirectPlay8Address IDirectPlay8Address;
482 /*****************************************************************************
483 * IDirectPlay8Client interface
485 #define INTERFACE IDirectPlay8Client
486 #define IDirectPlay8Client_METHODS \
488 STDMETHOD(Initialize)(THIS_ PVOID CONST pvUserContext, CONST PFNDPNMESSAGEHANDLER pfn, CONST DWORD dwFlags) PURE; \
489 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; \
490 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; \
491 STDMETHOD(CancelAsyncOperation)(THIS_ CONST DPNHANDLE hAsyncHandle, CONST DWORD dwFlags) PURE; \
492 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; \
493 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; \
494 STDMETHOD(GetSendQueueInfo)(THIS_ DWORD * CONST pdwNumMsgs, DWORD * CONST pdwNumBytes, CONST DWORD dwFlags) PURE; \
495 STDMETHOD(GetApplicationDesc)(THIS_ DPN_APPLICATION_DESC * CONST pAppDescBuffer, DWORD * CONST pcbDataSize, CONST DWORD dwFlags) PURE; \
496 STDMETHOD(SetClientInfo)(THIS_ CONST DPN_PLAYER_INFO * CONST pdpnPlayerInfo, PVOID CONST pvAsyncContext, DPNHANDLE * CONST phAsyncHandle, CONST DWORD dwFlags) PURE; \
497 STDMETHOD(GetServerInfo)(THIS_ DPN_PLAYER_INFO * CONST pdpnPlayerInfo, DWORD * CONST pdwSize, CONST DWORD dwFlags) PURE; \
498 STDMETHOD(GetServerAddress)(THIS_ IDirectPlay8Address ** CONST pAddress, CONST DWORD dwFlags) PURE; \
499 STDMETHOD(Close)(THIS_ CONST DWORD dwFlags) PURE; \
500 STDMETHOD(ReturnBuffer)(THIS_ CONST DPNHANDLE hBufferHandle, CONST DWORD dwFlags) PURE; \
501 STDMETHOD(GetCaps)(THIS_ DPN_CAPS * CONST pdpCaps, CONST DWORD dwFlags) PURE; \
502 STDMETHOD(SetCaps)(THIS_ CONST DPN_CAPS * CONST pdpCaps, CONST DWORD dwFlags) PURE; \
503 STDMETHOD(SetSPCaps)(THIS_ CONST GUID * CONST pguidSP, CONST DPN_SP_CAPS * CONST pdpspCaps, CONST DWORD dwFlags ) PURE; \
504 STDMETHOD(GetSPCaps)(THIS_ CONST GUID * CONST pguidSP, DPN_SP_CAPS * CONST pdpspCaps, CONST DWORD dwFlags) PURE; \
505 STDMETHOD(GetConnectionInfo)(THIS_ DPN_CONNECTION_INFO * CONST pdpConnectionInfo, CONST DWORD dwFlags) PURE; \
506 STDMETHOD(RegisterLobby)(THIS_ CONST DPNHANDLE dpnHandle, struct IDirectPlay8LobbiedApplication * CONST pIDP8LobbiedApplication, CONST DWORD dwFlags) PURE;
507 ICOM_DEFINE(IDirectPlay8Client,IUnknown)
511 /*** IUnknown methods ***/
512 #define IDirectPlay8Client_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
513 #define IDirectPlay8Client_AddRef(p) (p)->lpVtbl->AddRef(p)
514 #define IDirectPlay8Client_Release(p) (p)->lpVtbl->Release(p)
515 /*** IDirectPlay8Client methods ***/
516 #define IDirectPlay8Client_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c)
517 #define IDirectPlay8Client_EnumServiceProviders(p,a,b,c,d,e,f) (p)->lpVtbl->EnumServiceProviders(p,a,b,c,d,e,f)
518 #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)
519 #define IDirectPlay8Client_CancelAsyncOperation(p,a,b) (p)->lpVtbl->CancelAsyncOperation(p,a,b)
520 #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)
521 #define IDirectPlay8Client_Send(p,a,b,c,d,e,f) (p)->lpVtbl->Send(p,a,b,c,d,e,f)
522 #define IDirectPlay8Client_GetSendQueueInfo(p,a,b,c) (p)->lpVtbl->GetSendQueueInfo(p,a,b,c)
523 #define IDirectPlay8Client_GetApplicationDesc(p,a,b,c) (p)->lpVtbl->GetApplicationDesc(p,a,b,c)
524 #define IDirectPlay8Client_SetClientInfo(p,a,b,c,d) (p)->lpVtbl->SetClientInfo(p,a,b,c,d)
525 #define IDirectPlay8Client_GetServerInfo(p,a,b,c) (p)->lpVtbl->GetServerInfo(p,a,b,c)
526 #define IDirectPlay8Client_GetServerAddress(p,a,b) (p)->lpVtbl->GetServerAddress(p,a,b)
527 #define IDirectPlay8Client_Close(p,a) (p)->lpVtbl->Close(p,a)
528 #define IDirectPlay8Client_ReturnBuffer(p,a,b) (p)->lpVtbl->ReturnBuffer(p,a,b)
529 #define IDirectPlay8Client_GetCaps(p,a,b) (p)->lpVtbl->GetCaps(p,a,b)
530 #define IDirectPlay8Client_SetCaps(p,a,b) (p)->lpVtbl->SetCaps(p,a,b)
531 #define IDirectPlay8Client_SetSPCaps(p,a,b,c) (p)->lpVtbl->SetSPCaps(p,a,b,c)
532 #define IDirectPlay8Client_GetSPCaps(p,a,b,c) (p)->lpVtbl->GetSPCaps(p,a,b,c)
533 #define IDirectPlay8Client_GetConnectionInfo(p,a,b) (p)->lpVtbl->GetConnectionInfo(p,a,b)
534 #define IDirectPlay8Client_RegisterLobby(p,a,b,c) (p)->lpVtbl->RegisterLobby(p,a,b,c)
537 /*****************************************************************************
538 * IDirectPlay8Server interface
540 #define INTERFACE IDirectPlay8Server
541 #define IDirectPlay8Server_METHODS \
543 STDMETHOD(Initialize)(THIS_ PVOID CONST pvUserContext, CONST PFNDPNMESSAGEHANDLER pfn, CONST DWORD dwFlags) PURE; \
544 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; \
545 STDMETHOD(CancelAsyncOperation)(THIS_ CONST DPNHANDLE hAsyncHandle, CONST DWORD dwFlags) PURE; \
546 STDMETHOD(GetSendQueueInfo)(THIS_ CONST DPNID dpnid, DWORD * CONST pdwNumMsgs, DWORD * CONST pdwNumBytes, CONST DWORD dwFlags) PURE; \
547 STDMETHOD(GetApplicationDesc)(THIS_ DPN_APPLICATION_DESC * CONST pAppDescBuffer, DWORD * CONST pcbDataSize, CONST DWORD dwFlags) PURE; \
548 STDMETHOD(SetServerInfo)(THIS_ CONST DPN_PLAYER_INFO * CONST pdpnPlayerInfo, PVOID CONST pvAsyncContext, DPNHANDLE * CONST phAsyncHandle, CONST DWORD dwFlags) PURE; \
549 STDMETHOD(GetClientInfo)(THIS_ CONST DPNID dpnid, DPN_PLAYER_INFO * CONST pdpnPlayerInfo, DWORD * CONST pdwSize, CONST DWORD dwFlags) PURE; \
550 STDMETHOD(GetClientAddress)(THIS_ CONST DPNID dpnid, IDirectPlay8Address ** CONST pAddress, CONST DWORD dwFlags) PURE; \
551 STDMETHOD(GetLocalHostAddresses)(THIS_ IDirectPlay8Address ** CONST prgpAddress, DWORD * CONST pcAddress, CONST DWORD dwFlags) PURE; \
552 STDMETHOD(SetApplicationDesc)(THIS_ CONST DPN_APPLICATION_DESC * CONST pad, CONST DWORD dwFlags) PURE; \
553 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; \
554 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; \
555 STDMETHOD(CreateGroup)(THIS_ CONST DPN_GROUP_INFO * CONST pdpnGroupInfo, void * CONST pvGroupContext, void * CONST pvAsyncContext, DPNHANDLE * CONST phAsyncHandle, CONST DWORD dwFlags) PURE; \
556 STDMETHOD(DestroyGroup)(THIS_ CONST DPNID idGroup, PVOID CONST pvAsyncContext, DPNHANDLE * CONST phAsyncHandle, CONST DWORD dwFlags) PURE; \
557 STDMETHOD(AddPlayerToGroup)(THIS_ CONST DPNID idGroup, CONST DPNID idClient, PVOID CONST pvAsyncContext, DPNHANDLE * CONST phAsyncHandle, CONST DWORD dwFlags) PURE; \
558 STDMETHOD(RemovePlayerFromGroup)(THIS_ CONST DPNID idGroup, CONST DPNID idClient, PVOID CONST pvAsyncContext, DPNHANDLE * CONST phAsyncHandle, CONST DWORD dwFlags) PURE; \
559 STDMETHOD(SetGroupInfo)(THIS_ CONST DPNID dpnid, DPN_GROUP_INFO * CONST pdpnGroupInfo, PVOID CONST pvAsyncContext, DPNHANDLE * CONST phAsyncHandle, CONST DWORD dwFlags) PURE; \
560 STDMETHOD(GetGroupInfo)(THIS_ CONST DPNID dpnid, DPN_GROUP_INFO * CONST pdpnGroupInfo, DWORD * CONST pdwSize, CONST DWORD dwFlags) PURE; \
561 STDMETHOD(EnumPlayersAndGroups)(THIS_ DPNID * CONST prgdpnid, DWORD * CONST pcdpnid, CONST DWORD dwFlags) PURE; \
562 STDMETHOD(EnumGroupMembers)(THIS_ CONST DPNID dpnid, DPNID * CONST prgdpnid, DWORD * CONST pcdpnid, CONST DWORD dwFlags) PURE; \
563 STDMETHOD(Close)(THIS_ CONST DWORD dwFlags) PURE; \
564 STDMETHOD(DestroyClient)(THIS_ CONST DPNID dpnidClient, CONST void * CONST pvDestroyData, CONST DWORD dwDestroyDataSize, CONST DWORD dwFlags) PURE; \
565 STDMETHOD(ReturnBuffer)(THIS_ CONST DPNHANDLE hBufferHandle, CONST DWORD dwFlags) PURE; \
566 STDMETHOD(GetPlayerContext)(THIS_ CONST DPNID dpnid, PVOID * CONST ppvPlayerContext, CONST DWORD dwFlags) PURE; \
567 STDMETHOD(GetGroupContext)(THIS_ CONST DPNID dpnid, PVOID * CONST ppvGroupContext, CONST DWORD dwFlags) PURE; \
568 STDMETHOD(GetCaps)(THIS_ DPN_CAPS * CONST pdpCaps, CONST DWORD dwFlags) PURE; \
569 STDMETHOD(SetCaps)(THIS_ CONST DPN_CAPS * CONST pdpCaps, CONST DWORD dwFlags) PURE; \
570 STDMETHOD(SetSPCaps)(THIS_ CONST GUID * CONST pguidSP, CONST DPN_SP_CAPS * CONST pdpspCaps, CONST DWORD dwFlags ) PURE; \
571 STDMETHOD(GetSPCaps)(THIS_ CONST GUID * CONST pguidSP, DPN_SP_CAPS * CONST pdpspCaps, CONST DWORD dwFlags) PURE; \
572 STDMETHOD(GetConnectionInfo)(THIS_ CONST DPNID dpnid, DPN_CONNECTION_INFO * CONST pdpConnectionInfo, CONST DWORD dwFlags) PURE; \
573 STDMETHOD(RegisterLobby)(THIS_ CONST DPNHANDLE dpnHandle, struct IDirectPlay8LobbiedApplication * CONST pIDP8LobbiedApplication, CONST DWORD dwFlags) PURE;
574 ICOM_DEFINE(IDirectPlay8Server,IUnknown)
578 /*** IUnknown methods ***/
579 #define IDirectPlay8Server_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
580 #define IDirectPlay8Server_AddRef(p) (p)->lpVtbl->AddRef(p)
581 #define IDirectPlay8Server_Release(p) (p)->lpVtbl->Release(p)
582 /*** IDirectPlay8Server methods ***/
583 #define IDirectPlay8Server_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c)
584 #define IDirectPlay8Server_EnumServiceProviders(p,a,b,c,d,e,f) (p)->lpVtbl->EnumServiceProviders(p,a,b,c,d,e,f)
585 #define IDirectPlay8Server_CancelAsyncOperation(p,a,b) (p)->lpVtbl->CancelAsyncOperation(p,a,b)
586 #define IDirectPlay8Server_GetSendQueueInfo(p,a,b,c,d) (p)->lpVtbl->GetSendQueueInfo(p,a,b,c,d)
587 #define IDirectPlay8Server_GetApplicationDesc(p,a,b,c) (p)->lpVtbl->GetApplicationDesc(p,a,b,c)
588 #define IDirectPlay8Server_SetServerInfo(p,a,b,c,d) (p)->lpVtbl->SetServerInfo(p,a,b,c,d)
589 #define IDirectPlay8Server_GetClientInfo(p,a,b,c,d) (p)->lpVtbl->GetClientInfo(p,a,b,c,d)
590 #define IDirectPlay8Server_GetClientAddress(p,a,b,c) (p)->lpVtbl->GetClientAddress(p,a,b,c)
591 #define IDirectPlay8Server_GetLocalHostAddresses(p,a,b,c) (p)->lpVtbl->GetLocalHostAddresses(p,a,b,c)
592 #define IDirectPlay8Server_SetApplicationDesc(p,a,b) (p)->lpVtbl->SetApplicationDesc(p,a,b)
593 #define IDirectPlay8Server_Host(p,a,b,c,d,e,f,g) (p)->lpVtbl->Host(p,a,b,c,d,e,f,g)
594 #define IDirectPlay8Server_SendTo(p,a,b,c,d,e,f,g) (p)->lpVtbl->SendTo(p,a,b,c,d,e,f,g)
595 #define IDirectPlay8Server_CreateGroup(p,a,b,c,d,e) (p)->lpVtbl->CreateGroup(p,a,b,c,d,e)
596 #define IDirectPlay8Server_DestroyGroup(p,a,b,c,d) (p)->lpVtbl->DestroyGroup(p,a,b,c,d)
597 #define IDirectPlay8Server_AddPlayerToGroup(p,a,b,c,d,e) (p)->lpVtbl->AddPlayerToGroup(p,a,b,c,d,e)
598 #define IDirectPlay8Server_RemovePlayerFromGroup(p,a,b,c,d,e) (p)->lpVtbl->RemovePlayerFromGroup(p,a,b,c,d,e)
599 #define IDirectPlay8Server_SetGroupInfo(p,a,b,c,d,e) (p)->lpVtbl->SetGroupInfo(p,a,b,c,d,e)
600 #define IDirectPlay8Server_GetGroupInfo(p,a,b,c,d) (p)->lpVtbl->GetGroupInfo(p,a,b,c,d)
601 #define IDirectPlay8Server_EnumPlayersAndGroups(p,a,b,c) (p)->lpVtbl->EnumPlayersAndGroups(p,a,b,c)
602 #define IDirectPlay8Server_EnumGroupMembers(p,a,b,c,d) (p)->lpVtbl->EnumGroupMembers(p,a,b,c,d)
603 #define IDirectPlay8Server_Close(p,a) (p)->lpVtbl->Close(p,a)
604 #define IDirectPlay8Server_DestroyClient(p,a,b,c,d) (p)->lpVtbl->DestroyClient(p,a,b,c,d)
605 #define IDirectPlay8Server_ReturnBuffer(p,a,b) (p)->lpVtbl->ReturnBuffer(p,a,b)
606 #define IDirectPlay8Server_GetPlayerContext(p,a,b,c) (p)->lpVtbl->GetPlayerContext(p,a,b,c)
607 #define IDirectPlay8Server_GetGroupContext(p,a,b,c) (p)->lpVtbl->GetGroupContext(p,a,b,c)
608 #define IDirectPlay8Server_GetCaps(p,a,b) (p)->lpVtbl->GetCaps(p,a,b)
609 #define IDirectPlay8Server_SetCaps(p,a,b) (p)->lpVtbl->SetCaps(p,a,b)
610 #define IDirectPlay8Server_SetSPCaps(p,a,b,c) (p)->lpVtbl->SetSPCaps(p,a,b,c)
611 #define IDirectPlay8Server_GetSPCaps(p,a,b,c) (p)->lpVtbl->GetSPCaps(p,a,b,c)
612 #define IDirectPlay8Server_GetConnectionInfo(p,a,b,c) (p)->lpVtbl->GetConnectionInfo(p,a,b,c)
613 #define IDirectPlay8Server_RegisterLobby(p,a,b,c) (p)->lpVtbl->RegisterLobby(p,a,b,c)
616 /*****************************************************************************
617 * IDirectPlay8Peer interface
619 #define INTERFACE IDirectPlay8Peer
620 #define IDirectPlay8Peer_METHODS \
622 STDMETHOD(Initialize)(THIS_ PVOID CONST pvUserContext, CONST PFNDPNMESSAGEHANDLER pfn, CONST DWORD dwFlags) PURE; \
623 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; \
624 STDMETHOD(CancelAsyncOperation)(THIS_ CONST DPNHANDLE hAsyncHandle, CONST DWORD dwFlags) PURE; \
625 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; \
626 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; \
627 STDMETHOD(GetSendQueueInfo)(THIS_ CONST DPNID dpnid, DWORD* CONST pdwNumMsgs, DWORD* CONST pdwNumBytes, CONST DWORD dwFlags) PURE; \
628 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; \
629 STDMETHOD(GetApplicationDesc)(THIS_ DPN_APPLICATION_DESC* CONST pAppDescBuffer, DWORD* CONST pcbDataSize, CONST DWORD dwFlags) PURE; \
630 STDMETHOD(SetApplicationDesc)(THIS_ CONST DPN_APPLICATION_DESC* CONST pad, CONST DWORD dwFlags) PURE; \
631 STDMETHOD(CreateGroup)(THIS_ CONST DPN_GROUP_INFO* CONST pdpnGroupInfo, void* CONST pvGroupContext, void* CONST pvAsyncContext, DPNHANDLE* CONST phAsyncHandle, CONST DWORD dwFlags) PURE; \
632 STDMETHOD(DestroyGroup)(THIS_ CONST DPNID idGroup, PVOID CONST pvAsyncContext, DPNHANDLE* CONST phAsyncHandle, CONST DWORD dwFlags) PURE; \
633 STDMETHOD(AddPlayerToGroup)(THIS_ CONST DPNID idGroup, CONST DPNID idClient, PVOID CONST pvAsyncContext, DPNHANDLE* CONST phAsyncHandle, CONST DWORD dwFlags) PURE; \
634 STDMETHOD(RemovePlayerFromGroup)(THIS_ CONST DPNID idGroup, CONST DPNID idClient, PVOID CONST pvAsyncContext, DPNHANDLE* CONST phAsyncHandle, CONST DWORD dwFlags) PURE; \
635 STDMETHOD(SetGroupInfo)(THIS_ CONST DPNID dpnid, DPN_GROUP_INFO* CONST pdpnGroupInfo,PVOID CONST pvAsyncContext, DPNHANDLE* CONST phAsyncHandle, CONST DWORD dwFlags) PURE; \
636 STDMETHOD(GetGroupInfo)(THIS_ CONST DPNID dpnid, DPN_GROUP_INFO* CONST pdpnGroupInfo, DWORD* CONST pdwSize, CONST DWORD dwFlags) PURE; \
637 STDMETHOD(EnumPlayersAndGroups)(THIS_ DPNID* CONST prgdpnid, DWORD* CONST pcdpnid, CONST DWORD dwFlags) PURE; \
638 STDMETHOD(EnumGroupMembers)(THIS_ CONST DPNID dpnid, DPNID* CONST prgdpnid, DWORD* CONST pcdpnid, CONST DWORD dwFlags) PURE; \
639 STDMETHOD(SetPeerInfo)(THIS_ CONST DPN_PLAYER_INFO* CONST pdpnPlayerInfo,PVOID CONST pvAsyncContext, DPNHANDLE* CONST phAsyncHandle, CONST DWORD dwFlags) PURE; \
640 STDMETHOD(GetPeerInfo)(THIS_ CONST DPNID dpnid, DPN_PLAYER_INFO* CONST pdpnPlayerInfo, DWORD* CONST pdwSize, CONST DWORD dwFlags) PURE; \
641 STDMETHOD(GetPeerAddress)(THIS_ CONST DPNID dpnid, IDirectPlay8Address** CONST pAddress, CONST DWORD dwFlags) PURE; \
642 STDMETHOD(GetLocalHostAddresses)(THIS_ IDirectPlay8Address** CONST prgpAddress, DWORD* CONST pcAddress, CONST DWORD dwFlags) PURE; \
643 STDMETHOD(Close)(THIS_ CONST DWORD dwFlags) PURE; \
644 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; \
645 STDMETHOD(DestroyPeer)(THIS_ CONST DPNID dpnidClient, CONST void* CONST pvDestroyData, CONST DWORD dwDestroyDataSize, CONST DWORD dwFlags) PURE; \
646 STDMETHOD(ReturnBuffer)(THIS_ CONST DPNHANDLE hBufferHandle, CONST DWORD dwFlags) PURE; \
647 STDMETHOD(GetPlayerContext)(THIS_ CONST DPNID dpnid,PVOID* CONST ppvPlayerContext, CONST DWORD dwFlags) PURE; \
648 STDMETHOD(GetGroupContext)(THIS_ CONST DPNID dpnid,PVOID* CONST ppvGroupContext, CONST DWORD dwFlags) PURE; \
649 STDMETHOD(GetCaps)(THIS_ DPN_CAPS* CONST pdpCaps, CONST DWORD dwFlags) PURE; \
650 STDMETHOD(SetCaps)(THIS_ CONST DPN_CAPS* CONST pdpCaps, CONST DWORD dwFlags) PURE; \
651 STDMETHOD(SetSPCaps)(THIS_ CONST GUID* CONST pguidSP, CONST DPN_SP_CAPS* CONST pdpspCaps, CONST DWORD dwFlags ) PURE; \
652 STDMETHOD(GetSPCaps)(THIS_ CONST GUID* CONST pguidSP, DPN_SP_CAPS* CONST pdpspCaps, CONST DWORD dwFlags) PURE; \
653 STDMETHOD(GetConnectionInfo)(THIS_ CONST DPNID dpnid, DPN_CONNECTION_INFO* CONST pdpConnectionInfo, CONST DWORD dwFlags) PURE; \
654 STDMETHOD(RegisterLobby)(THIS_ CONST DPNHANDLE dpnHandle, struct IDirectPlay8LobbiedApplication* CONST pIDP8LobbiedApplication, CONST DWORD dwFlags) PURE; \
655 STDMETHOD(TerminateSession)(THIS_ void* CONST pvTerminateData, CONST DWORD dwTerminateDataSize, CONST DWORD dwFlags) PURE;
656 ICOM_DEFINE(IDirectPlay8Peer, IUnknown)
660 /*** IUnknown methods ***/
661 #define IDirectPlay8Peer_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
662 #define IDirectPlay8Peer_AddRef(p) (p)->lpVtbl->AddRef(p)
663 #define IDirectPlay8Peer_Release(p) (p)->lpVtbl->Release(p)
664 /*** IDirectPlay8Peer methods ***/
665 #define IDirectPlay8Peer_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c)
666 #define IDirectPlay8Peer_EnumServiceProviders(p,a,b,c,d,e,f) (p)->lpVtbl->EnumServiceProviders(p,a,b,c,d,e,f)
667 #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)
668 #define IDirectPlay8Peer_CancelAsyncOperation(p,a,b) (p)->lpVtbl->CancelAsyncOperation(p,a,b)
669 #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)
670 #define IDirectPlay8Peer_SendTo(p,a,b,c,d,e,f,g) (p)->lpVtbl->SendTo(p,a,b,c,d,e,f,g)
671 #define IDirectPlay8Peer_GetSendQueueInfo(p,a,b,c,d) (p)->lpVtbl->GetSendQueueInfo(p,a,b,c,d)
672 #define IDirectPlay8Peer_Host(p,a,b,c,d,e,f,g) (p)->lpVtbl->Host(p,a,b,c,d,e,f,g)
673 #define IDirectPlay8Peer_GetApplicationDesc(p,a,b,c) (p)->lpVtbl->GetApplicationDesc(p,a,b,c)
674 #define IDirectPlay8Peer_SetApplicationDesc(p,a,b) (p)->lpVtbl->SetApplicationDesc(p,a,b)
675 #define IDirectPlay8Peer_CreateGroup(p,a,b,c,d,e) (p)->lpVtbl->CreateGroup(p,a,b,c,d,e)
676 #define IDirectPlay8Peer_DestroyGroup(p,a,b,c,d) (p)->lpVtbl->DestroyGroup(p,a,b,c,d)
677 #define IDirectPlay8Peer_AddPlayerToGroup(p,a,b,c,d,e) (p)->lpVtbl->AddPlayerToGroup(p,a,b,c,d,e)
678 #define IDirectPlay8Peer_RemovePlayerFromGroup(p,a,b,c,d,e) (p)->lpVtbl->RemovePlayerFromGroup(p,a,b,c,d,e)
679 #define IDirectPlay8Peer_SetGroupInfo(p,a,b,c,d,e) (p)->lpVtbl->SetGroupInfo(p,a,b,c,d,e)
680 #define IDirectPlay8Peer_GetGroupInfo(p,a,b,c,d) (p)->lpVtbl->GetGroupInfo(p,a,b,c,d)
681 #define IDirectPlay8Peer_EnumPlayersAndGroups(p,a,b,c) (p)->lpVtbl->EnumPlayersAndGroups(p,a,b,c)
682 #define IDirectPlay8Peer_EnumGroupMembers(p,a,b,c,d) (p)->lpVtbl->EnumGroupMembers(p,a,b,c,d)
683 #define IDirectPlay8Peer_SetPeerInfo(p,a,b,c,d) (p)->lpVtbl->SetPeerInfo(p,a,b,c,d)
684 #define IDirectPlay8Peer_GetPeerInfo(p,a,b,c,d) (p)->lpVtbl->GetPeerInfo(p,a,b,c,d)
685 #define IDirectPlay8Peer_GetPeerAddress(p,a,b,c) (p)->lpVtbl->GetPeerAddress(p,a,b,c)
686 #define IDirectPlay8Peer_GetLocalHostAddresses(p,a,b,c) (p)->lpVtbl->GetLocalHostAddresses(p,a,b,c)
687 #define IDirectPlay8Peer_Close(p,a) (p)->lpVtbl->Close(p,a)
688 #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)
689 #define IDirectPlay8Peer_DestroyPeer(p,a,b,c,d) (p)->lpVtbl->DestroyPeer(p,a,b,c,d)
690 #define IDirectPlay8Peer_ReturnBuffer(p,a,b) (p)->lpVtbl->ReturnBuffer(p,a,b)
691 #define IDirectPlay8Peer_GetPlayerContext(p,a,b,c) (p)->lpVtbl->GetPlayerContext(p,a,b,c)
692 #define IDirectPlay8Peer_GetGroupContext(p,a,b,c) (p)->lpVtbl->GetGroupContext(p,a,b,c)
693 #define IDirectPlay8Peer_GetCaps(p,a,b) (p)->lpVtbl->GetCaps(p,a,b)
694 #define IDirectPlay8Peer_SetCaps(p,a,b) (p)->lpVtbl->SetCaps(p,a,b)
695 #define IDirectPlay8Peer_SetSPCaps(p,a,b,c) (p)->lpVtbl->SetSPCaps(p,a,b,c)
696 #define IDirectPlay8Peer_GetSPCaps(p,a,b,c) (p)->lpVtbl->GetSPCaps(p,a,b,c)
697 #define IDirectPlay8Peer_GetConnectionInfo(p,a,b,c) (p)->lpVtbl->GetConnectionInfo(p,a,b,c)
698 #define IDirectPlay8Peer_RegisterLobby(p,a,b,c) (p)->lpVtbl->RegisterLobby(p,a,b,c)
699 #define IDirectPlay8Peer_TerminateSession(p,a,b,c) (p)->lpVtbl->TerminateSession(p,a,b,c)