kernelbase: Do not forcefully reset console_flags to 0.
[wine/zf.git] / include / dplay8.h
blob13bdfb023951c624baa24e0949d567819f2fb6d9
1 /*
2 * Copyright (C) 2003-2005 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 #ifndef __WINE_DPLAY8_H
20 #define __WINE_DPLAY8_H
22 #include <ole2.h>
23 #include <dpaddr.h>
25 #ifdef __cplusplus
26 extern "C" {
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)
60 #define DPN_MSGID_CREATE_THREAD (DPN_MSGID_OFFSET | 0x0017)
61 #define DPN_MSGID_DESTROY_THREAD (DPN_MSGID_OFFSET | 0x0018)
62 #define DPN_MSGID_NAT_RESOLVER_QUERY (DPN_MSGID_OFFSET | 0x0101)
64 /*****************************************************************************
65 * DirectPlay8 Errors
67 #define _DPN_FACILITY_CODE 0x015
68 #define _DPNHRESULT_BASE 0x8000
69 #define MAKE_DPNHRESULT(code) MAKE_HRESULT(1, _DPN_FACILITY_CODE, (code + _DPNHRESULT_BASE))
71 #define DPNSUCCESS_EQUAL MAKE_HRESULT(0, _DPN_FACILITY_CODE, (0x05 + _DPNHRESULT_BASE))
72 #define DPNSUCCESS_NOTEQUAL MAKE_HRESULT(0, _DPN_FACILITY_CODE, (0x0A + _DPNHRESULT_BASE))
73 #define DPNSUCCESS_PENDING MAKE_HRESULT(0, _DPN_FACILITY_CODE, (0x0E + _DPNHRESULT_BASE))
75 #define DPN_OK S_OK
76 #define DPNERR_GENERIC E_FAIL
77 #define DPNERR_INVALIDPARAM E_INVALIDARG
78 #define DPNERR_UNSUPPORTED E_NOTIMPL
79 #define DPNERR_NOINTERFACE E_NOINTERFACE
80 #define DPNERR_OUTOFMEMORY E_OUTOFMEMORY
81 #define DPNERR_INVALIDPOINTER E_POINTER
82 #define DPNERR_PENDING DPNSUCCESS_PENDING
83 #define DPNERR_ABORTED MAKE_DPNHRESULT(0x030)
84 #define DPNERR_ADDRESSING MAKE_DPNHRESULT(0x040)
85 #define DPNERR_ALREADYCLOSING MAKE_DPNHRESULT(0x050)
86 #define DPNERR_ALREADYCONNECTED MAKE_DPNHRESULT(0x060)
87 #define DPNERR_ALREADYDISCONNECTING MAKE_DPNHRESULT(0x070)
88 #define DPNERR_ALREADYINITIALIZED MAKE_DPNHRESULT(0x080)
89 #define DPNERR_ALREADYREGISTERED MAKE_DPNHRESULT(0x090)
90 #define DPNERR_BUFFERTOOSMALL MAKE_DPNHRESULT(0x100)
91 #define DPNERR_CANNOTCANCEL MAKE_DPNHRESULT(0x110)
92 #define DPNERR_CANTCREATEGROUP MAKE_DPNHRESULT(0x120)
93 #define DPNERR_CANTCREATEPLAYER MAKE_DPNHRESULT(0x130)
94 #define DPNERR_CANTLAUNCHAPPLICATION MAKE_DPNHRESULT(0x140)
95 #define DPNERR_CONNECTING MAKE_DPNHRESULT(0x150)
96 #define DPNERR_CONNECTIONLOST MAKE_DPNHRESULT(0x160)
97 #define DPNERR_CONVERSION MAKE_DPNHRESULT(0x170)
98 #define DPNERR_DATATOOLARGE MAKE_DPNHRESULT(0x175)
99 #define DPNERR_DOESNOTEXIST MAKE_DPNHRESULT(0x180)
100 #define DPNERR_DPNSVRNOTAVAILABLE MAKE_DPNHRESULT(0x185)
101 #define DPNERR_DUPLICATECOMMAND MAKE_DPNHRESULT(0x190)
102 #define DPNERR_ENDPOINTNOTRECEIVING MAKE_DPNHRESULT(0x200)
103 #define DPNERR_ENUMQUERYTOOLARGE MAKE_DPNHRESULT(0x210)
104 #define DPNERR_ENUMRESPONSETOOLARGE MAKE_DPNHRESULT(0x220)
105 #define DPNERR_EXCEPTION MAKE_DPNHRESULT(0x230)
106 #define DPNERR_GROUPNOTEMPTY MAKE_DPNHRESULT(0x240)
107 #define DPNERR_HOSTING MAKE_DPNHRESULT(0x250)
108 #define DPNERR_HOSTREJECTEDCONNECTION MAKE_DPNHRESULT(0x260)
109 #define DPNERR_HOSTTERMINATEDSESSION MAKE_DPNHRESULT(0x270)
110 #define DPNERR_INCOMPLETEADDRESS MAKE_DPNHRESULT(0x280)
111 #define DPNERR_INVALIDADDRESSFORMAT MAKE_DPNHRESULT(0x290)
112 #define DPNERR_INVALIDAPPLICATION MAKE_DPNHRESULT(0x300)
113 #define DPNERR_INVALIDCOMMAND MAKE_DPNHRESULT(0x310)
114 #define DPNERR_INVALIDDEVICEADDRESS MAKE_DPNHRESULT(0x320)
115 #define DPNERR_INVALIDENDPOINT MAKE_DPNHRESULT(0x330)
116 #define DPNERR_INVALIDFLAGS MAKE_DPNHRESULT(0x340)
117 #define DPNERR_INVALIDGROUP MAKE_DPNHRESULT(0x350)
118 #define DPNERR_INVALIDHANDLE MAKE_DPNHRESULT(0x360)
119 #define DPNERR_INVALIDHOSTADDRESS MAKE_DPNHRESULT(0x370)
120 #define DPNERR_INVALIDINSTANCE MAKE_DPNHRESULT(0x380)
121 #define DPNERR_INVALIDINTERFACE MAKE_DPNHRESULT(0x390)
122 #define DPNERR_INVALIDOBJECT MAKE_DPNHRESULT(0x400)
123 #define DPNERR_INVALIDPASSWORD MAKE_DPNHRESULT(0x410)
124 #define DPNERR_INVALIDPLAYER MAKE_DPNHRESULT(0x420)
125 #define DPNERR_INVALIDPRIORITY MAKE_DPNHRESULT(0x430)
126 #define DPNERR_INVALIDSTRING MAKE_DPNHRESULT(0x440)
127 #define DPNERR_INVALIDURL MAKE_DPNHRESULT(0x450)
128 #define DPNERR_INVALIDVERSION MAKE_DPNHRESULT(0x460)
129 #define DPNERR_NOCAPS MAKE_DPNHRESULT(0x470)
130 #define DPNERR_NOCONNECTION MAKE_DPNHRESULT(0x480)
131 #define DPNERR_NOHOSTPLAYER MAKE_DPNHRESULT(0x490)
132 #define DPNERR_NOMOREADDRESSCOMPONENTS MAKE_DPNHRESULT(0x500)
133 #define DPNERR_NORESPONSE MAKE_DPNHRESULT(0x510)
134 #define DPNERR_NOTALLOWED MAKE_DPNHRESULT(0x520)
135 #define DPNERR_NOTHOST MAKE_DPNHRESULT(0x530)
136 #define DPNERR_NOTREADY MAKE_DPNHRESULT(0x540)
137 #define DPNERR_NOTREGISTERED MAKE_DPNHRESULT(0x550)
138 #define DPNERR_PLAYERALREADYINGROUP MAKE_DPNHRESULT(0x560)
139 #define DPNERR_PLAYERLOST MAKE_DPNHRESULT(0x570)
140 #define DPNERR_PLAYERNOTINGROUP MAKE_DPNHRESULT(0x580)
141 #define DPNERR_PLAYERNOTREACHABLE MAKE_DPNHRESULT(0x590)
142 #define DPNERR_SENDTOOLARGE MAKE_DPNHRESULT(0x600)
143 #define DPNERR_SESSIONFULL MAKE_DPNHRESULT(0x610)
144 #define DPNERR_TABLEFULL MAKE_DPNHRESULT(0x620)
145 #define DPNERR_TIMEDOUT MAKE_DPNHRESULT(0x630)
146 #define DPNERR_UNINITIALIZED MAKE_DPNHRESULT(0x640)
147 #define DPNERR_USERCANCEL MAKE_DPNHRESULT(0x650)
149 /*****************************************************************************
150 * DirectPlay8 defines
152 #define DPNID_ALL_PLAYERS_GROUP 0
153 #define DPNDESTROYGROUPREASON_NORMAL 0x0001
154 #define DPNDESTROYGROUPREASON_AUTODESTRUCTED 0x0002
155 #define DPNDESTROYGROUPREASON_SESSIONTERMINATED 0x0003
156 #define DPNDESTROYPLAYERREASON_NORMAL 0x0001
157 #define DPNDESTROYPLAYERREASON_CONNECTIONLOST 0x0002
158 #define DPNDESTROYPLAYERREASON_SESSIONTERMINATED 0x0003
159 #define DPNDESTROYPLAYERREASON_HOSTDESTROYEDPLAYER 0x0004
160 #define DPN_MAX_APPDESC_RESERVEDDATA_SIZE 64
162 #define DPNOP_SYNC 0x80000000
163 #define DPNADDPLAYERTOGROUP_SYNC DPNOP_SYNC
164 #define DPNCANCEL_CONNECT 0x0001
165 #define DPNCANCEL_ENUM 0x0002
166 #define DPNCANCEL_SEND 0x0004
167 #define DPNCANCEL_ALL_OPERATIONS 0x8000
168 #define DPNCANCEL_PLAYER_SENDS 0x80000000
169 #define DPNCANCEL_PLAYER_SENDS_PRIORITY_HIGH (DPNCANCEL_PLAYER_SENDS | 0x00010000)
170 #define DPNCANCEL_PLAYER_SENDS_PRIORITY_NORMAL (DPNCANCEL_PLAYER_SENDS | 0x00020000)
171 #define DPNCANCEL_PLAYER_SENDS_PRIORITY_LOW (DPNCANCEL_PLAYER_SENDS | 0x00040000)
172 #define DPNCLOSE_IMMEDIATE 0x00000001
173 #define DPNCONNECT_SYNC DPNOP_SYNC
174 #define DPNCONNECT_OKTOQUERYFORADDRESSING 0x0001
175 #define DPNCREATEGROUP_SYNC DPNOP_SYNC
176 #define DPNDESTROYGROUP_SYNC DPNOP_SYNC
177 #define DPNENUM_PLAYERS 0x0001
178 #define DPNENUM_GROUPS 0x0010
179 #define DPNENUMHOSTS_SYNC DPNOP_SYNC
180 #define DPNENUMHOSTS_OKTOQUERYFORADDRESSING 0x0001
181 #define DPNENUMHOSTS_NOBROADCASTFALLBACK 0x0002
182 #define DPNENUMSERVICEPROVIDERS_ALL 0x0001
183 #define DPNGETLOCALHOSTADDRESSES_COMBINED 0x0001
184 #define DPNGETSENDQUEUEINFO_PRIORITY_NORMAL 0x0001
185 #define DPNGETSENDQUEUEINFO_PRIORITY_HIGH 0x0002
186 #define DPNGETSENDQUEUEINFO_PRIORITY_LOW 0x0004
187 #define DPNGROUP_AUTODESTRUCT 0x0001
188 #define DPNHOST_OKTOQUERYFORADDRESSING 0x0001
189 #define DPNINFO_NAME 0x0001
190 #define DPNINFO_DATA 0x0002
191 #define DPNINITIALIZE_DISABLEPARAMVAL 0x0001
192 #define DPNINITIALIZE_HINT_LANSESSION 0x0002
193 #define DPNINITIALIZE_DISABLELINKTUNING 0x0004
194 #define DPNLOBBY_REGISTER 0x0001
195 #define DPNLOBBY_UNREGISTER 0x0002
196 #define DPNPLAYER_LOCAL 0x0002
197 #define DPNPLAYER_HOST 0x0004
198 #define DPNRECEIVE_GUARANTEED 0x0001
199 #define DPNRECEIVE_COALESCED 0x0002
200 #define DPNREMOVEPLAYERFROMGROUP_SYNC DPNOP_SYNC
201 #define DPNSEND_SYNC DPNOP_SYNC
202 #define DPNSEND_NOCOPY 0x0001
203 #define DPNSEND_NOCOMPLETE 0x0002
204 #define DPNSEND_COMPLETEONPROCESS 0x0004
205 #define DPNSEND_GUARANTEED 0x0008
206 #define DPNSEND_NONSEQUENTIAL 0x0010
207 #define DPNSEND_NOLOOPBACK 0x0020
208 #define DPNSEND_PRIORITY_LOW 0x0040
209 #define DPNSEND_PRIORITY_HIGH 0x0080
210 #define DPNSEND_COALESCE 0x0100
211 #define DPNSENDCOMPLETE_GUARANTEED 0x0001
212 #define DPNSENDCOMPLETE_COALESCED 0x0002
213 #define DPNSESSION_CLIENT_SERVER 0x0001
214 #define DPNSESSION_MIGRATE_HOST 0x0004
215 #define DPNSESSION_NODPNSVR 0x0040
216 #define DPNSESSION_REQUIREPASSWORD 0x0080
217 #define DPNSESSION_NOENUMS 0x0100
218 #define DPNSESSION_FAST_SIGNED 0x0200
219 #define DPNSESSION_FULL_SIGNED 0x0400
220 #define DPNSETCLIENTINFO_SYNC DPNOP_SYNC
221 #define DPNSETGROUPINFO_SYNC DPNOP_SYNC
222 #define DPNSETPEERINFO_SYNC DPNOP_SYNC
223 #define DPNSETSERVERINFO_SYNC DPNOP_SYNC
224 #define DPNSPCAPS_SUPPORTSDPNSRV 0x0001
225 #define DPNSPCAPS_SUPPORTSBROADCAST 0x0002
226 #define DPNSPCAPS_SUPPORTSALLADAPTERS 0x0004
227 #define DPNSPCAPS_SUPPORTSTHREADPOOL 0x0008
228 #define DPNSPCAPS_NETWORKSIMULATOR 0x0010
229 #define DPNSPINFO_NETWORKSIMULATORDEVICE 0x0001
232 /*****************************************************************************
233 * DirectPlay8 structures Typedefs
235 typedef struct _DPN_APPLICATION_DESC {
236 DWORD dwSize;
237 DWORD dwFlags;
238 GUID guidInstance;
239 GUID guidApplication;
240 DWORD dwMaxPlayers;
241 DWORD dwCurrentPlayers;
242 WCHAR* pwszSessionName;
243 WCHAR* pwszPassword;
244 PVOID pvReservedData;
245 DWORD dwReservedDataSize;
246 PVOID pvApplicationReservedData;
247 DWORD dwApplicationReservedDataSize;
248 } DPN_APPLICATION_DESC, *PDPN_APPLICATION_DESC;
250 typedef struct _BUFFERDESC {
251 DWORD dwBufferSize;
252 BYTE* pBufferData;
253 } BUFFERDESC, DPN_BUFFER_DESC, *PDPN_BUFFER_DESC, *PBUFFERDESC;
255 typedef struct _DPN_CAPS {
256 DWORD dwSize;
257 DWORD dwFlags;
258 DWORD dwConnectTimeout;
259 DWORD dwConnectRetries;
260 DWORD dwTimeoutUntilKeepAlive;
261 } DPN_CAPS, *PDPN_CAPS;
263 typedef struct _DPN_CAPS_EX {
264 DWORD dwSize;
265 DWORD dwFlags;
266 DWORD dwConnectTimeout;
267 DWORD dwConnectRetries;
268 DWORD dwTimeoutUntilKeepAlive;
269 DWORD dwMaxRecvMsgSize;
270 DWORD dwNumSendRetries;
271 DWORD dwMaxSendRetryInterval;
272 DWORD dwDropThresholdRate;
273 DWORD dwThrottleRate;
274 DWORD dwNumHardDisconnectSends;
275 DWORD dwMaxHardDisconnectPeriod;
276 } DPN_CAPS_EX, *PDPN_CAPS_EX;
278 typedef struct _DPN_CONNECTION_INFO {
279 DWORD dwSize;
280 DWORD dwRoundTripLatencyMS;
281 DWORD dwThroughputBPS;
282 DWORD dwPeakThroughputBPS;
283 DWORD dwBytesSentGuaranteed;
284 DWORD dwPacketsSentGuaranteed;
285 DWORD dwBytesSentNonGuaranteed;
286 DWORD dwPacketsSentNonGuaranteed;
287 DWORD dwBytesRetried;
288 DWORD dwPacketsRetried;
289 DWORD dwBytesDropped;
290 DWORD dwPacketsDropped;
291 DWORD dwMessagesTransmittedHighPriority;
292 DWORD dwMessagesTimedOutHighPriority;
293 DWORD dwMessagesTransmittedNormalPriority;
294 DWORD dwMessagesTimedOutNormalPriority;
295 DWORD dwMessagesTransmittedLowPriority;
296 DWORD dwMessagesTimedOutLowPriority;
297 DWORD dwBytesReceivedGuaranteed;
298 DWORD dwPacketsReceivedGuaranteed;
299 DWORD dwBytesReceivedNonGuaranteed;
300 DWORD dwPacketsReceivedNonGuaranteed;
301 DWORD dwMessagesReceived;
302 } DPN_CONNECTION_INFO, *PDPN_CONNECTION_INFO;
304 typedef struct _DPN_GROUP_INFO {
305 DWORD dwSize;
306 DWORD dwInfoFlags;
307 PWSTR pwszName;
308 PVOID pvData;
309 DWORD dwDataSize;
310 DWORD dwGroupFlags;
311 } DPN_GROUP_INFO, *PDPN_GROUP_INFO;
313 typedef struct _DPN_PLAYER_INFO {
314 DWORD dwSize;
315 DWORD dwInfoFlags;
316 PWSTR pwszName;
317 PVOID pvData;
318 DWORD dwDataSize;
319 DWORD dwPlayerFlags;
320 } DPN_PLAYER_INFO, *PDPN_PLAYER_INFO;
322 typedef struct _DPN_SERVICE_PROVIDER_INFO {
323 DWORD dwFlags;
324 GUID guid;
325 WCHAR* pwszName;
326 PVOID pvReserved;
327 DWORD dwReserved;
328 } DPN_SERVICE_PROVIDER_INFO, *PDPN_SERVICE_PROVIDER_INFO;
330 typedef struct _DPN_SP_CAPS {
331 DWORD dwSize;
332 DWORD dwFlags;
333 DWORD dwNumThreads;
334 DWORD dwDefaultEnumCount;
335 DWORD dwDefaultEnumRetryInterval;
336 DWORD dwDefaultEnumTimeout;
337 DWORD dwMaxEnumPayloadSize;
338 DWORD dwBuffersPerThread;
339 DWORD dwSystemBufferSize;
340 } DPN_SP_CAPS, *PDPN_SP_CAPS;
342 typedef struct _DPN_SECURITY_CREDENTIALS DPN_SECURITY_CREDENTIALS, *PDPN_SECURITY_CREDENTIALS;
343 typedef struct _DPN_SECURITY_DESC DPN_SECURITY_DESC, *PDPN_SECURITY_DESC;
345 typedef struct _DPNMSG_ADD_PLAYER_TO_GROUP {
346 DWORD dwSize;
347 DPNID dpnidGroup;
348 PVOID pvGroupContext;
349 DPNID dpnidPlayer;
350 PVOID pvPlayerContext;
351 } DPNMSG_ADD_PLAYER_TO_GROUP, *PDPNMSG_ADD_PLAYER_TO_GROUP;
353 typedef struct _DPNMSG_ASYNC_OP_COMPLETE {
354 DWORD dwSize;
355 DPNHANDLE hAsyncOp;
356 PVOID pvUserContext;
357 HRESULT hResultCode;
358 } DPNMSG_ASYNC_OP_COMPLETE, *PDPNMSG_ASYNC_OP_COMPLETE;
360 typedef struct _DPNMSG_CLIENT_INFO {
361 DWORD dwSize;
362 DPNID dpnidClient;
363 PVOID pvPlayerContext;
364 } DPNMSG_CLIENT_INFO, *PDPNMSG_CLIENT_INFO;
366 typedef struct _DPNMSG_CONNECT_COMPLETE {
367 DWORD dwSize;
368 DPNHANDLE hAsyncOp;
369 PVOID pvUserContext;
370 HRESULT hResultCode;
371 PVOID pvApplicationReplyData;
372 DWORD dwApplicationReplyDataSize;
373 /** DirectX 9 */
374 DPNID dpnidLocal;
375 } DPNMSG_CONNECT_COMPLETE, *PDPNMSG_CONNECT_COMPLETE;
377 typedef struct _DPNMSG_CREATE_GROUP {
378 DWORD dwSize;
379 DPNID dpnidGroup;
380 DPNID dpnidOwner;
381 PVOID pvGroupContext;
382 /** DirectX 9 */
383 PVOID pvOwnerContext;
384 } DPNMSG_CREATE_GROUP, *PDPNMSG_CREATE_GROUP;
386 typedef struct _DPNMSG_CREATE_PLAYER {
387 DWORD dwSize;
388 DPNID dpnidPlayer;
389 PVOID pvPlayerContext;
390 } DPNMSG_CREATE_PLAYER, *PDPNMSG_CREATE_PLAYER;
392 typedef struct _DPNMSG_DESTROY_GROUP {
393 DWORD dwSize;
394 DPNID dpnidGroup;
395 PVOID pvGroupContext;
396 DWORD dwReason;
397 } DPNMSG_DESTROY_GROUP, *PDPNMSG_DESTROY_GROUP;
399 typedef struct _DPNMSG_DESTROY_PLAYER {
400 DWORD dwSize;
401 DPNID dpnidPlayer;
402 PVOID pvPlayerContext;
403 DWORD dwReason;
404 } DPNMSG_DESTROY_PLAYER, *PDPNMSG_DESTROY_PLAYER;
406 typedef struct _DPNMSG_ENUM_HOSTS_QUERY {
407 DWORD dwSize;
408 IDirectPlay8Address* pAddressSender;
409 IDirectPlay8Address* pAddressDevice;
410 PVOID pvReceivedData;
411 DWORD dwReceivedDataSize;
412 DWORD dwMaxResponseDataSize;
413 PVOID pvResponseData;
414 DWORD dwResponseDataSize;
415 PVOID pvResponseContext;
416 } DPNMSG_ENUM_HOSTS_QUERY, *PDPNMSG_ENUM_HOSTS_QUERY;
418 typedef struct _DPNMSG_ENUM_HOSTS_RESPONSE {
419 DWORD dwSize;
420 IDirectPlay8Address* pAddressSender;
421 IDirectPlay8Address* pAddressDevice;
422 const DPN_APPLICATION_DESC* pApplicationDescription;
423 PVOID pvResponseData;
424 DWORD dwResponseDataSize;
425 PVOID pvUserContext;
426 DWORD dwRoundTripLatencyMS;
427 } DPNMSG_ENUM_HOSTS_RESPONSE, *PDPNMSG_ENUM_HOSTS_RESPONSE;
429 typedef struct _DPNMSG_GROUP_INFO {
430 DWORD dwSize;
431 DPNID dpnidGroup;
432 PVOID pvGroupContext;
433 } DPNMSG_GROUP_INFO, *PDPNMSG_GROUP_INFO;
435 typedef struct _DPNMSG_HOST_MIGRATE {
436 DWORD dwSize;
437 DPNID dpnidNewHost;
438 PVOID pvPlayerContext;
439 } DPNMSG_HOST_MIGRATE, *PDPNMSG_HOST_MIGRATE;
441 typedef struct _DPNMSG_INDICATE_CONNECT {
442 DWORD dwSize;
443 PVOID pvUserConnectData;
444 DWORD dwUserConnectDataSize;
445 PVOID pvReplyData;
446 DWORD dwReplyDataSize;
447 PVOID pvReplyContext;
448 PVOID pvPlayerContext;
449 IDirectPlay8Address* pAddressPlayer;
450 IDirectPlay8Address* pAddressDevice;
451 } DPNMSG_INDICATE_CONNECT, *PDPNMSG_INDICATE_CONNECT;
453 typedef struct _DPNMSG_INDICATED_CONNECT_ABORTED {
454 DWORD dwSize;
455 PVOID pvPlayerContext;
456 } DPNMSG_INDICATED_CONNECT_ABORTED, *PDPNMSG_INDICATED_CONNECT_ABORTED;
458 typedef struct _DPNMSG_PEER_INFO {
459 DWORD dwSize;
460 DPNID dpnidPeer;
461 PVOID pvPlayerContext;
462 } DPNMSG_PEER_INFO, *PDPNMSG_PEER_INFO;
464 typedef struct _DPNMSG_RECEIVE {
465 DWORD dwSize;
466 DPNID dpnidSender;
467 PVOID pvPlayerContext;
468 PBYTE pReceiveData;
469 DWORD dwReceiveDataSize;
470 DPNHANDLE hBufferHandle;
471 /** DirectX 9 */
472 DWORD dwReceiveFlags;
473 } DPNMSG_RECEIVE, *PDPNMSG_RECEIVE;
475 typedef struct _DPNMSG_REMOVE_PLAYER_FROM_GROUP {
476 DWORD dwSize;
477 DPNID dpnidGroup;
478 PVOID pvGroupContext;
479 DPNID dpnidPlayer;
480 PVOID pvPlayerContext;
481 } DPNMSG_REMOVE_PLAYER_FROM_GROUP, *PDPNMSG_REMOVE_PLAYER_FROM_GROUP;
483 typedef struct _DPNMSG_RETURN_BUFFER {
484 DWORD dwSize;
485 HRESULT hResultCode;
486 PVOID pvBuffer;
487 PVOID pvUserContext;
488 } DPNMSG_RETURN_BUFFER, *PDPNMSG_RETURN_BUFFER;
490 typedef struct _DPNMSG_SEND_COMPLETE {
491 DWORD dwSize;
492 DPNHANDLE hAsyncOp;
493 PVOID pvUserContext;
494 HRESULT hResultCode;
495 DWORD dwSendTime;
496 /** DirectX 9 */
497 DWORD dwFirstFrameRTT;
498 DWORD dwFirstFrameRetryCount;
499 DWORD dwSendCompleteFlags;
500 DPN_BUFFER_DESC* pBuffers;
501 DWORD dwNumBuffers;
502 } DPNMSG_SEND_COMPLETE, *PDPNMSG_SEND_COMPLETE;
504 typedef struct _DPNMSG_SERVER_INFO {
505 DWORD dwSize;
506 DPNID dpnidServer;
507 PVOID pvPlayerContext;
508 } DPNMSG_SERVER_INFO, *PDPNMSG_SERVER_INFO;
510 typedef struct _DPNMSG_TERMINATE_SESSION {
511 DWORD dwSize;
512 HRESULT hResultCode;
513 PVOID pvTerminateData;
514 DWORD dwTerminateDataSize;
515 } DPNMSG_TERMINATE_SESSION, *PDPNMSG_TERMINATE_SESSION;
517 typedef struct _DPNMSG_CREATE_THREAD {
518 DWORD dwSize;
519 DWORD dwFlags;
520 DWORD dwProcessorNum;
521 PVOID pvUserContext;
522 } DPNMSG_CREATE_THREAD, *PDPNMSG_CREATE_THREAD;
524 typedef struct _DPNMSG_DESTROY_THREAD {
525 DWORD dwSize;
526 DWORD dwProcessorNum;
527 PVOID pvUserContext;
528 } DPNMSG_DESTROY_THREAD, *PDPNMSG_DESTROY_THREAD;
530 typedef struct _DPNMSG_NAT_RESOLVER_QUERY {
531 DWORD dwSize;
532 IDirectPlay8Address* pAddressSender;
533 IDirectPlay8Address* pAddressDevice;
534 WCHAR* pwszUserString;
535 } DPNMSG_NAT_RESOLVER_QUERY, *PDPNMSG_NAT_RESOLVER_QUERY;
537 /*****************************************************************************
538 * Predeclare the interfaces
540 DEFINE_GUID(CLSID_DirectPlay8Peer, 0x286f484d,0x375e,0x4458,0xa2,0x72,0xb1,0x38,0xe2,0xf8,0x0a,0x6a);
541 DEFINE_GUID(CLSID_DirectPlay8Client, 0x743f1dc6,0x5aba,0x429f,0x8b,0xdf,0xc5,0x4d,0x03,0x25,0x3d,0xc2);
542 DEFINE_GUID(CLSID_DirectPlay8Server, 0xda825e1b,0x6830,0x43d7,0x83,0x5d,0x0b,0x5a,0xd8,0x29,0x56,0xa2);
543 /** DirectX 9 */
544 DEFINE_GUID(CLSID_DirectPlay8ThreadPool, 0xfc47060e,0x6153,0x4b34,0xb9,0x75,0x8e,0x41,0x21,0xeb,0x7f,0x3c);
545 DEFINE_GUID(CLSID_DirectPlay8NATResolver, 0xe4c1d9a2,0xcbf7,0x48bd,0x9a,0x69,0x34,0xa5,0x5e,0x0d,0x89,0x41);
547 DEFINE_GUID(IID_IDirectPlay8Peer, 0x5102dacf,0x241b,0x11d3,0xae,0xa7,0x0,0x60,0x97,0xb0,0x14,0x11);
548 typedef struct IDirectPlay8Peer *PDIRECTPLAY8PEER;
549 DEFINE_GUID(IID_IDirectPlay8Client, 0x5102dacd,0x241b,0x11d3,0xae,0xa7,0x0,0x60,0x97,0xb0,0x14,0x11);
550 typedef struct IDirectPlay8Client *PDIRECTPLAY8CLIENT;
551 DEFINE_GUID(IID_IDirectPlay8Server, 0x5102dace,0x241b,0x11d3,0xae,0xa7,0x0,0x60,0x97,0xb0,0x14,0x11);
552 typedef struct IDirectPlay8Server *PDIRECTPLAY8SERVER;
553 /** DirectX 9 */
554 DEFINE_GUID(IID_IDirectPlay8ThreadPool, 0x0d22ee73,0x4a46,0x4a0d,0x89,0xb2,0x04,0x5b,0x4d,0x66,0x64,0x25);
555 typedef struct IDirectPlay8ThreadPool *PDIRECTPLAY8THREADPOOL;
556 DEFINE_GUID(IID_IDirectPlay8NATResolver, 0xa9e213f2,0x9a60,0x486f,0xbf,0x3b,0x53,0x40,0x8b,0x6d,0x1c,0xbb);
557 typedef struct IDirectPlay8NATResolver *PDIRECTPLAY8NATRESOLVER;
559 DEFINE_GUID(CLSID_DP8SP_IPX, 0x53934290,0x628d,0x11d2,0xae,0x0f,0x0,0x60,0x97,0xb0,0x14,0x11);
560 DEFINE_GUID(CLSID_DP8SP_TCPIP, 0xebfe7ba0,0x628d,0x11d2,0xae,0x0f,0x0,0x60,0x97,0xb0,0x14,0x11);
561 DEFINE_GUID(CLSID_DP8SP_SERIAL, 0x743b5d60,0x628d,0x11d2,0xae,0x0f,0x0,0x60,0x97,0xb0,0x14,0x11);
562 DEFINE_GUID(CLSID_DP8SP_MODEM, 0x6d4a3650,0x628d,0x11d2,0xae,0x0f,0x0,0x60,0x97,0xb0,0x14,0x11);
563 /** DirectX 9 */
564 DEFINE_GUID(CLSID_DP8SP_BLUETOOTH, 0x995513af,0x3027,0x4b9a,0x95,0x6e,0xc7,0x72,0xb3,0xf7,0x80,0x06);
566 typedef struct IDirectPlay8LobbiedApplication *PIDirectPlay8LobbiedApplication, DNLOBBIEDAPPLICATION;
569 /*****************************************************************************
570 * IDirectPlay8Client interface
572 #define INTERFACE IDirectPlay8Client
573 DECLARE_INTERFACE_(IDirectPlay8Client,IUnknown)
575 /*** IUnknown methods ***/
576 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
577 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
578 STDMETHOD_(ULONG,Release)(THIS) PURE;
579 /*** IDirectPlay8Client methods ***/
580 STDMETHOD(Initialize)(THIS_ PVOID pvUserContext, PFNDPNMESSAGEHANDLER pfn, DWORD dwFlags) PURE;
581 STDMETHOD(EnumServiceProviders)(THIS_ const GUID *pguidServiceProvider, const GUID *pguidApplication, DPN_SERVICE_PROVIDER_INFO *pSPInfoBuffer, PDWORD pcbEnumData, PDWORD pcReturned, DWORD dwFlags) PURE;
582 STDMETHOD(EnumHosts)(THIS_ PDPN_APPLICATION_DESC pApplicationDesc,IDirectPlay8Address *pAddrHost,IDirectPlay8Address *pDeviceInfo, PVOID pUserEnumData, DWORD dwUserEnumDataSize, DWORD dwEnumCount, DWORD dwRetryInterval, DWORD dwTimeOut, PVOID pvUserContext, DPNHANDLE *pAsyncHandle, DWORD dwFlags) PURE;
583 STDMETHOD(CancelAsyncOperation)(THIS_ DPNHANDLE hAsyncHandle, DWORD dwFlags) PURE;
584 STDMETHOD(Connect)(THIS_ const DPN_APPLICATION_DESC *pdnAppDesc,IDirectPlay8Address *pHostAddr,IDirectPlay8Address *pDeviceInfo, const DPN_SECURITY_DESC *pdnSecurity, const DPN_SECURITY_CREDENTIALS *pdnCredentials, const void *pvUserConnectData, DWORD dwUserConnectDataSize,void *pvAsyncContext, DPNHANDLE *phAsyncHandle, DWORD dwFlags) PURE;
585 STDMETHOD(Send)(THIS_ const DPN_BUFFER_DESC *prgBufferDesc, DWORD cBufferDesc, DWORD dwTimeOut, void *pvAsyncContext, DPNHANDLE *phAsyncHandle, DWORD dwFlags) PURE;
586 STDMETHOD(GetSendQueueInfo)(THIS_ DWORD *pdwNumMsgs, DWORD *pdwNumBytes, DWORD dwFlags) PURE;
587 STDMETHOD(GetApplicationDesc)(THIS_ DPN_APPLICATION_DESC *pAppDescBuffer, DWORD *pcbDataSize, DWORD dwFlags) PURE;
588 STDMETHOD(SetClientInfo)(THIS_ const DPN_PLAYER_INFO *pdpnPlayerInfo, PVOID pvAsyncContext, DPNHANDLE *phAsyncHandle, DWORD dwFlags) PURE;
589 STDMETHOD(GetServerInfo)(THIS_ DPN_PLAYER_INFO *pdpnPlayerInfo, DWORD *pdwSize, DWORD dwFlags) PURE;
590 STDMETHOD(GetServerAddress)(THIS_ IDirectPlay8Address ** pAddress, DWORD dwFlags) PURE;
591 STDMETHOD(Close)(THIS_ DWORD dwFlags) PURE;
592 STDMETHOD(ReturnBuffer)(THIS_ DPNHANDLE hBufferHandle, DWORD dwFlags) PURE;
593 STDMETHOD(GetCaps)(THIS_ DPN_CAPS *pdpCaps, DWORD dwFlags) PURE;
594 STDMETHOD(SetCaps)(THIS_ const DPN_CAPS *pdpCaps, DWORD dwFlags) PURE;
595 STDMETHOD(SetSPCaps)(THIS_ const GUID *pguidSP, const DPN_SP_CAPS *pdpspCaps, DWORD dwFlags ) PURE;
596 STDMETHOD(GetSPCaps)(THIS_ const GUID *pguidSP, DPN_SP_CAPS *pdpspCaps, DWORD dwFlags) PURE;
597 STDMETHOD(GetConnectionInfo)(THIS_ DPN_CONNECTION_INFO *pdpConnectionInfo, DWORD dwFlags) PURE;
598 STDMETHOD(RegisterLobby)(THIS_ DPNHANDLE dpnHandle, struct IDirectPlay8LobbiedApplication *pIDP8LobbiedApplication, DWORD dwFlags) PURE;
600 #undef INTERFACE
602 #if !defined(__cplusplus) || defined(CINTERFACE)
603 /*** IUnknown methods ***/
604 #define IDirectPlay8Client_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
605 #define IDirectPlay8Client_AddRef(p) (p)->lpVtbl->AddRef(p)
606 #define IDirectPlay8Client_Release(p) (p)->lpVtbl->Release(p)
607 /*** IDirectPlay8Client methods ***/
608 #define IDirectPlay8Client_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c)
609 #define IDirectPlay8Client_EnumServiceProviders(p,a,b,c,d,e,f) (p)->lpVtbl->EnumServiceProviders(p,a,b,c,d,e,f)
610 #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)
611 #define IDirectPlay8Client_CancelAsyncOperation(p,a,b) (p)->lpVtbl->CancelAsyncOperation(p,a,b)
612 #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)
613 #define IDirectPlay8Client_Send(p,a,b,c,d,e,f) (p)->lpVtbl->Send(p,a,b,c,d,e,f)
614 #define IDirectPlay8Client_GetSendQueueInfo(p,a,b,c) (p)->lpVtbl->GetSendQueueInfo(p,a,b,c)
615 #define IDirectPlay8Client_GetApplicationDesc(p,a,b,c) (p)->lpVtbl->GetApplicationDesc(p,a,b,c)
616 #define IDirectPlay8Client_SetClientInfo(p,a,b,c,d) (p)->lpVtbl->SetClientInfo(p,a,b,c,d)
617 #define IDirectPlay8Client_GetServerInfo(p,a,b,c) (p)->lpVtbl->GetServerInfo(p,a,b,c)
618 #define IDirectPlay8Client_GetServerAddress(p,a,b) (p)->lpVtbl->GetServerAddress(p,a,b)
619 #define IDirectPlay8Client_Close(p,a) (p)->lpVtbl->Close(p,a)
620 #define IDirectPlay8Client_ReturnBuffer(p,a,b) (p)->lpVtbl->ReturnBuffer(p,a,b)
621 #define IDirectPlay8Client_GetCaps(p,a,b) (p)->lpVtbl->GetCaps(p,a,b)
622 #define IDirectPlay8Client_SetCaps(p,a,b) (p)->lpVtbl->SetCaps(p,a,b)
623 #define IDirectPlay8Client_SetSPCaps(p,a,b,c) (p)->lpVtbl->SetSPCaps(p,a,b,c)
624 #define IDirectPlay8Client_GetSPCaps(p,a,b,c) (p)->lpVtbl->GetSPCaps(p,a,b,c)
625 #define IDirectPlay8Client_GetConnectionInfo(p,a,b) (p)->lpVtbl->GetConnectionInfo(p,a,b)
626 #define IDirectPlay8Client_RegisterLobby(p,a,b,c) (p)->lpVtbl->RegisterLobby(p,a,b,c)
627 #else
628 /*** IUnknown methods ***/
629 #define IDirectPlay8Client_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
630 #define IDirectPlay8Client_AddRef(p) (p)->AddRef()
631 #define IDirectPlay8Client_Release(p) (p)->Release()
632 /*** IDirectPlay8Client methods ***/
633 #define IDirectPlay8Client_Initialize(p,a,b,c) (p)->Initialize(a,b,c)
634 #define IDirectPlay8Client_EnumServiceProviders(p,a,b,c,d,e,f) (p)->EnumServiceProviders(a,b,c,d,e,f)
635 #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)
636 #define IDirectPlay8Client_CancelAsyncOperation(p,a,b) (p)->CancelAsyncOperation(a,b)
637 #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)
638 #define IDirectPlay8Client_Send(p,a,b,c,d,e,f) (p)->Send(a,b,c,d,e,f)
639 #define IDirectPlay8Client_GetSendQueueInfo(p,a,b,c) (p)->GetSendQueueInfo(a,b,c)
640 #define IDirectPlay8Client_GetApplicationDesc(p,a,b,c) (p)->GetApplicationDesc(a,b,c)
641 #define IDirectPlay8Client_SetClientInfo(p,a,b,c,d) (p)->SetClientInfo(a,b,c,d)
642 #define IDirectPlay8Client_GetServerInfo(p,a,b,c) (p)->GetServerInfo(a,b,c)
643 #define IDirectPlay8Client_GetServerAddress(p,a,b) (p)->GetServerAddress(a,b)
644 #define IDirectPlay8Client_Close(p,a) (p)->Close(a)
645 #define IDirectPlay8Client_ReturnBuffer(p,a,b) (p)->ReturnBuffer(a,b)
646 #define IDirectPlay8Client_GetCaps(p,a,b) (p)->GetCaps(a,b)
647 #define IDirectPlay8Client_SetCaps(p,a,b) (p)->SetCaps(a,b)
648 #define IDirectPlay8Client_SetSPCaps(p,a,b,c) (p)->SetSPCaps(a,b,c)
649 #define IDirectPlay8Client_GetSPCaps(p,a,b,c) (p)->GetSPCaps(a,b,c)
650 #define IDirectPlay8Client_GetConnectionInfo(p,a,b) (p)->GetConnectionInfo(a,b)
651 #define IDirectPlay8Client_RegisterLobby(p,a,b,c) (p)->RegisterLobby(a,b,c)
652 #endif
654 /*****************************************************************************
655 * IDirectPlay8Server interface
657 #define INTERFACE IDirectPlay8Server
658 DECLARE_INTERFACE_(IDirectPlay8Server,IUnknown)
660 /*** IUnknown methods ***/
661 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
662 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
663 STDMETHOD_(ULONG,Release)(THIS) PURE;
664 /*** IDirectPlay8Server methods ***/
665 STDMETHOD(Initialize)(THIS_ PVOID pvUserContext, PFNDPNMESSAGEHANDLER pfn, DWORD dwFlags) PURE;
666 STDMETHOD(EnumServiceProviders)(THIS_ const GUID *pguidServiceProvider, const GUID *pguidApplication, DPN_SERVICE_PROVIDER_INFO *pSPInfoBuffer, PDWORD pcbEnumData, PDWORD pcReturned, DWORD dwFlags) PURE;
667 STDMETHOD(CancelAsyncOperation)(THIS_ DPNHANDLE hAsyncHandle, DWORD dwFlags) PURE;
668 STDMETHOD(GetSendQueueInfo)(THIS_ DPNID dpnid, DWORD *pdwNumMsgs, DWORD *pdwNumBytes, DWORD dwFlags) PURE;
669 STDMETHOD(GetApplicationDesc)(THIS_ DPN_APPLICATION_DESC *pAppDescBuffer, DWORD *pcbDataSize, DWORD dwFlags) PURE;
670 STDMETHOD(SetServerInfo)(THIS_ const DPN_PLAYER_INFO *pdpnPlayerInfo, PVOID pvAsyncContext, DPNHANDLE *phAsyncHandle, DWORD dwFlags) PURE;
671 STDMETHOD(GetClientInfo)(THIS_ DPNID dpnid, DPN_PLAYER_INFO *pdpnPlayerInfo, DWORD *pdwSize, DWORD dwFlags) PURE;
672 STDMETHOD(GetClientAddress)(THIS_ DPNID dpnid, IDirectPlay8Address ** pAddress, DWORD dwFlags) PURE;
673 STDMETHOD(GetLocalHostAddresses)(THIS_ IDirectPlay8Address ** prgpAddress, DWORD *pcAddress, DWORD dwFlags) PURE;
674 STDMETHOD(SetApplicationDesc)(THIS_ const DPN_APPLICATION_DESC *pad, DWORD dwFlags) PURE;
675 STDMETHOD(Host)(THIS_ const DPN_APPLICATION_DESC *pdnAppDesc, IDirectPlay8Address ** prgpDeviceInfo, DWORD cDeviceInfo, const DPN_SECURITY_DESC *pdnSecurity, const DPN_SECURITY_CREDENTIALS *pdnCredentials, void *pvPlayerContext, DWORD dwFlags) PURE;
676 STDMETHOD(SendTo)(THIS_ DPNID dpnid, const DPN_BUFFER_DESC *prgBufferDesc, DWORD cBufferDesc, DWORD dwTimeOut, void *pvAsyncContext, DPNHANDLE *phAsyncHandle, DWORD dwFlags) PURE;
677 STDMETHOD(CreateGroup)(THIS_ const DPN_GROUP_INFO *pdpnGroupInfo, void *pvGroupContext, void *pvAsyncContext, DPNHANDLE *phAsyncHandle, DWORD dwFlags) PURE;
678 STDMETHOD(DestroyGroup)(THIS_ DPNID idGroup, PVOID pvAsyncContext, DPNHANDLE *phAsyncHandle, DWORD dwFlags) PURE;
679 STDMETHOD(AddPlayerToGroup)(THIS_ DPNID idGroup, DPNID idClient, PVOID pvAsyncContext, DPNHANDLE *phAsyncHandle, DWORD dwFlags) PURE;
680 STDMETHOD(RemovePlayerFromGroup)(THIS_ DPNID idGroup, DPNID idClient, PVOID pvAsyncContext, DPNHANDLE *phAsyncHandle, DWORD dwFlags) PURE;
681 STDMETHOD(SetGroupInfo)(THIS_ DPNID dpnid, DPN_GROUP_INFO *pdpnGroupInfo, PVOID pvAsyncContext, DPNHANDLE *phAsyncHandle, DWORD dwFlags) PURE;
682 STDMETHOD(GetGroupInfo)(THIS_ DPNID dpnid, DPN_GROUP_INFO *pdpnGroupInfo, DWORD *pdwSize, DWORD dwFlags) PURE;
683 STDMETHOD(EnumPlayersAndGroups)(THIS_ DPNID *prgdpnid, DWORD *pcdpnid, DWORD dwFlags) PURE;
684 STDMETHOD(EnumGroupMembers)(THIS_ DPNID dpnid, DPNID *prgdpnid, DWORD *pcdpnid, DWORD dwFlags) PURE;
685 STDMETHOD(Close)(THIS_ DWORD dwFlags) PURE;
686 STDMETHOD(DestroyClient)(THIS_ DPNID dpnidClient, const void *pvDestroyData, DWORD dwDestroyDataSize, DWORD dwFlags) PURE;
687 STDMETHOD(ReturnBuffer)(THIS_ DPNHANDLE hBufferHandle, DWORD dwFlags) PURE;
688 STDMETHOD(GetPlayerContext)(THIS_ DPNID dpnid, PVOID *ppvPlayerContext, DWORD dwFlags) PURE;
689 STDMETHOD(GetGroupContext)(THIS_ DPNID dpnid, PVOID *ppvGroupContext, DWORD dwFlags) PURE;
690 STDMETHOD(GetCaps)(THIS_ DPN_CAPS *pdpCaps, DWORD dwFlags) PURE;
691 STDMETHOD(SetCaps)(THIS_ const DPN_CAPS *pdpCaps, DWORD dwFlags) PURE;
692 STDMETHOD(SetSPCaps)(THIS_ const GUID *pguidSP, const DPN_SP_CAPS *pdpspCaps, DWORD dwFlags ) PURE;
693 STDMETHOD(GetSPCaps)(THIS_ const GUID *pguidSP, DPN_SP_CAPS *pdpspCaps, DWORD dwFlags) PURE;
694 STDMETHOD(GetConnectionInfo)(THIS_ DPNID dpnid, DPN_CONNECTION_INFO *pdpConnectionInfo, DWORD dwFlags) PURE;
695 STDMETHOD(RegisterLobby)(THIS_ DPNHANDLE dpnHandle, struct IDirectPlay8LobbiedApplication *pIDP8LobbiedApplication, DWORD dwFlags) PURE;
697 #undef INTERFACE
699 #if !defined(__cplusplus) || defined(CINTERFACE)
700 /*** IUnknown methods ***/
701 #define IDirectPlay8Server_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
702 #define IDirectPlay8Server_AddRef(p) (p)->lpVtbl->AddRef(p)
703 #define IDirectPlay8Server_Release(p) (p)->lpVtbl->Release(p)
704 /*** IDirectPlay8Server methods ***/
705 #define IDirectPlay8Server_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c)
706 #define IDirectPlay8Server_EnumServiceProviders(p,a,b,c,d,e,f) (p)->lpVtbl->EnumServiceProviders(p,a,b,c,d,e,f)
707 #define IDirectPlay8Server_CancelAsyncOperation(p,a,b) (p)->lpVtbl->CancelAsyncOperation(p,a,b)
708 #define IDirectPlay8Server_GetSendQueueInfo(p,a,b,c,d) (p)->lpVtbl->GetSendQueueInfo(p,a,b,c,d)
709 #define IDirectPlay8Server_GetApplicationDesc(p,a,b,c) (p)->lpVtbl->GetApplicationDesc(p,a,b,c)
710 #define IDirectPlay8Server_SetServerInfo(p,a,b,c,d) (p)->lpVtbl->SetServerInfo(p,a,b,c,d)
711 #define IDirectPlay8Server_GetClientInfo(p,a,b,c,d) (p)->lpVtbl->GetClientInfo(p,a,b,c,d)
712 #define IDirectPlay8Server_GetClientAddress(p,a,b,c) (p)->lpVtbl->GetClientAddress(p,a,b,c)
713 #define IDirectPlay8Server_GetLocalHostAddresses(p,a,b,c) (p)->lpVtbl->GetLocalHostAddresses(p,a,b,c)
714 #define IDirectPlay8Server_SetApplicationDesc(p,a,b) (p)->lpVtbl->SetApplicationDesc(p,a,b)
715 #define IDirectPlay8Server_Host(p,a,b,c,d,e,f,g) (p)->lpVtbl->Host(p,a,b,c,d,e,f,g)
716 #define IDirectPlay8Server_SendTo(p,a,b,c,d,e,f,g) (p)->lpVtbl->SendTo(p,a,b,c,d,e,f,g)
717 #define IDirectPlay8Server_CreateGroup(p,a,b,c,d,e) (p)->lpVtbl->CreateGroup(p,a,b,c,d,e)
718 #define IDirectPlay8Server_DestroyGroup(p,a,b,c,d) (p)->lpVtbl->DestroyGroup(p,a,b,c,d)
719 #define IDirectPlay8Server_AddPlayerToGroup(p,a,b,c,d,e) (p)->lpVtbl->AddPlayerToGroup(p,a,b,c,d,e)
720 #define IDirectPlay8Server_RemovePlayerFromGroup(p,a,b,c,d,e) (p)->lpVtbl->RemovePlayerFromGroup(p,a,b,c,d,e)
721 #define IDirectPlay8Server_SetGroupInfo(p,a,b,c,d,e) (p)->lpVtbl->SetGroupInfo(p,a,b,c,d,e)
722 #define IDirectPlay8Server_GetGroupInfo(p,a,b,c,d) (p)->lpVtbl->GetGroupInfo(p,a,b,c,d)
723 #define IDirectPlay8Server_EnumPlayersAndGroups(p,a,b,c) (p)->lpVtbl->EnumPlayersAndGroups(p,a,b,c)
724 #define IDirectPlay8Server_EnumGroupMembers(p,a,b,c,d) (p)->lpVtbl->EnumGroupMembers(p,a,b,c,d)
725 #define IDirectPlay8Server_Close(p,a) (p)->lpVtbl->Close(p,a)
726 #define IDirectPlay8Server_DestroyClient(p,a,b,c,d) (p)->lpVtbl->DestroyClient(p,a,b,c,d)
727 #define IDirectPlay8Server_ReturnBuffer(p,a,b) (p)->lpVtbl->ReturnBuffer(p,a,b)
728 #define IDirectPlay8Server_GetPlayerContext(p,a,b,c) (p)->lpVtbl->GetPlayerContext(p,a,b,c)
729 #define IDirectPlay8Server_GetGroupContext(p,a,b,c) (p)->lpVtbl->GetGroupContext(p,a,b,c)
730 #define IDirectPlay8Server_GetCaps(p,a,b) (p)->lpVtbl->GetCaps(p,a,b)
731 #define IDirectPlay8Server_SetCaps(p,a,b) (p)->lpVtbl->SetCaps(p,a,b)
732 #define IDirectPlay8Server_SetSPCaps(p,a,b,c) (p)->lpVtbl->SetSPCaps(p,a,b,c)
733 #define IDirectPlay8Server_GetSPCaps(p,a,b,c) (p)->lpVtbl->GetSPCaps(p,a,b,c)
734 #define IDirectPlay8Server_GetConnectionInfo(p,a,b,c) (p)->lpVtbl->GetConnectionInfo(p,a,b,c)
735 #define IDirectPlay8Server_RegisterLobby(p,a,b,c) (p)->lpVtbl->RegisterLobby(p,a,b,c)
736 #else
737 /*** IUnknown methods ***/
738 #define IDirectPlay8Server_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
739 #define IDirectPlay8Server_AddRef(p) (p)->AddRef()
740 #define IDirectPlay8Server_Release(p) (p)->Release()
741 /*** IDirectPlay8Server methods ***/
742 #define IDirectPlay8Server_Initialize(p,a,b,c) (p)->Initialize(a,b,c)
743 #define IDirectPlay8Server_EnumServiceProviders(p,a,b,c,d,e,f) (p)->EnumServiceProviders(a,b,c,d,e,f)
744 #define IDirectPlay8Server_CancelAsyncOperation(p,a,b) (p)->CancelAsyncOperation(a,b)
745 #define IDirectPlay8Server_GetSendQueueInfo(p,a,b,c,d) (p)->GetSendQueueInfo(a,b,c,d)
746 #define IDirectPlay8Server_GetApplicationDesc(p,a,b,c) (p)->GetApplicationDesc(a,b,c)
747 #define IDirectPlay8Server_SetServerInfo(p,a,b,c,d) (p)->SetServerInfo(a,b,c,d)
748 #define IDirectPlay8Server_GetClientInfo(p,a,b,c,d) (p)->GetClientInfo(a,b,c,d)
749 #define IDirectPlay8Server_GetClientAddress(p,a,b,c) (p)->GetClientAddress(a,b,c)
750 #define IDirectPlay8Server_GetLocalHostAddresses(p,a,b,c) (p)->GetLocalHostAddresses(a,b,c)
751 #define IDirectPlay8Server_SetApplicationDesc(p,a,b) (p)->SetApplicationDesc(a,b)
752 #define IDirectPlay8Server_Host(p,a,b,c,d,e,f,g) (p)->Host(a,b,c,d,e,f,g)
753 #define IDirectPlay8Server_SendTo(p,a,b,c,d,e,f,g) (p)->SendTo(a,b,c,d,e,f,g)
754 #define IDirectPlay8Server_CreateGroup(p,a,b,c,d,e) (p)->CreateGroup(a,b,c,d,e)
755 #define IDirectPlay8Server_DestroyGroup(p,a,b,c,d) (p)->DestroyGroup(a,b,c,d)
756 #define IDirectPlay8Server_AddPlayerToGroup(p,a,b,c,d,e) (p)->AddPlayerToGroup(a,b,c,d,e)
757 #define IDirectPlay8Server_RemovePlayerFromGroup(p,a,b,c,d,e) (p)->RemovePlayerFromGroup(a,b,c,d,e)
758 #define IDirectPlay8Server_SetGroupInfo(p,a,b,c,d,e) (p)->SetGroupInfo(a,b,c,d,e)
759 #define IDirectPlay8Server_GetGroupInfo(p,a,b,c,d) (p)->GetGroupInfo(a,b,c,d)
760 #define IDirectPlay8Server_EnumPlayersAndGroups(p,a,b,c) (p)->EnumPlayersAndGroups(a,b,c)
761 #define IDirectPlay8Server_EnumGroupMembers(p,a,b,c,d) (p)->EnumGroupMembers(a,b,c,d)
762 #define IDirectPlay8Server_Close(p,a) (p)->Close(a)
763 #define IDirectPlay8Server_DestroyClient(p,a,b,c,d) (p)->DestroyClient(a,b,c,d)
764 #define IDirectPlay8Server_ReturnBuffer(p,a,b) (p)->ReturnBuffer(a,b)
765 #define IDirectPlay8Server_GetPlayerContext(p,a,b,c) (p)->GetPlayerContext(a,b,c)
766 #define IDirectPlay8Server_GetGroupContext(p,a,b,c) (p)->GetGroupContext(a,b,c)
767 #define IDirectPlay8Server_GetCaps(p,a,b) (p)->GetCaps(a,b)
768 #define IDirectPlay8Server_SetCaps(p,a,b) (p)->SetCaps(a,b)
769 #define IDirectPlay8Server_SetSPCaps(p,a,b,c) (p)->SetSPCaps(a,b,c)
770 #define IDirectPlay8Server_GetSPCaps(p,a,b,c) (p)->GetSPCaps(a,b,c)
771 #define IDirectPlay8Server_GetConnectionInfo(p,a,b,c) (p)->GetConnectionInfo(a,b,c)
772 #define IDirectPlay8Server_RegisterLobby(p,a,b,c) (p)->RegisterLobby(a,b,c)
773 #endif
775 /*****************************************************************************
776 * IDirectPlay8Peer interface
778 #define INTERFACE IDirectPlay8Peer
779 DECLARE_INTERFACE_(IDirectPlay8Peer,IUnknown)
781 /*** IUnknown methods ***/
782 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
783 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
784 STDMETHOD_(ULONG,Release)(THIS) PURE;
785 /*** IDirectPlay8Peer methods ***/
786 STDMETHOD(Initialize)(THIS_ PVOID pvUserContext, PFNDPNMESSAGEHANDLER pfn, DWORD dwFlags) PURE;
787 STDMETHOD(EnumServiceProviders)(THIS_ const GUID* pguidServiceProvider, const GUID* pguidApplication, DPN_SERVICE_PROVIDER_INFO* pSPInfoBuffer, DWORD* pcbEnumData, DWORD* pcReturned, DWORD dwFlags) PURE;
788 STDMETHOD(CancelAsyncOperation)(THIS_ DPNHANDLE hAsyncHandle, DWORD dwFlags) PURE;
789 STDMETHOD(Connect)(THIS_ const DPN_APPLICATION_DESC* pdnAppDesc, IDirectPlay8Address* pHostAddr, IDirectPlay8Address* pDeviceInfo, const DPN_SECURITY_DESC* pdnSecurity, const DPN_SECURITY_CREDENTIALS* pdnCredentials, const void* pvUserConnectData, DWORD dwUserConnectDataSize, void* pvPlayerContext, void* pvAsyncContext, DPNHANDLE* phAsyncHandle, DWORD dwFlags) PURE;
790 STDMETHOD(SendTo)(THIS_ DPNID dpnid, const DPN_BUFFER_DESC* prgBufferDesc, DWORD cBufferDesc, DWORD dwTimeOut, void* pvAsyncContext, DPNHANDLE* phAsyncHandle, DWORD dwFlags) PURE;
791 STDMETHOD(GetSendQueueInfo)(THIS_ DPNID dpnid, DWORD* pdwNumMsgs, DWORD* pdwNumBytes, DWORD dwFlags) PURE;
792 STDMETHOD(Host)(THIS_ const DPN_APPLICATION_DESC* pdnAppDesc, IDirectPlay8Address **prgpDeviceInfo, DWORD cDeviceInfo, const DPN_SECURITY_DESC* pdnSecurity, const DPN_SECURITY_CREDENTIALS* pdnCredentials, void* pvPlayerContext, DWORD dwFlags) PURE;
793 STDMETHOD(GetApplicationDesc)(THIS_ DPN_APPLICATION_DESC* pAppDescBuffer, DWORD* pcbDataSize, DWORD dwFlags) PURE;
794 STDMETHOD(SetApplicationDesc)(THIS_ const DPN_APPLICATION_DESC* pad, DWORD dwFlags) PURE;
795 STDMETHOD(CreateGroup)(THIS_ const DPN_GROUP_INFO* pdpnGroupInfo, void* pvGroupContext, void* pvAsyncContext, DPNHANDLE* phAsyncHandle, DWORD dwFlags) PURE;
796 STDMETHOD(DestroyGroup)(THIS_ DPNID idGroup, PVOID pvAsyncContext, DPNHANDLE* phAsyncHandle, DWORD dwFlags) PURE;
797 STDMETHOD(AddPlayerToGroup)(THIS_ DPNID idGroup, DPNID idClient, PVOID pvAsyncContext, DPNHANDLE* phAsyncHandle, DWORD dwFlags) PURE;
798 STDMETHOD(RemovePlayerFromGroup)(THIS_ DPNID idGroup, DPNID idClient, PVOID pvAsyncContext, DPNHANDLE* phAsyncHandle, DWORD dwFlags) PURE;
799 STDMETHOD(SetGroupInfo)(THIS_ DPNID dpnid, DPN_GROUP_INFO* pdpnGroupInfo,PVOID pvAsyncContext, DPNHANDLE* phAsyncHandle, DWORD dwFlags) PURE;
800 STDMETHOD(GetGroupInfo)(THIS_ DPNID dpnid, DPN_GROUP_INFO* pdpnGroupInfo, DWORD* pdwSize, DWORD dwFlags) PURE;
801 STDMETHOD(EnumPlayersAndGroups)(THIS_ DPNID* prgdpnid, DWORD* pcdpnid, DWORD dwFlags) PURE;
802 STDMETHOD(EnumGroupMembers)(THIS_ DPNID dpnid, DPNID* prgdpnid, DWORD* pcdpnid, DWORD dwFlags) PURE;
803 STDMETHOD(SetPeerInfo)(THIS_ const DPN_PLAYER_INFO* pdpnPlayerInfo,PVOID pvAsyncContext, DPNHANDLE* phAsyncHandle, DWORD dwFlags) PURE;
804 STDMETHOD(GetPeerInfo)(THIS_ DPNID dpnid, DPN_PLAYER_INFO* pdpnPlayerInfo, DWORD* pdwSize, DWORD dwFlags) PURE;
805 STDMETHOD(GetPeerAddress)(THIS_ DPNID dpnid, IDirectPlay8Address** pAddress, DWORD dwFlags) PURE;
806 STDMETHOD(GetLocalHostAddresses)(THIS_ IDirectPlay8Address** prgpAddress, DWORD* pcAddress, DWORD dwFlags) PURE;
807 STDMETHOD(Close)(THIS_ DWORD dwFlags) PURE;
808 STDMETHOD(EnumHosts)(THIS_ PDPN_APPLICATION_DESC pApplicationDesc, IDirectPlay8Address* pAddrHost, IDirectPlay8Address* pDeviceInfo,PVOID pUserEnumData, DWORD dwUserEnumDataSize, DWORD dwEnumCount, DWORD dwRetryInterval, DWORD dwTimeOut,PVOID pvUserContext, DPNHANDLE* pAsyncHandle, DWORD dwFlags) PURE;
809 STDMETHOD(DestroyPeer)(THIS_ DPNID dpnidClient, const void* pvDestroyData, DWORD dwDestroyDataSize, DWORD dwFlags) PURE;
810 STDMETHOD(ReturnBuffer)(THIS_ DPNHANDLE hBufferHandle, DWORD dwFlags) PURE;
811 STDMETHOD(GetPlayerContext)(THIS_ DPNID dpnid,PVOID* ppvPlayerContext, DWORD dwFlags) PURE;
812 STDMETHOD(GetGroupContext)(THIS_ DPNID dpnid,PVOID* ppvGroupContext, DWORD dwFlags) PURE;
813 STDMETHOD(GetCaps)(THIS_ DPN_CAPS* pdpCaps, DWORD dwFlags) PURE;
814 STDMETHOD(SetCaps)(THIS_ const DPN_CAPS* pdpCaps, DWORD dwFlags) PURE;
815 STDMETHOD(SetSPCaps)(THIS_ const GUID* pguidSP, const DPN_SP_CAPS* pdpspCaps, DWORD dwFlags ) PURE;
816 STDMETHOD(GetSPCaps)(THIS_ const GUID* pguidSP, DPN_SP_CAPS* pdpspCaps, DWORD dwFlags) PURE;
817 STDMETHOD(GetConnectionInfo)(THIS_ DPNID dpnid, DPN_CONNECTION_INFO* pdpConnectionInfo, DWORD dwFlags) PURE;
818 STDMETHOD(RegisterLobby)(THIS_ DPNHANDLE dpnHandle, struct IDirectPlay8LobbiedApplication* pIDP8LobbiedApplication, DWORD dwFlags) PURE;
819 STDMETHOD(TerminateSession)(THIS_ void* pvTerminateData, DWORD dwTerminateDataSize, DWORD dwFlags) PURE;
821 #undef INTERFACE
823 #if !defined(__cplusplus) || defined(CINTERFACE)
824 /*** IUnknown methods ***/
825 #define IDirectPlay8Peer_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
826 #define IDirectPlay8Peer_AddRef(p) (p)->lpVtbl->AddRef(p)
827 #define IDirectPlay8Peer_Release(p) (p)->lpVtbl->Release(p)
828 /*** IDirectPlay8Peer methods ***/
829 #define IDirectPlay8Peer_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c)
830 #define IDirectPlay8Peer_EnumServiceProviders(p,a,b,c,d,e,f) (p)->lpVtbl->EnumServiceProviders(p,a,b,c,d,e,f)
831 #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)
832 #define IDirectPlay8Peer_CancelAsyncOperation(p,a,b) (p)->lpVtbl->CancelAsyncOperation(p,a,b)
833 #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)
834 #define IDirectPlay8Peer_SendTo(p,a,b,c,d,e,f,g) (p)->lpVtbl->SendTo(p,a,b,c,d,e,f,g)
835 #define IDirectPlay8Peer_GetSendQueueInfo(p,a,b,c,d) (p)->lpVtbl->GetSendQueueInfo(p,a,b,c,d)
836 #define IDirectPlay8Peer_Host(p,a,b,c,d,e,f,g) (p)->lpVtbl->Host(p,a,b,c,d,e,f,g)
837 #define IDirectPlay8Peer_GetApplicationDesc(p,a,b,c) (p)->lpVtbl->GetApplicationDesc(p,a,b,c)
838 #define IDirectPlay8Peer_SetApplicationDesc(p,a,b) (p)->lpVtbl->SetApplicationDesc(p,a,b)
839 #define IDirectPlay8Peer_CreateGroup(p,a,b,c,d,e) (p)->lpVtbl->CreateGroup(p,a,b,c,d,e)
840 #define IDirectPlay8Peer_DestroyGroup(p,a,b,c,d) (p)->lpVtbl->DestroyGroup(p,a,b,c,d)
841 #define IDirectPlay8Peer_AddPlayerToGroup(p,a,b,c,d,e) (p)->lpVtbl->AddPlayerToGroup(p,a,b,c,d,e)
842 #define IDirectPlay8Peer_RemovePlayerFromGroup(p,a,b,c,d,e) (p)->lpVtbl->RemovePlayerFromGroup(p,a,b,c,d,e)
843 #define IDirectPlay8Peer_SetGroupInfo(p,a,b,c,d,e) (p)->lpVtbl->SetGroupInfo(p,a,b,c,d,e)
844 #define IDirectPlay8Peer_GetGroupInfo(p,a,b,c,d) (p)->lpVtbl->GetGroupInfo(p,a,b,c,d)
845 #define IDirectPlay8Peer_EnumPlayersAndGroups(p,a,b,c) (p)->lpVtbl->EnumPlayersAndGroups(p,a,b,c)
846 #define IDirectPlay8Peer_EnumGroupMembers(p,a,b,c,d) (p)->lpVtbl->EnumGroupMembers(p,a,b,c,d)
847 #define IDirectPlay8Peer_SetPeerInfo(p,a,b,c,d) (p)->lpVtbl->SetPeerInfo(p,a,b,c,d)
848 #define IDirectPlay8Peer_GetPeerInfo(p,a,b,c,d) (p)->lpVtbl->GetPeerInfo(p,a,b,c,d)
849 #define IDirectPlay8Peer_GetPeerAddress(p,a,b,c) (p)->lpVtbl->GetPeerAddress(p,a,b,c)
850 #define IDirectPlay8Peer_GetLocalHostAddresses(p,a,b,c) (p)->lpVtbl->GetLocalHostAddresses(p,a,b,c)
851 #define IDirectPlay8Peer_Close(p,a) (p)->lpVtbl->Close(p,a)
852 #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)
853 #define IDirectPlay8Peer_DestroyPeer(p,a,b,c,d) (p)->lpVtbl->DestroyPeer(p,a,b,c,d)
854 #define IDirectPlay8Peer_ReturnBuffer(p,a,b) (p)->lpVtbl->ReturnBuffer(p,a,b)
855 #define IDirectPlay8Peer_GetPlayerContext(p,a,b,c) (p)->lpVtbl->GetPlayerContext(p,a,b,c)
856 #define IDirectPlay8Peer_GetGroupContext(p,a,b,c) (p)->lpVtbl->GetGroupContext(p,a,b,c)
857 #define IDirectPlay8Peer_GetCaps(p,a,b) (p)->lpVtbl->GetCaps(p,a,b)
858 #define IDirectPlay8Peer_SetCaps(p,a,b) (p)->lpVtbl->SetCaps(p,a,b)
859 #define IDirectPlay8Peer_SetSPCaps(p,a,b,c) (p)->lpVtbl->SetSPCaps(p,a,b,c)
860 #define IDirectPlay8Peer_GetSPCaps(p,a,b,c) (p)->lpVtbl->GetSPCaps(p,a,b,c)
861 #define IDirectPlay8Peer_GetConnectionInfo(p,a,b,c) (p)->lpVtbl->GetConnectionInfo(p,a,b,c)
862 #define IDirectPlay8Peer_RegisterLobby(p,a,b,c) (p)->lpVtbl->RegisterLobby(p,a,b,c)
863 #define IDirectPlay8Peer_TerminateSession(p,a,b,c) (p)->lpVtbl->TerminateSession(p,a,b,c)
864 #else
865 /*** IUnknown methods ***/
866 #define IDirectPlay8Peer_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
867 #define IDirectPlay8Peer_AddRef(p) (p)->AddRef()
868 #define IDirectPlay8Peer_Release(p) (p)->Release()
869 /*** IDirectPlay8Peer methods ***/
870 #define IDirectPlay8Peer_Initialize(p,a,b,c) (p)->Initialize(a,b,c)
871 #define IDirectPlay8Peer_EnumServiceProviders(p,a,b,c,d,e,f) (p)->EnumServiceProviders(a,b,c,d,e,f)
872 #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)
873 #define IDirectPlay8Peer_CancelAsyncOperation(p,a,b) (p)->CancelAsyncOperation(a,b)
874 #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)
875 #define IDirectPlay8Peer_SendTo(p,a,b,c,d,e,f,g) (p)->SendTo(a,b,c,d,e,f,g)
876 #define IDirectPlay8Peer_GetSendQueueInfo(p,a,b,c,d) (p)->GetSendQueueInfo(a,b,c,d)
877 #define IDirectPlay8Peer_Host(p,a,b,c,d,e,f,g) (p)->Host(a,b,c,d,e,f,g)
878 #define IDirectPlay8Peer_GetApplicationDesc(p,a,b,c) (p)->GetApplicationDesc(a,b,c)
879 #define IDirectPlay8Peer_SetApplicationDesc(p,a,b) (p)->SetApplicationDesc(a,b)
880 #define IDirectPlay8Peer_CreateGroup(p,a,b,c,d,e) (p)->CreateGroup(a,b,c,d,e)
881 #define IDirectPlay8Peer_DestroyGroup(p,a,b,c,d) (p)->DestroyGroup(a,b,c,d)
882 #define IDirectPlay8Peer_AddPlayerToGroup(p,a,b,c,d,e) (p)->AddPlayerToGroup(a,b,c,d,e)
883 #define IDirectPlay8Peer_RemovePlayerFromGroup(p,a,b,c,d,e) (p)->RemovePlayerFromGroup(a,b,c,d,e)
884 #define IDirectPlay8Peer_SetGroupInfo(p,a,b,c,d,e) (p)->SetGroupInfo(a,b,c,d,e)
885 #define IDirectPlay8Peer_GetGroupInfo(p,a,b,c,d) (p)->GetGroupInfo(a,b,c,d)
886 #define IDirectPlay8Peer_EnumPlayersAndGroups(p,a,b,c) (p)->EnumPlayersAndGroups(a,b,c)
887 #define IDirectPlay8Peer_EnumGroupMembers(p,a,b,c,d) (p)->EnumGroupMembers(a,b,c,d)
888 #define IDirectPlay8Peer_SetPeerInfo(p,a,b,c,d) (p)->SetPeerInfo(a,b,c,d)
889 #define IDirectPlay8Peer_GetPeerInfo(p,a,b,c,d) (p)->GetPeerInfo(a,b,c,d)
890 #define IDirectPlay8Peer_GetPeerAddress(p,a,b,c) (p)->GetPeerAddress(a,b,c)
891 #define IDirectPlay8Peer_GetLocalHostAddresses(p,a,b,c) (p)->GetLocalHostAddresses(a,b,c)
892 #define IDirectPlay8Peer_Close(p,a) (p)->Close(a)
893 #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)
894 #define IDirectPlay8Peer_DestroyPeer(p,a,b,c,d) (p)->DestroyPeer(a,b,c,d)
895 #define IDirectPlay8Peer_ReturnBuffer(p,a,b) (p)->ReturnBuffer(a,b)
896 #define IDirectPlay8Peer_GetPlayerContext(p,a,b,c) (p)->GetPlayerContext(a,b,c)
897 #define IDirectPlay8Peer_GetGroupContext(p,a,b,c) (p)->GetGroupContext(a,b,c)
898 #define IDirectPlay8Peer_GetCaps(p,a,b) (p)->GetCaps(a,b)
899 #define IDirectPlay8Peer_SetCaps(p,a,b) (p)->SetCaps(a,b)
900 #define IDirectPlay8Peer_SetSPCaps(p,a,b,c) (p)->SetSPCaps(a,b,c)
901 #define IDirectPlay8Peer_GetSPCaps(p,a,b,c) (p)->GetSPCaps(a,b,c)
902 #define IDirectPlay8Peer_GetConnectionInfo(p,a,b,c) (p)->GetConnectionInfo(a,b,c)
903 #define IDirectPlay8Peer_RegisterLobby(p,a,b,c) (p)->RegisterLobby(a,b,c)
904 #define IDirectPlay8Peer_TerminateSession(p,a,b,c) (p)->TerminateSession(a,b,c)
905 #endif
907 /*****************************************************************************
908 * IDirectPlay8ThreadPool interface
910 #define INTERFACE IDirectPlay8ThreadPool
911 DECLARE_INTERFACE_(IDirectPlay8ThreadPool,IUnknown)
913 /*** IUnknown methods ***/
914 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
915 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
916 STDMETHOD_(ULONG,Release)(THIS) PURE;
917 /*** IDirectPlay8ThreadPool methods ***/
918 STDMETHOD(Initialize)(THIS_ PVOID pvUserContext, PFNDPNMESSAGEHANDLER pfn, DWORD dwFlags) PURE;
919 STDMETHOD(Close)(THIS_ DWORD dwFlags) PURE;
920 STDMETHOD(GetThreadCount)(THIS_ DWORD dwProcessorNum, DWORD* pdwNumThreads, DWORD dwFlags) PURE;
921 STDMETHOD(SetThreadCount)(THIS_ DWORD dwProcessorNum, DWORD dwNumThreads, DWORD dwFlags) PURE;
922 STDMETHOD(DoWork)(THIS_ DWORD dwAllowedTimeSlice, DWORD dwFlags) PURE;
924 #undef INTERFACE
926 #if !defined(__cplusplus) || defined(CINTERFACE)
927 /*** IUnknown methods ***/
928 #define IDirectPlay8ThreadPool_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
929 #define IDirectPlay8ThreadPool_AddRef(p) (p)->lpVtbl->AddRef(p)
930 #define IDirectPlay8ThreadPool_Release(p) (p)->lpVtbl->Release(p)
931 /*** IDirectPlay8ThreadPool methods ***/
932 #define IDirectPlay8ThreadPool_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c)
933 #define IDirectPlay8ThreadPool_Close(p,a) (p)->lpVtbl->Close(p,a)
934 #define IDirectPlay8ThreadPool_GetThreadCount(p,a,b,c) (p)->lpVtbl->GetThreadCount(p,a,b,c)
935 #define IDirectPlay8ThreadPool_SetThreadCount(p,a,b,c) (p)->lpVtbl->SetThreadCount(p,a,b,c)
936 #define IDirectPlay8ThreadPool_DoWork(p,a,b) (p)->lpVtbl->DoWork(p,a,b)
937 #else
938 /*** IUnknown methods ***/
939 #define IDirectPlay8ThreadPool_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
940 #define IDirectPlay8ThreadPool_AddRef(p) (p)->AddRef()
941 #define IDirectPlay8ThreadPool_Release(p) (p)->Release()
942 /*** IDirectPlay8ThreadPool methods ***/
943 #define IDirectPlay8ThreadPool_Initialize(p,a,b,c) (p)->Initialize(a,b,c)
944 #define IDirectPlay8ThreadPool_Close(p,a) (p)->Close(a)
945 #define IDirectPlay8ThreadPool_GetThreadCount(p,a,b,c) (p)->GetThreadCount(a,b,c)
946 #define IDirectPlay8ThreadPool_SetThreadCount(p,a,b,c) (p)->SetThreadCount(a,b,c)
947 #define IDirectPlay8ThreadPool_DoWork(p,a,b) (p)->DoWork(a,b)
948 #endif
950 /*****************************************************************************
951 * IDirectPlay8NATResolver interface
953 #define INTERFACE IDirectPlay8NATResolver
954 DECLARE_INTERFACE_(IDirectPlay8NATResolver,IUnknown)
956 /*** IUnknown methods ***/
957 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
958 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
959 STDMETHOD_(ULONG,Release)(THIS) PURE;
960 /*** IDirectPlay8NATResolver methods ***/
961 STDMETHOD(Initialize)(THIS_ PVOID pvUserContext, PFNDPNMESSAGEHANDLER pfn, DWORD dwFlags) PURE;
962 STDMETHOD(Start)(THIS_ IDirectPlay8Address** ppDevices, DWORD dwNumDevices, DWORD dwFlags) PURE;
963 STDMETHOD(Close)(THIS_ DWORD dwFlags) PURE;
964 STDMETHOD(EnumDevices)(THIS_ DPN_SERVICE_PROVIDER_INFO* pSPInfoBuffer, PDWORD pdwBufferSize, PDWORD pdwNumDevices, DWORD dwFlags) PURE;
965 STDMETHOD(GetAddresses)(THIS_ IDirectPlay8Address** ppAddresses, DWORD* pdwNumAddresses, DWORD dwFlags) PURE;
967 #undef INTERFACE
969 #if !defined(__cplusplus) || defined(CINTERFACE)
970 /*** IUnknown methods ***/
971 #define IDirectPlay8NATResolver_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
972 #define IDirectPlay8NATResolver_AddRef(p) (p)->lpVtbl->AddRef(p)
973 #define IDirectPlay8NATResolver_Release(p) (p)->lpVtbl->Release(p)
974 /*** IDirectPlay8NATResolver methods ***/
975 #define IDirectPlay8NATResolver_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c)
976 #define IDirectPlay8NATResolver_Start(p,a,b,c) (p)->lpVtbl->Start(p,a,b,c)
977 #define IDirectPlay8NATResolver_Close(p,a) (p)->lpVtbl->Close(p,a)
978 #define IDirectPlay8NATResolver_EnumDevices(p,a,b,c,d) (p)->lpVtbl->EnumDevices(p,a,b,c,d)
979 #define IDirectPlay8NATResolver_GetAddresses(p,a,b,c) (p)->lpVtbl->GetAddresses(p,a,b,c)
980 #else
981 /*** IUnknown methods ***/
982 #define IDirectPlay8NATResolver_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
983 #define IDirectPlay8NATResolver_AddRef(p) (p)->AddRef()
984 #define IDirectPlay8NATResolver_Release(p) (p)->Release()
985 /*** IDirectPlay8NATResolver methods ***/
986 #define IDirectPlay8NATResolver_Initialize(p,a,b,c) (p)->Initialize(a,b,c)
987 #define IDirectPlay8NATResolver_Start(p,a,b,c) (p)->Start(a,b,c)
988 #define IDirectPlay8NATResolver_Close(p,a) (p)->Close(a)
989 #define IDirectPlay8NATResolver_EnumDevices(p,a,b,c,d) (p)->EnumDevices(a,b,c,d)
990 #define IDirectPlay8NATResolver_GetAddresses(p,a,b,c) (p)->GetAddresses(a,b,c)
991 #endif
993 /* Export functions */
995 HRESULT WINAPI DirectPlay8Create(const CLSID* pcIID, LPVOID* ppvInterface, IUnknown* pUnknown);
997 #ifdef __cplusplus
999 #endif
1001 #endif