Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2212 lines
105 KiB

  1. /*==========================================================================
  2. *
  3. * Copyright (C) 1998-2002 Microsoft Corporation. All Rights Reserved.
  4. *
  5. * File: DPlay8.h
  6. * Content: DirectPlay8 include file
  7. //@@BEGIN_MSINTERNAL
  8. * History:
  9. * Date By Reason
  10. * ==========================
  11. * 10/12/98 jwo created
  12. * 11/06/98 ejs removed BUFFERELEMENT, reversed fields in BUFFERDESC, defined new ERRORs
  13. * 11/10/98 ejs started adding upper-edge COM interface for DirectPlay8
  14. * 07/20/99 mjn added interface GUIDs for DirectPlay8 peer,client and server
  15. * 07/29/99 mjn changed DPNID typedef from HANDLE to DWORD
  16. * 08/09/99 mjn added DPN_SERVICE_PROVIDER_INFO structure for SP and adapter enumeration
  17. * 12/03/99 jtk Replaced IID_IDirectPlay8 with the Client, Server, and Peer interfaces
  18. * 01/08/00 mjn Added DPNERR's and fixed DPN_APPLICATION_DESC
  19. * 01/09/00 mjn Added dwSize to DPN_APPLICATION_DESC
  20. * 01/14/00 mjn Added pvUserContext to Host API call
  21. * 01/16/00 mjn New DPlay8 MessageHandler and associated structures
  22. * 01/18/00 mjn Added DPNGROUP_AUTODESTRUCT flag
  23. * 01/22/00 mjn Added ability for Host to destroy a player
  24. * 01/24/00 mjn Reordered error codes and DPN_MSGID's
  25. * 01/24/00 mjn Added DPNERR_NOHOSTPLAYER error
  26. * 01/27/00 vpo Removed all remaing traces of LP pointers.
  27. * 01/28/00 mjn Implemented ReturnBuffer in API and DPN_MSGID_CONNECTION_TERMINATED
  28. * 02/01/00 mjn Added GetCaps and SetCaps to APIs and player context values to messages
  29. * 02/13/00 jtk Renamed to DPlay8.h
  30. * 02/15/00 mjn Added INFO flags and MS_INTERNAL stuff
  31. * 02/17/00 rmt Added additional error codes for address library
  32. * 02/17/00 mjn Implemented GetPlayerContext and GetGroupContext
  33. * 02/17/00 mjn Reordered parameters in EnumServiceProviders,EnumHosts,Connect,Host
  34. * 03/17/00 rmt Added Get/SetSPCaps, GetConnectionInfo and supporting structures
  35. * rmt Updated Caps structure.
  36. * rmt Updated Security structures to add dwSize member
  37. * 03/22/00 mjn changed dpid's to dpnid's
  38. * mjn removed DPNGROUP_ALLPLAYERS and added DPNID_ALL_PLAYERS_GROUP
  39. * mjn added dwPriority to Send and SendTo
  40. * mjn removed pDpnid from CreateGroup
  41. * mjn replaced HANDLE with DPNHANDLE
  42. * mjn Added dpnid to GetSendQueueInfo for Server and Peer interfaces
  43. * mjn Changed RegisterMessageHandler to Initialize
  44. * 03/23/00 mjn Added pvGroupContext to CreateGroup
  45. * mjn Added pvPlayerContext to Host and Connect
  46. * mjn Added RegisterLobby API Call
  47. * 03/24/00 rmt Added IsEqual function return codes
  48. * mjn Added pvPlayerContext to INDICATE_CONNECT and renamed pvUserContext to pvReplyContext
  49. * 03/25/00 rmt Added new fields to caps
  50. * 04/04/00 rmt Added new flag to enable/disable param validation on Initialize call
  51. * rmt Added new flag to enable/disable DPNSVR functionality in session.
  52. * 04/04/00 mjn Added DPNERR_INVALIDVERSION
  53. * 04/05/00 mjn Added TerminateSession() API Call
  54. * 04/04/00 aarono made security structures internal, since not yet supported
  55. * 04/05/00 mjn Modified DPNMSG_HOST_DESTROY_PLAYER structure
  56. * mjn Modified DestroyClient to take void* instead of BYTE* for data
  57. * mjn Added typedefs for security structures
  58. * 04/06/00 mjn Added Address to INDICATE_CONNECT message
  59. * mjn Added GetClientAddress, GetServerAddress, GetPeerAddress to API
  60. * mjn Added GetHostAddress to API
  61. * 04/17/00 mjn Removed DPNPLAYER_SERVER
  62. * mjn Replaced BUFFERDESC with DPN_BUFFER_DESC in API
  63. * 04/18/00 mjn Added ResponseData to DPNMSG_ENUM_HOSTS_QUERY
  64. * mjn Added DPN_MSGID_RETURN_BUFFER and DPNMSG_RETURN_BUFFER
  65. * mjn Removed TerminateSession from Server interface.
  66. * 04/19/00 mjn SendTo and Send API calls accept a range of DPN_BUFFER_DESCs and a count
  67. * mjn Removed DPN_BUFFER_DESC from DPNMSG_ENUM_HOSTS_QUERY and DPNMSG_ENUM_HOSTS_RESPONSE structs
  68. * mjn Removed hAsyncOp (unused) from DPNMSG_INDICATE_CONNECT
  69. * 05/02/00 mjn Removed DPN_ACCEPTED and DPN_REJECTED #define's
  70. * 05/03/00 mjn Added DPNENUMSERVICEPROVIDERS_ALL flag
  71. * 05/04/00 rmt Bug #34156 - No PDPNID or PDPNHANDLE defined
  72. * 05/31/00 mjn Added SYNC flags for EACH API call which supports synchronous operation
  73. * 06/05/00 mjn Added short-cut interface macros and converted errors to HEX
  74. * 06/09/00 rmt Updates to split CLSID and allow whistler compat and support external create funcs
  75. * 06/12/00 mjn MSINTERNAL'd out DPNSEND_ENCRYPTED,DPNSEND_SIGNED,DPNGROUP_MULTICAST and DPNENUM_GROUP_MULTICAST flags
  76. * 06/15/00 rmt Bug #36380 - Removing old CLSID
  77. * 06/23/00 mjn Added DPNSEND_PRIORITY_HIGH and DPNSEND_PRIORITY_LOW flags
  78. * mjn Removed dwPriority from Send() and SendTo() API calls
  79. * 06/26/00 mjn Added dwReason to DPNMSG_DESTROY_PLAYER and DPNMSG_DESTROY_GROUP structures and added reason constants
  80. * mjn MAJOR API/FLAGS/CONSTANTS/STRUCTURES RENAME
  81. * 06/27/00 mjn Added DPNGETSENDQUEUEINFO_PRIORITY_HIGH and DPNGETSENDQUEUEINFO_PRIORITY_LOW flags
  82. * mjn Dropped pvPlayerContext from IDirectPlay8Client::Connect()
  83. * mjn Added DPNENUMHOSTS_DONTSENDADDRESS,DPNSEND_NONSEQUENTIAL and DPNGETSENDQUEUEINFO_PRIORITY_NORMAL flags
  84. * mjn Renumbered SEND flags
  85. * 07/09/00 rmt Bug #38323 When registering lobby object w/DP8 object must be able to specify connection to update
  86. * 07/29/00 mjn Added DPN_MSGID_INDICATED_CONNECT_ABORTED and DPNMSG_INDICATED_CONNECT_ABORTED structure
  87. * mjn Added pvTerminateData and dwTerminateDataSize to DPNMSG_CONNECTION_TERMINATED structure
  88. * mjn Added hResultCode to DPNMSG_RETURN_BUFFER structure
  89. * mjn Added hResultCode to DPNMSG_TERMINATE_SESSION structure
  90. * mjn Added dwMaxResponseDataSize to DPNMSG_ENUM_HOSTS_QUERY structure
  91. * mjn Changed dwRetryCount to dwEnumCount in EnumHosts API call (no impact - just name change)
  92. * mjn Added DPNERR_ENUMQUERYTOOLARGE,DPNERR_ENUMRESPONSETOOLARGE,DPNERR_HOSTTERMINATEDSESSION
  93. * mjn Reordered DPN_MSGID's alphabetically
  94. * 07/30/00 mjn Added pAddressDevice to DPNMSG_INDICATE_CONNECT
  95. * 07/31/00 mjn Added DPNDESTROYPLAYERREASON_SESSIONTERMINATED,DPNDESTROYPLAYERREASON_HOSTDESTROYEDPLAYER,DPNDESTROYGROUPREASON_SESSIONTERMINATED
  96. * mjn Added DPNERR_PLAYERNOTREACHABLE
  97. * mjn Renamed pAddress to pAddressPlayer in DPNMSG_INDICATE_CONNECT
  98. * mjn Renamed DPN_MSGID_ASYNC_OPERATION_COMPLETE to DPN_MSGID_ASYNC_OP_COMPLETE
  99. * mjn Renamed dwDefaultEnumRetryCount to dwDefaultEnumCount in DPN_SP_CAPS
  100. * mjn Removed DPNENUM_ALL
  101. * mjn Removed DPN_MSGID_HOST_DESTROY_PLAYER
  102. * mjn Removed DPN_MSGID_CONNECTION_TERMINATED
  103. * mjn Removed ALL_ADAPTERS_GUID
  104. * 08/03/2000 rmt Bug #41246 - Registering lobby in wrong state returns ambiguous return codes
  105. * 08/03/00 mjn Added dwFlags to GetPeerAddress(),GetServerAddress(),GetClientAddress(),GetLocalHostAddresses(),
  106. * Close(),ReturnBuffer(),GetPlayerContext(),GetGroupContext(),GetCaps(),GetSPCaps(),GetConnectionInfo()
  107. * mjn Removed DPNMSG_CONNECTION_TERMINATED,DPNMSG_HOST_DESTROY_PLAYER
  108. * mjn Added dwRoundTripTime to DPNMSG_ENUM_HOSTS_RESPONSE
  109. * mjn Changed GUID *pGuid to GUID guid in DPN_SERVICE_PROVIDER_INFO and added pvReserved,dwReserved
  110. * 08/06/2000 rmt Bug #41185 - Cleanup dplay8.h header file.
  111. * 08/08/2000 rmt Bug #41724 - Users should only have to include one header
  112. * rmt Bug #41705 - DPNERR_PENDING should be defined as STATUS_PENDING
  113. * 09/26/2000 masonb Removed Private Protocol Testing interface, placed in core as private header dpprot.h
  114. * 10/04/2000 mjn Added DPNERR_DATATOOLARGE
  115. * 03/17/2001 rmt WINBUG #342420 - Commented out create functions
  116. * 03/22/2001 masonb Added internal connect info structure for performance tuning
  117. * 10/05/2001 vanceo Added IDirectPlay8Multicast interface
  118. * 10/31/2001 vanceo Added IDirectPlay8ThreadPool interface
  119. * 07/22/2002 simonpow Added signing flags
  120. //@@END_MSINTERNAL
  121. *
  122. ***************************************************************************/
  123. #ifndef __DIRECTPLAY8_H__
  124. #define __DIRECTPLAY8_H__
  125. //@@BEGIN_MSINTERNAL
  126. #ifdef _XBOX
  127. #ifdef XBOX_ON_DESKTOP
  128. #include <ole2.h> // for DECLARE_INTERFACE_ and HRESULT
  129. #endif // XBOX_ON_DESKTOP
  130. #undef DECLARE_INTERFACE_
  131. #define DECLARE_INTERFACE_(iface, baseiface) DECLARE_INTERFACE(iface)
  132. #else // ! _XBOX
  133. //@@END_MSINTERNAL
  134. #include <ole2.h> // for DECLARE_INTERFACE_ and HRESULT
  135. //@@BEGIN_MSINTERNAL
  136. #endif // ! _XBOX
  137. //@@END_MSINTERNAL
  138. #include "dpaddr.h"
  139. //@@BEGIN_MSINTERNAL
  140. #if defined(WINCE) && !defined(DPNBUILD_WINCE_FINAL)
  141. #define DX_EXPIRE_YEAR 2002
  142. #define DX_EXPIRE_MONTH 3 /* Jan=1, Feb=2, etc .. */
  143. #define DX_EXPIRE_DAY 1
  144. #define DX_EXPIRE_TEXT TEXT("This pre-release version of DirectPlay has expired, please upgrade to the latest version.")
  145. #endif // WINCE && !DPNBUILD_WINCE_FINAL
  146. //@@END_MSINTERNAL
  147. #ifdef __cplusplus
  148. extern "C" {
  149. #endif
  150. //@@BEGIN_MSINTERNAL
  151. #ifndef _XBOX
  152. //@@END_MSINTERNAL
  153. /****************************************************************************
  154. *
  155. * DirectPlay8 CLSIDs
  156. *
  157. ****************************************************************************/
  158. // {743F1DC6-5ABA-429f-8BDF-C54D03253DC2}
  159. DEFINE_GUID(CLSID_DirectPlay8Client,
  160. 0x743f1dc6, 0x5aba, 0x429f, 0x8b, 0xdf, 0xc5, 0x4d, 0x3, 0x25, 0x3d, 0xc2);
  161. //@@BEGIN_MSINTERNAL
  162. #ifndef DPNBUILD_NOSERVER
  163. //@@END_MSINTERNAL
  164. // {DA825E1B-6830-43d7-835D-0B5AD82956A2}
  165. DEFINE_GUID(CLSID_DirectPlay8Server,
  166. 0xda825e1b, 0x6830, 0x43d7, 0x83, 0x5d, 0xb, 0x5a, 0xd8, 0x29, 0x56, 0xa2);
  167. //@@BEGIN_MSINTERNAL
  168. #endif // ! DPNBUILD_NOSERVER
  169. //@@END_MSINTERNAL
  170. // {286F484D-375E-4458-A272-B138E2F80A6A}
  171. DEFINE_GUID(CLSID_DirectPlay8Peer,
  172. 0x286f484d, 0x375e, 0x4458, 0xa2, 0x72, 0xb1, 0x38, 0xe2, 0xf8, 0xa, 0x6a);
  173. //@@BEGIN_MSINTERNAL
  174. // CLSIDs added for DirectX 9
  175. #ifndef DPNBUILD_NOMULTICAST
  176. // {C1B3D036-A5E9-43ee-8F46-69D57669D003}
  177. DEFINE_GUID(CLSID_DirectPlay8Multicast,
  178. 0xc1b3d036, 0xa5e9, 0x43ee, 0x8f, 0x46, 0x69, 0xd5, 0x76, 0x69, 0xd0, 0x3);
  179. #endif // ! DPNBUILD_NOMULTICAST
  180. // {FC47060E-6153-4b34-B975-8E4121EB7F3C}
  181. DEFINE_GUID(CLSID_DirectPlay8ThreadPool,
  182. 0xfc47060e, 0x6153, 0x4b34, 0xb9, 0x75, 0x8e, 0x41, 0x21, 0xeb, 0x7f, 0x3c);
  183. #endif // ! _XBOX
  184. //@@END_MSINTERNAL
  185. /****************************************************************************
  186. *
  187. * DirectPlay8 Interface IIDs
  188. *
  189. ****************************************************************************/
  190. //@@BEGIN_MSINTERNAL
  191. #ifdef _XBOX
  192. typedef DWORD DP8REFIID;
  193. #define IID_IDirectPlay8Client 0x00000001
  194. #ifndef DPNBUILD_NOSERVER
  195. #define IID_IDirectPlay8Server 0x00000002
  196. #endif // ! DPNBUILD_NOSERVER
  197. #define IID_IDirectPlay8Peer 0x00000003
  198. #ifndef DPNBUILD_NOMULTICAST
  199. #define IID_IDirectPlay8Multicast 0x00000004 // Xbox does not support multicast
  200. #endif // ! DPNBUILD_NOMULTICAST
  201. #define IID_IDirectPlay8ThreadPool 0x00000005 // Xbox does not support thread pool
  202. #define IID_IDirectPlay8ThreadPoolWork 0x00000006
  203. #else // ! _XBOX
  204. //@@END_MSINTERNAL
  205. typedef REFIID DP8REFIID;
  206. // {5102DACD-241B-11d3-AEA7-006097B01411}
  207. DEFINE_GUID(IID_IDirectPlay8Client,
  208. 0x5102dacd, 0x241b, 0x11d3, 0xae, 0xa7, 0x0, 0x60, 0x97, 0xb0, 0x14, 0x11);
  209. //@@BEGIN_MSINTERNAL
  210. #ifndef DPNBUILD_NOSERVER
  211. //@@END_MSINTERNAL
  212. // {5102DACE-241B-11d3-AEA7-006097B01411}
  213. DEFINE_GUID(IID_IDirectPlay8Server,
  214. 0x5102dace, 0x241b, 0x11d3, 0xae, 0xa7, 0x0, 0x60, 0x97, 0xb0, 0x14, 0x11);
  215. //@@BEGIN_MSINTERNAL
  216. #endif // ! DPNBUILD_NOSERVER
  217. //@@END_MSINTERNAL
  218. // {5102DACF-241B-11d3-AEA7-006097B01411}
  219. DEFINE_GUID(IID_IDirectPlay8Peer,
  220. 0x5102dacf, 0x241b, 0x11d3, 0xae, 0xa7, 0x0, 0x60, 0x97, 0xb0, 0x14, 0x11);
  221. //@@BEGIN_MSINTERNAL
  222. // IIDs added for DirectX 9
  223. #ifndef DPNBUILD_NOMULTICAST
  224. // {5102DAD0-241B-11d3-AEA7-006097B01411}
  225. DEFINE_GUID(IID_IDirectPlay8Multicast,
  226. 0x5102dad0, 0x241b, 0x11d3, 0xae, 0xa7, 0x0, 0x60, 0x97, 0xb0, 0x14, 0x11);
  227. #endif // ! DPNBUILD_NOMULTICAST
  228. // {0D22EE73-4A46-4a0d-89B2-045B4D666425}
  229. DEFINE_GUID(IID_IDirectPlay8ThreadPool,
  230. 0xd22ee73, 0x4a46, 0x4a0d, 0x89, 0xb2, 0x4, 0x5b, 0x4d, 0x66, 0x64, 0x25);
  231. // {0D22EE74-4A46-4a0d-89B2-045B4D666425}
  232. DEFINE_GUID(IID_IDirectPlay8ThreadPoolWork,
  233. 0xd22ee74, 0x4a46, 0x4a0d, 0x89, 0xb2, 0x4, 0x5b, 0x4d, 0x66, 0x64, 0x25);
  234. //@@END_MSINTERNAL
  235. /****************************************************************************
  236. *
  237. * DirectPlay8 Service Provider GUIDs
  238. *
  239. ****************************************************************************/
  240. //@@BEGIN_MSINTERNAL
  241. #ifndef DPNBUILD_NOIPX
  242. //@@END_MSINTERNAL
  243. // {53934290-628D-11D2-AE0F-006097B01411}
  244. DEFINE_GUID(CLSID_DP8SP_IPX,
  245. 0x53934290, 0x628d, 0x11d2, 0xae, 0xf, 0x0, 0x60, 0x97, 0xb0, 0x14, 0x11);
  246. //@@BEGIN_MSINTERNAL
  247. #endif // ! DPNBUILD_NOIPX
  248. #ifndef DPNBUILD_NOSERIALSP
  249. //@@END_MSINTERNAL
  250. // {6D4A3650-628D-11D2-AE0F-006097B01411}
  251. DEFINE_GUID(CLSID_DP8SP_MODEM,
  252. 0x6d4a3650, 0x628d, 0x11d2, 0xae, 0xf, 0x0, 0x60, 0x97, 0xb0, 0x14, 0x11);
  253. // {743B5D60-628D-11D2-AE0F-006097B01411}
  254. DEFINE_GUID(CLSID_DP8SP_SERIAL,
  255. 0x743b5d60, 0x628d, 0x11d2, 0xae, 0xf, 0x0, 0x60, 0x97, 0xb0, 0x14, 0x11);
  256. //@@BEGIN_MSINTERNAL
  257. #endif // ! DPNBUILD_NOSERIALSP
  258. //@@END_MSINTERNAL
  259. // {EBFE7BA0-628D-11D2-AE0F-006097B01411}
  260. DEFINE_GUID(CLSID_DP8SP_TCPIP,
  261. 0xebfe7ba0, 0x628d, 0x11d2, 0xae, 0xf, 0x0, 0x60, 0x97, 0xb0, 0x14, 0x11);
  262. //@@BEGIN_MSINTERNAL
  263. // Service providers added for DirectX 9
  264. #ifndef DPNBUILD_NOBLUETOOTHSP
  265. // {995513AF-3027-4b9a-956E-C772B3F78006}
  266. DEFINE_GUID(CLSID_DP8SP_BLUETOOTH,
  267. 0x995513af, 0x3027, 0x4b9a, 0x95, 0x6e, 0xc7, 0x72, 0xb3, 0xf7, 0x80, 0x6);
  268. #endif // !DPNBUILD_NOBLUETOOTHSP
  269. #ifndef DPNBUILD_NOMULTICAST
  270. /****************************************************************************
  271. *
  272. * DirectPlay8 Pre-defined Multicast Scope GUIDs
  273. *
  274. ****************************************************************************/
  275. // {83539631-B559-4815-8E4E-39CE60EBF27A}
  276. DEFINE_GUID(GUID_DP8MULTICASTSCOPE_PRIVATE,
  277. 0x83539631, 0xb559, 0x4815, 0x8e, 0x4e, 0x39, 0xce, 0x60, 0xeb, 0xf2, 0x7a);
  278. // {83539632-B559-4815-8E4E-39CE60EBF27A}
  279. DEFINE_GUID(GUID_DP8MULTICASTSCOPE_LOCAL,
  280. 0x83539632, 0xb559, 0x4815, 0x8e, 0x4e, 0x39, 0xce, 0x60, 0xeb, 0xf2, 0x7a);
  281. // {83539633-B559-4815-8E4E-39CE60EBF27A}
  282. DEFINE_GUID(GUID_DP8MULTICASTSCOPE_GLOBAL,
  283. 0x83539633, 0xb559, 0x4815, 0x8e, 0x4e, 0x39, 0xce, 0x60, 0xeb, 0xf2, 0x7a);
  284. #endif // ! DPNBUILD_NOMULTICAST
  285. #endif // ! _XBOX
  286. //@@END_MSINTERNAL
  287. /****************************************************************************
  288. *
  289. * DirectPlay8 Interface Pointer definitions
  290. *
  291. ****************************************************************************/
  292. typedef struct IDirectPlay8Client *PDIRECTPLAY8CLIENT;
  293. //@@BEGIN_MSINTERNAL
  294. #ifndef DPNBUILD_NOSERVER
  295. //@@END_MSINTERNAL
  296. typedef struct IDirectPlay8Server *PDIRECTPLAY8SERVER;
  297. //@@BEGIN_MSINTERNAL
  298. #endif // ! DPNBUILD_NOSERVER
  299. //@@END_MSINTERNAL
  300. typedef struct IDirectPlay8Peer *PDIRECTPLAY8PEER;
  301. //@@BEGIN_MSINTERNAL
  302. #ifndef DPNBUILD_NOMULTICAST
  303. typedef struct IDirectPlay8Multicast *PDIRECTPLAY8MULTICAST;
  304. #endif // ! DPNBUILD_NOMULTICAST
  305. typedef struct IDirectPlay8ThreadPool *PDIRECTPLAY8THREADPOOL;
  306. typedef struct IDirectPlay8ThreadPoolWork *PDIRECTPLAY8THREADPOOLWORK;
  307. //@@END_MSINTERNAL
  308. /****************************************************************************
  309. *
  310. * DirectPlay8 Forward Declarations For External Types
  311. *
  312. ****************************************************************************/
  313. typedef struct IDirectPlay8LobbiedApplication *PDNLOBBIEDAPPLICATION;
  314. typedef struct IDirectPlay8Address IDirectPlay8Address;
  315. //@@BEGIN_MSINTERNAL
  316. #ifdef XBOX_ON_DESKTOP
  317. typedef struct _XNKID XNKID;
  318. typedef struct _XNKEY XNKEY;
  319. #endif // XBOX_ON_DESKTOP
  320. //@@END_MSINTERNAL
  321. /****************************************************************************
  322. *
  323. * DirectPlay8 Callback Functions
  324. *
  325. ****************************************************************************/
  326. //
  327. // Callback Function Type Definition
  328. //
  329. typedef HRESULT (WINAPI *PFNDPNMESSAGEHANDLER)(PVOID,DWORD,PVOID);
  330. //@@BEGIN_MSINTERNAL
  331. typedef void (WINAPI *PFNDPTNWORKCALLBACK)(void * const pvContext, void * const pvTimerData, const UINT uiTimerUnique);
  332. //@@END_MSINTERNAL
  333. /****************************************************************************
  334. *
  335. * DirectPlay8 Datatypes (Non-Structure / Non-Message)
  336. *
  337. ****************************************************************************/
  338. //
  339. // Player IDs. Used to uniquely identify a player in a session
  340. //
  341. typedef DWORD DPNID, *PDPNID;
  342. //
  343. // Used as identifiers for operations
  344. //
  345. typedef DWORD DPNHANDLE, *PDPNHANDLE;
  346. /****************************************************************************
  347. *
  348. * DirectPlay8 Message Identifiers
  349. *
  350. ****************************************************************************/
  351. #define DPN_MSGID_OFFSET 0xFFFF0000
  352. #define DPN_MSGID_ADD_PLAYER_TO_GROUP ( DPN_MSGID_OFFSET | 0x0001 )
  353. #define DPN_MSGID_APPLICATION_DESC ( DPN_MSGID_OFFSET | 0x0002 )
  354. #define DPN_MSGID_ASYNC_OP_COMPLETE ( DPN_MSGID_OFFSET | 0x0003 )
  355. #define DPN_MSGID_CLIENT_INFO ( DPN_MSGID_OFFSET | 0x0004 )
  356. #define DPN_MSGID_CONNECT_COMPLETE ( DPN_MSGID_OFFSET | 0x0005 )
  357. #define DPN_MSGID_CREATE_GROUP ( DPN_MSGID_OFFSET | 0x0006 )
  358. #define DPN_MSGID_CREATE_PLAYER ( DPN_MSGID_OFFSET | 0x0007 )
  359. #define DPN_MSGID_DESTROY_GROUP ( DPN_MSGID_OFFSET | 0x0008 )
  360. #define DPN_MSGID_DESTROY_PLAYER ( DPN_MSGID_OFFSET | 0x0009 )
  361. #define DPN_MSGID_ENUM_HOSTS_QUERY ( DPN_MSGID_OFFSET | 0x000a )
  362. #define DPN_MSGID_ENUM_HOSTS_RESPONSE ( DPN_MSGID_OFFSET | 0x000b )
  363. #define DPN_MSGID_GROUP_INFO ( DPN_MSGID_OFFSET | 0x000c )
  364. #define DPN_MSGID_HOST_MIGRATE ( DPN_MSGID_OFFSET | 0x000d )
  365. #define DPN_MSGID_INDICATE_CONNECT ( DPN_MSGID_OFFSET | 0x000e )
  366. #define DPN_MSGID_INDICATED_CONNECT_ABORTED ( DPN_MSGID_OFFSET | 0x000f )
  367. #define DPN_MSGID_PEER_INFO ( DPN_MSGID_OFFSET | 0x0010 )
  368. #define DPN_MSGID_RECEIVE ( DPN_MSGID_OFFSET | 0x0011 )
  369. #define DPN_MSGID_REMOVE_PLAYER_FROM_GROUP ( DPN_MSGID_OFFSET | 0x0012 )
  370. #define DPN_MSGID_RETURN_BUFFER ( DPN_MSGID_OFFSET | 0x0013 )
  371. #define DPN_MSGID_SEND_COMPLETE ( DPN_MSGID_OFFSET | 0x0014 )
  372. #define DPN_MSGID_SERVER_INFO ( DPN_MSGID_OFFSET | 0x0015 )
  373. #define DPN_MSGID_TERMINATE_SESSION ( DPN_MSGID_OFFSET | 0x0016 )
  374. //@@BEGIN_MSINTERNAL
  375. // Messages added for DirectX 9
  376. #define DPN_MSGID_CREATE_THREAD ( DPN_MSGID_OFFSET | 0x0017 )
  377. #define DPN_MSGID_DESTROY_THREAD ( DPN_MSGID_OFFSET | 0x0018 )
  378. #ifndef DPNBUILD_NOMULTICAST
  379. #define DPN_MSGID_CREATE_SENDER_CONTEXT ( DPN_MSGID_OFFSET | 0x0019 )
  380. #define DPN_MSGID_DESTROY_SENDER_CONTEXT ( DPN_MSGID_OFFSET | 0x001a )
  381. #define DPN_MSGID_JOIN_COMPLETE ( DPN_MSGID_OFFSET | 0x001b )
  382. #define DPN_MSGID_RECEIVE_MULTICAST ( DPN_MSGID_OFFSET | 0x001c )
  383. #endif // ! DPNBUILD_NOMULTICAST
  384. //@@END_MSINTERNAL
  385. /****************************************************************************
  386. *
  387. * DirectPlay8 Constants
  388. *
  389. ****************************************************************************/
  390. #define DPNID_ALL_PLAYERS_GROUP 0
  391. //
  392. // DESTROY_GROUP reasons
  393. //
  394. #define DPNDESTROYGROUPREASON_NORMAL 0x0001
  395. #define DPNDESTROYGROUPREASON_AUTODESTRUCTED 0x0002
  396. #define DPNDESTROYGROUPREASON_SESSIONTERMINATED 0x0003
  397. //
  398. // DESTROY_PLAYER reasons
  399. //
  400. #define DPNDESTROYPLAYERREASON_NORMAL 0x0001
  401. #define DPNDESTROYPLAYERREASON_CONNECTIONLOST 0x0002
  402. #define DPNDESTROYPLAYERREASON_SESSIONTERMINATED 0x0003
  403. #define DPNDESTROYPLAYERREASON_HOSTDESTROYEDPLAYER 0x0004
  404. #define DPN_MAX_APPDESC_RESERVEDDATA_SIZE 64
  405. /****************************************************************************
  406. *
  407. * DirectPlay8 Flags
  408. *
  409. ****************************************************************************/
  410. //
  411. // Asynchronous operation flags (for Async Ops)
  412. //
  413. #define DPNOP_SYNC 0x80000000
  414. //
  415. // Add player to group flags (for AddPlayerToGroup)
  416. //
  417. #define DPNADDPLAYERTOGROUP_SYNC DPNOP_SYNC
  418. //
  419. // Cancel flags
  420. //
  421. #define DPNCANCEL_CONNECT 0x00000001
  422. #define DPNCANCEL_ENUM 0x00000002
  423. #define DPNCANCEL_SEND 0x00000004
  424. //@@BEGIN_MSINTERNAL
  425. #ifndef DPNBUILD_NOMULTICAST
  426. #define DPNCANCEL_JOIN 0x00000008
  427. #endif // ! DPNBUILD_NOMULTICAST
  428. //@@END_MSINTERNAL
  429. #define DPNCANCEL_ALL_OPERATIONS 0x00008000
  430. //@@BEGIN_MSINTERNAL
  431. // Flags added for DirectX 9
  432. #define DPNCANCEL_PLAYER_SENDS 0x80000000
  433. #define DPNCANCEL_PLAYER_SENDS_PRIORITY_HIGH 0x00010000
  434. #define DPNCANCEL_PLAYER_SENDS_PRIORITY_NORMAL 0x00020000
  435. #define DPNCANCEL_PLAYER_SENDS_PRIORITY_LOW 0x00040000
  436. //
  437. // Close flags (for Close, added for DirectX 9)
  438. //
  439. #define DPNCLOSE_IMMEDIATE 0x00000001
  440. //@@END_MSINTERNAL
  441. //
  442. // Connect flags (for Connect)
  443. //
  444. #define DPNCONNECT_SYNC DPNOP_SYNC
  445. #define DPNCONNECT_OKTOQUERYFORADDRESSING 0x0001
  446. //
  447. // Create group flags (for CreateGroup)
  448. //
  449. #define DPNCREATEGROUP_SYNC DPNOP_SYNC
  450. //
  451. // Destroy group flags (for DestroyGroup)
  452. //
  453. #define DPNDESTROYGROUP_SYNC DPNOP_SYNC
  454. //
  455. // Enumerate clients and groups flags (for EnumPlayersAndGroups)
  456. //
  457. #define DPNENUM_PLAYERS 0x0001
  458. #define DPNENUM_GROUPS 0x0010
  459. //
  460. // Enum hosts flags (for EnumHosts)
  461. //
  462. #define DPNENUMHOSTS_SYNC DPNOP_SYNC
  463. #define DPNENUMHOSTS_OKTOQUERYFORADDRESSING 0x0001
  464. #define DPNENUMHOSTS_NOBROADCASTFALLBACK 0x0002
  465. //
  466. // Enum service provider flags (for EnumSP)
  467. //
  468. #define DPNENUMSERVICEPROVIDERS_ALL 0x0001
  469. //
  470. // Get send queue info flags (for GetSendQueueInfo)
  471. //
  472. #define DPNGETSENDQUEUEINFO_PRIORITY_NORMAL 0x0001
  473. #define DPNGETSENDQUEUEINFO_PRIORITY_HIGH 0x0002
  474. #define DPNGETSENDQUEUEINFO_PRIORITY_LOW 0x0004
  475. //
  476. // Group information flags (for Group Info)
  477. //
  478. #define DPNGROUP_AUTODESTRUCT 0x0001
  479. //
  480. // Host flags (for Host)
  481. //
  482. #define DPNHOST_OKTOQUERYFORADDRESSING 0x0001
  483. //
  484. // Set info
  485. //
  486. #define DPNINFO_NAME 0x0001
  487. #define DPNINFO_DATA 0x0002
  488. //
  489. // Initialize flags (for Initialize)
  490. //
  491. //@@BEGIN_MSINTERNAL
  492. #ifndef DPNBUILD_NOPARAMVAL
  493. //@@END_MSINTERNAL
  494. #define DPNINITIALIZE_DISABLEPARAMVAL 0x0001
  495. //@@BEGIN_MSINTERNAL
  496. #endif // ! DPNBUILD_NOPARAMVAL
  497. // Flags added for DirectX 9
  498. #define DPNINITIALIZE_HINT_LANSESSION 0x0002
  499. //@@END_MSINTERNAL
  500. //@@BEGIN_MSINTERNAL
  501. #ifndef DPNBUILD_NOMULTICAST
  502. //
  503. // Join flags (for Join)
  504. //
  505. #define DPNJOIN_SYNC DPNOP_SYNC
  506. #define DPNJOIN_ALLOWUNKNOWNSENDERS 0x0001
  507. #endif // ! DPNBUILD_NOMULTICAST
  508. //@@END_MSINTERNAL
  509. //
  510. // Register Lobby flags
  511. //
  512. #define DPNLOBBY_REGISTER 0x0001
  513. #define DPNLOBBY_UNREGISTER 0x0002
  514. //
  515. // Player information flags (for Player Info / Player Messages)
  516. //
  517. #define DPNPLAYER_LOCAL 0x0002
  518. #define DPNPLAYER_HOST 0x0004
  519. //
  520. // Remove player from group flags (for RemovePlayerFromGroup)
  521. //
  522. #define DPNREMOVEPLAYERFROMGROUP_SYNC DPNOP_SYNC
  523. //
  524. // Send flags (for Send/SendTo)
  525. //
  526. #define DPNSEND_SYNC DPNOP_SYNC
  527. #define DPNSEND_NOCOPY 0x0001
  528. #define DPNSEND_NOCOMPLETE 0x0002
  529. #define DPNSEND_COMPLETEONPROCESS 0x0004
  530. #define DPNSEND_GUARANTEED 0x0008
  531. #define DPNSEND_NONSEQUENTIAL 0x0010
  532. #define DPNSEND_NOLOOPBACK 0x0020
  533. #define DPNSEND_PRIORITY_LOW 0x0040
  534. #define DPNSEND_PRIORITY_HIGH 0x0080
  535. //@@BEGIN_MSINTERNAL
  536. // Flag added for DirectX 9
  537. #define DPNSEND_COALESCE 0x0100
  538. //@@END_MSINTERNAL
  539. //
  540. // Session Flags (for DPN_APPLICATION_DESC)
  541. //
  542. #define DPNSESSION_CLIENT_SERVER 0x0001
  543. #define DPNSESSION_MIGRATE_HOST 0x0004
  544. #define DPNSESSION_NODPNSVR 0x0040
  545. #define DPNSESSION_REQUIREPASSWORD 0x0080
  546. //@@BEGIN_MSINTERNAL
  547. // Flag added for DirectX 9
  548. #define DPNSESSION_NOENUMS 0x0100
  549. #define DPNSESSION_FAST_SIGNED 0x0200
  550. #define DPNSESSION_FULL_SIGNED 0x0400
  551. //@@END_MSINTERNAL
  552. //
  553. // Set client info flags (for SetClientInfo)
  554. //
  555. #define DPNSETCLIENTINFO_SYNC DPNOP_SYNC
  556. //
  557. // Set group info flags (for SetGroupInfo)
  558. //
  559. #define DPNSETGROUPINFO_SYNC DPNOP_SYNC
  560. //
  561. // Set peer info flags (for SetPeerInfo)
  562. //
  563. #define DPNSETPEERINFO_SYNC DPNOP_SYNC
  564. //
  565. // Set server info flags (for SetServerInfo)
  566. //
  567. #define DPNSETSERVERINFO_SYNC DPNOP_SYNC
  568. //
  569. // SP capabilities flags
  570. //
  571. #define DPNSPCAPS_SUPPORTSDPNSRV 0x0001
  572. #define DPNSPCAPS_SUPPORTSBROADCAST 0x0002
  573. #define DPNSPCAPS_SUPPORTSALLADAPTERS 0x0004
  574. //@@BEGIN_MSINTERNAL
  575. // Flags added for DirectX 9
  576. #define DPNSPCAPS_SUPPORTSTHREADPOOL 0x0008
  577. #define DPNSPCAPS_NETWORKSIMULATOR 0x0010
  578. #ifndef DPNBUILD_NOMULTICAST
  579. #define DPNSPCAPS_SUPPORTSMULTICAST 0x0020
  580. #endif // ! DPNBUILD_NOMULTICAST
  581. #ifndef DPNBUILD_MANDATORYTHREADS
  582. #define DPNSPCAPS_HASMANDATORYTHREADS 0x0040
  583. #endif // DPNBUILD_MANDATORYTHREADS
  584. //
  585. // SP information flags (added for DirectX 9)
  586. //
  587. #define DPNSPINFO_NETWORKSIMULATORDEVICE 0x0001
  588. #ifndef DPNBUILD_NOMULTICAST
  589. #define DPNSPINFO_DEFAULTMULTICASTDEVICE 0x0002
  590. #endif // ! DPNBUILD_NOMULTICAST
  591. //
  592. // Thread information flags (added for DirectX 9)
  593. //
  594. #ifdef DPNBUILD_MANDATORYTHREADS
  595. #define DPNTHREAD_MANDATORY 0x0001
  596. #endif // DPNBUILD_MANDATORYTHREADS
  597. //@@END_MSINTERNAL
  598. /****************************************************************************
  599. *
  600. * DirectPlay8 Structures (Non-Message)
  601. *
  602. ****************************************************************************/
  603. //
  604. // Application description
  605. //
  606. typedef struct _DPN_APPLICATION_DESC
  607. {
  608. DWORD dwSize; // Size of this structure
  609. DWORD dwFlags; // Flags (DPNSESSION_...)
  610. GUID guidInstance; // Instance GUID
  611. GUID guidApplication; // Application GUID
  612. DWORD dwMaxPlayers; // Maximum # of players allowed (0=no limit)
  613. DWORD dwCurrentPlayers; // Current # of players allowed
  614. WCHAR *pwszSessionName; // Name of the session
  615. WCHAR *pwszPassword; // Password for the session
  616. PVOID pvReservedData;
  617. DWORD dwReservedDataSize;
  618. PVOID pvApplicationReservedData;
  619. DWORD dwApplicationReservedDataSize;
  620. } DPN_APPLICATION_DESC, *PDPN_APPLICATION_DESC;
  621. //
  622. // Generic Buffer Description
  623. //
  624. typedef struct _BUFFERDESC
  625. {
  626. DWORD dwBufferSize;
  627. BYTE * pBufferData;
  628. } BUFFERDESC, DPN_BUFFER_DESC, *PDPN_BUFFER_DESC;
  629. typedef BUFFERDESC FAR * PBUFFERDESC;
  630. //
  631. // DirectPlay8 capabilities
  632. //
  633. typedef struct _DPN_CAPS
  634. {
  635. DWORD dwSize; // Size of this structure
  636. DWORD dwFlags; // Flags
  637. DWORD dwConnectTimeout; // ms before a connect request times out
  638. DWORD dwConnectRetries; // # of times to attempt the connection
  639. DWORD dwTimeoutUntilKeepAlive; // ms of inactivity before a keep alive is sent
  640. } DPN_CAPS, *PDPN_CAPS;
  641. //@@BEGIN_MSINTERNAL
  642. //
  643. // Extended capabilities structures (added for DirectX 9)
  644. //
  645. typedef struct _DPN_CAPS_EX
  646. {
  647. DWORD dwSize; // Size of this structure
  648. DWORD dwFlags; // Flags
  649. DWORD dwConnectTimeout; // ms before a connect request times out
  650. DWORD dwConnectRetries; // # of times to attempt the connection
  651. DWORD dwTimeoutUntilKeepAlive; // ms of inactivity before a keep alive is sent
  652. DWORD dwMaxRecvMsgSize; // maximum size in bytes of message that can be received
  653. DWORD dwNumSendRetries; // maximum number of send retries before link is considered dead
  654. DWORD dwMaxSendRetryInterval; // maximum period in msec between send retries
  655. DWORD dwDropThresholdRate; // percentage of dropped packets before throttling
  656. DWORD dwThrottleRate; // percentage amount to reduce send window when throttling
  657. DWORD dwNumHardDisconnectSends; // number of hard disconnect frames to send when close immediate flag is specified
  658. DWORD dwMaxHardDisconnectPeriod; // maximum period between hard disconnect sends
  659. } DPN_CAPS_EX, *PDPN_CAPS_EX;
  660. //@@END_MSINTERNAL
  661. //
  662. // Connection Statistics information
  663. //
  664. typedef struct _DPN_CONNECTION_INFO
  665. {
  666. DWORD dwSize;
  667. DWORD dwRoundTripLatencyMS;
  668. DWORD dwThroughputBPS;
  669. DWORD dwPeakThroughputBPS;
  670. DWORD dwBytesSentGuaranteed;
  671. DWORD dwPacketsSentGuaranteed;
  672. DWORD dwBytesSentNonGuaranteed;
  673. DWORD dwPacketsSentNonGuaranteed;
  674. DWORD dwBytesRetried; // Guaranteed only
  675. DWORD dwPacketsRetried; // Guaranteed only
  676. DWORD dwBytesDropped; // Non Guaranteed only
  677. DWORD dwPacketsDropped; // Non Guaranteed only
  678. DWORD dwMessagesTransmittedHighPriority;
  679. DWORD dwMessagesTimedOutHighPriority;
  680. DWORD dwMessagesTransmittedNormalPriority;
  681. DWORD dwMessagesTimedOutNormalPriority;
  682. DWORD dwMessagesTransmittedLowPriority;
  683. DWORD dwMessagesTimedOutLowPriority;
  684. DWORD dwBytesReceivedGuaranteed;
  685. DWORD dwPacketsReceivedGuaranteed;
  686. DWORD dwBytesReceivedNonGuaranteed;
  687. DWORD dwPacketsReceivedNonGuaranteed;
  688. DWORD dwMessagesReceived;
  689. } DPN_CONNECTION_INFO, *PDPN_CONNECTION_INFO;
  690. //@@BEGIN_MSINTERNAL
  691. typedef struct _DPN_CONNECTION_INFO_INTERNAL
  692. {
  693. DWORD dwSize;
  694. DWORD dwRoundTripLatencyMS;
  695. DWORD dwThroughputBPS;
  696. DWORD dwPeakThroughputBPS;
  697. DWORD dwBytesSentGuaranteed;
  698. DWORD dwPacketsSentGuaranteed;
  699. DWORD dwBytesSentNonGuaranteed;
  700. DWORD dwPacketsSentNonGuaranteed;
  701. DWORD dwBytesRetried; // Guaranteed only
  702. DWORD dwPacketsRetried; // Guaranteed only
  703. DWORD dwBytesDropped; // Non Guaranteed only
  704. DWORD dwPacketsDropped; // Non Guaranteed only
  705. DWORD dwMessagesTransmittedHighPriority;
  706. DWORD dwMessagesTimedOutHighPriority;
  707. DWORD dwMessagesTransmittedNormalPriority;
  708. DWORD dwMessagesTimedOutNormalPriority;
  709. DWORD dwMessagesTransmittedLowPriority;
  710. DWORD dwMessagesTimedOutLowPriority;
  711. DWORD dwBytesReceivedGuaranteed;
  712. DWORD dwPacketsReceivedGuaranteed;
  713. DWORD dwBytesReceivedNonGuaranteed;
  714. DWORD dwPacketsReceivedNonGuaranteed;
  715. DWORD dwMessagesReceived;
  716. // Members not in DPN_CONNECTION_INFO ///////////////////////////////////////////////////
  717. // Adaptive Algorithm Parameters
  718. UINT uiDropCount; // localized packet drop count (recent drops)
  719. UINT uiThrottleEvents; // count of temporary backoffs for all reasons
  720. UINT uiAdaptAlgCount; // Acknowledge count remaining before running adaptive algorithm
  721. UINT uiWindowFilled; // Count of times we fill the send window
  722. UINT uiPeriodAcksBytes; // frames acked since change in tuning
  723. UINT uiPeriodXmitTime; // time link has been transmitting since change in tuning
  724. DWORD dwLastThroughputBPS;// the calculated throughput from the last period
  725. UINT uiLastBytesAcked; // the number of bytes acked in the last period
  726. // Current Transmit Parameters:
  727. UINT uiWindowF; // window size (frames)
  728. UINT uiWindowB; // window size (bytes)
  729. UINT uiUnackedFrames; // outstanding frame count
  730. UINT uiUnackedBytes; // outstanding byte count
  731. UINT uiBurstGap; // number of ms to wait between bursts
  732. INT iBurstCredit; // Either credit or deficit from previous Transmit Burst
  733. UINT uiRetryTimeout; // The time until we consider a frame lost and in need of retransmission
  734. // Last Known Good Transmit Parameters -- Values which we believe are safe...
  735. UINT uiGoodWindowF;
  736. UINT uiGoodWindowB;
  737. UINT uiGoodBurstGap;
  738. UINT uiGoodRTT;
  739. // Restore Parameters - We will restore to these when we un-throttle if we are throttled
  740. UINT uiRestoreWindowF;
  741. UINT uiRestoreWindowB;
  742. UINT uiRestoreBurstGap;
  743. // Link State Parameters
  744. BYTE bNextSend; // Next serial number to assign to a frame
  745. BYTE bNextReceive; // Next frame serial we expect to receive
  746. ULONG ulReceiveMask; // mask representing first 32 frames in our rcv window
  747. ULONG ulReceiveMask2; // second 32 frames in our window
  748. ULONG ulSendMask; // mask representing unreliable send frames that have timed out and need
  749. ULONG ulSendMask2; // to be reported to receiver as missing.
  750. // Informational Parameters
  751. DWORD uiQueuedMessageCount;// Number of messages waiting on all three send queues
  752. UINT uiCompleteMsgCount; // Count of messages on the CompleteList
  753. ULONG ulEPFlags; // End Point Flags
  754. } DPN_CONNECTION_INFO_INTERNAL, *PDPN_CONNECTION_INFO_INTERNAL;
  755. typedef struct _DPN_CONNECTION_INFO_INTERNAL2
  756. {
  757. DWORD dwSize;
  758. DWORD dwRoundTripLatencyMS;
  759. DWORD dwThroughputBPS;
  760. DWORD dwPeakThroughputBPS;
  761. DWORD dwBytesSentGuaranteed;
  762. DWORD dwPacketsSentGuaranteed;
  763. DWORD dwBytesSentNonGuaranteed;
  764. DWORD dwPacketsSentNonGuaranteed;
  765. DWORD dwBytesRetried; // Guaranteed only
  766. DWORD dwPacketsRetried; // Guaranteed only
  767. DWORD dwBytesDropped; // Non Guaranteed only
  768. DWORD dwPacketsDropped; // Non Guaranteed only
  769. DWORD dwMessagesTransmittedHighPriority;
  770. DWORD dwMessagesTimedOutHighPriority;
  771. DWORD dwMessagesTransmittedNormalPriority;
  772. DWORD dwMessagesTimedOutNormalPriority;
  773. DWORD dwMessagesTransmittedLowPriority;
  774. DWORD dwMessagesTimedOutLowPriority;
  775. DWORD dwBytesReceivedGuaranteed;
  776. DWORD dwPacketsReceivedGuaranteed;
  777. DWORD dwBytesReceivedNonGuaranteed;
  778. DWORD dwPacketsReceivedNonGuaranteed;
  779. DWORD dwMessagesReceived;
  780. // Members not in DPN_CONNECTION_INFO ///////////////////////////////////////////////////
  781. // Adaptive Algorithm Parameters
  782. UINT uiDropCount; // localized packet drop count (recent drops)
  783. UINT uiThrottleEvents; // count of temporary backoffs for all reasons
  784. UINT uiAdaptAlgCount; // Acknowledge count remaining before running adaptive algorithm
  785. UINT uiWindowFilled; // Count of times we fill the send window
  786. UINT uiPeriodAcksBytes; // frames acked since change in tuning
  787. UINT uiPeriodXmitTime; // time link has been transmitting since change in tuning
  788. DWORD dwLastThroughputBPS;// the calculated throughput from the last period
  789. UINT uiLastBytesAcked; // the number of bytes acked in the last period
  790. // Current Transmit Parameters:
  791. UINT uiWindowF; // window size (frames)
  792. UINT uiWindowB; // window size (bytes)
  793. UINT uiUnackedFrames; // outstanding frame count
  794. UINT uiUnackedBytes; // outstanding byte count
  795. UINT uiBurstGap; // number of ms to wait between bursts
  796. INT iBurstCredit; // Either credit or deficit from previous Transmit Burst
  797. UINT uiRetryTimeout; // The time until we consider a frame lost and in need of retransmission
  798. // Last Known Good Transmit Parameters -- Values which we believe are safe...
  799. UINT uiGoodWindowF;
  800. UINT uiGoodWindowB;
  801. UINT uiGoodBurstGap;
  802. UINT uiGoodRTT;
  803. // Restore Parameters - We will restore to these when we un-throttle if we are throttled
  804. UINT uiRestoreWindowF;
  805. UINT uiRestoreWindowB;
  806. UINT uiRestoreBurstGap;
  807. // Link State Parameters
  808. BYTE bNextSend; // Next serial number to assign to a frame
  809. BYTE bNextReceive; // Next frame serial we expect to receive
  810. ULONG ulReceiveMask; // mask representing first 32 frames in our rcv window
  811. ULONG ulReceiveMask2; // second 32 frames in our window
  812. ULONG ulSendMask; // mask representing unreliable send frames that have timed out and need
  813. ULONG ulSendMask2; // to be reported to receiver as missing.
  814. // Informational Parameters
  815. DWORD uiQueuedMessageCount;// Number of messages waiting on all three send queues
  816. UINT uiCompleteMsgCount; // Count of messages on the CompleteList
  817. ULONG ulEPFlags; // End Point Flags
  818. // Members not in DPN_CONNECTION_INFO_INTERNAL ///////////////////////////////////////////////////
  819. // Dropped Frame Parameters
  820. DWORD dwDropBitMask; // bit mask of dropped frames (32 frame max)
  821. DWORD uiTotalThrottleEvents; //number of times we've throttled back
  822. } DPN_CONNECTION_INFO_INTERNAL2, *PDPN_CONNECTION_INFO_INTERNAL2;
  823. //@@END_MSINTERNAL
  824. //
  825. // Group information strucutre
  826. //
  827. typedef struct _DPN_GROUP_INFO
  828. {
  829. DWORD dwSize; // size of this structure
  830. DWORD dwInfoFlags; // information contained
  831. PWSTR pwszName; // Unicode Name
  832. PVOID pvData; // data block
  833. DWORD dwDataSize; // size in BYTES of data block
  834. DWORD dwGroupFlags; // group flags (DPNGROUP_...)
  835. } DPN_GROUP_INFO, *PDPN_GROUP_INFO;
  836. //
  837. // Player information structure
  838. //
  839. typedef struct _DPN_PLAYER_INFO
  840. {
  841. DWORD dwSize; // size of this structure
  842. DWORD dwInfoFlags; // information contained
  843. PWSTR pwszName; // Unicode Name
  844. PVOID pvData; // data block
  845. DWORD dwDataSize; // size in BYTES of data block
  846. DWORD dwPlayerFlags; // player flags (DPNPLAYER_...)
  847. } DPN_PLAYER_INFO, *PDPN_PLAYER_INFO;
  848. typedef struct _DPN_SECURITY_CREDENTIALS DPN_SECURITY_CREDENTIALS, *PDPN_SECURITY_CREDENTIALS;
  849. typedef struct _DPN_SECURITY_DESC DPN_SECURITY_DESC, *PDPN_SECURITY_DESC;
  850. //
  851. // Service provider & adapter enumeration structure
  852. //
  853. typedef struct _DPN_SERVICE_PROVIDER_INFO
  854. {
  855. DWORD dwFlags;
  856. GUID guid; // SP Guid
  857. WCHAR *pwszName; // Friendly Name
  858. PVOID pvReserved;
  859. DWORD dwReserved;
  860. } DPN_SERVICE_PROVIDER_INFO, *PDPN_SERVICE_PROVIDER_INFO;
  861. //
  862. // Service provider caps structure
  863. //
  864. typedef struct _DPN_SP_CAPS
  865. {
  866. DWORD dwSize; // Size of this structure
  867. DWORD dwFlags; // Flags (DPNSPCAPS_...)
  868. DWORD dwNumThreads; // # of worker threads to use
  869. DWORD dwDefaultEnumCount; // default # of enum requests
  870. DWORD dwDefaultEnumRetryInterval; // default ms between enum requests
  871. DWORD dwDefaultEnumTimeout; // default enum timeout
  872. DWORD dwMaxEnumPayloadSize; // maximum size in bytes for enum payload data
  873. DWORD dwBuffersPerThread; // number of receive buffers per thread
  874. DWORD dwSystemBufferSize; // amount of buffering to do in addition to posted receive buffers
  875. } DPN_SP_CAPS, *PDPN_SP_CAPS;
  876. //@@BEGIN_MSINTERNAL
  877. //
  878. // Security credentials
  879. //
  880. typedef struct _DPN_SECURITY_CREDENTIALS
  881. {
  882. DWORD dwSize;
  883. DWORD dwFlags;
  884. } DPN_SECURITY_CREDENTIALS, *PDPN_SECURITY_CREDENTIALS;
  885. //
  886. // Security description
  887. //
  888. typedef struct _DPN_SECURITY_DESC
  889. {
  890. DWORD dwSize;
  891. DWORD dwFlags;
  892. } DPN_SECURITY_DESC, *PDPN_SECURITY_DESC;
  893. //@@END_MSINTERNAL
  894. //@@BEGIN_MSINTERNAL
  895. #ifndef DPNBUILD_NOMULTICAST
  896. //
  897. // Multicast scope enumeration structure
  898. //
  899. typedef struct _DPN_MULTICAST_SCOPE_INFO
  900. {
  901. DWORD dwFlags;
  902. GUID guid; // Scope guid
  903. WCHAR *pwszName; // Friendly name
  904. PVOID pvReserved;
  905. DWORD dwReserved;
  906. } DPN_MULTICAST_SCOPE_INFO, *PDPN_MULTICAST_SCOPE_INFO;
  907. #endif // ! DPNBUILD_NOMULTICAST
  908. //@@END_MSINTERNAL
  909. /****************************************************************************
  910. *
  911. * IDirectPlay8 message handler call back structures
  912. *
  913. ****************************************************************************/
  914. //
  915. // Add player to group structure for message handler
  916. // (DPN_MSGID_ADD_PLAYER_TO_GROUP)
  917. //
  918. typedef struct _DPNMSG_ADD_PLAYER_TO_GROUP
  919. {
  920. DWORD dwSize; // Size of this structure
  921. DPNID dpnidGroup; // DPNID of group
  922. PVOID pvGroupContext; // Group context value
  923. DPNID dpnidPlayer; // DPNID of added player
  924. PVOID pvPlayerContext; // Player context value
  925. } DPNMSG_ADD_PLAYER_TO_GROUP, *PDPNMSG_ADD_PLAYER_TO_GROUP;
  926. //
  927. // Async operation completion structure for message handler
  928. // (DPN_MSGID_ASYNC_OP_COMPLETE)
  929. //
  930. typedef struct _DPNMSG_ASYNC_OP_COMPLETE
  931. {
  932. DWORD dwSize; // Size of this structure
  933. DPNHANDLE hAsyncOp; // DirectPlay8 async operation handle
  934. PVOID pvUserContext; // User context supplied
  935. HRESULT hResultCode; // HRESULT of operation
  936. } DPNMSG_ASYNC_OP_COMPLETE, *PDPNMSG_ASYNC_OP_COMPLETE;
  937. //
  938. // Client info structure for message handler
  939. // (DPN_MSGID_CLIENT_INFO)
  940. //
  941. typedef struct _DPNMSG_CLIENT_INFO
  942. {
  943. DWORD dwSize; // Size of this structure
  944. DPNID dpnidClient; // DPNID of client
  945. PVOID pvPlayerContext; // Player context value
  946. } DPNMSG_CLIENT_INFO, *PDPNMSG_CLIENT_INFO;
  947. //
  948. // Connect complete structure for message handler
  949. // (DPN_MSGID_CONNECT_COMPLETE)
  950. //
  951. typedef struct _DPNMSG_CONNECT_COMPLETE
  952. {
  953. DWORD dwSize; // Size of this structure
  954. DPNHANDLE hAsyncOp; // DirectPlay8 Async operation handle
  955. PVOID pvUserContext; // User context supplied at Connect
  956. HRESULT hResultCode; // HRESULT of connection attempt
  957. PVOID pvApplicationReplyData; // Connection reply data from Host/Server
  958. DWORD dwApplicationReplyDataSize; // Size (in bytes) of pvApplicationReplyData
  959. //@@BEGIN_MSINTERNAL
  960. // Fields added for DirectX 9
  961. DPNID dpnidLocal; // DPNID of local player
  962. //@@END_MSINTERNAL
  963. } DPNMSG_CONNECT_COMPLETE, *PDPNMSG_CONNECT_COMPLETE;
  964. //
  965. // Create group structure for message handler
  966. // (DPN_MSGID_CREATE_GROUP)
  967. //
  968. typedef struct _DPNMSG_CREATE_GROUP
  969. {
  970. DWORD dwSize; // Size of this structure
  971. DPNID dpnidGroup; // DPNID of new group
  972. DPNID dpnidOwner; // Owner of newgroup
  973. PVOID pvGroupContext; // Group context value
  974. //@@BEGIN_MSINTERNAL
  975. // Fields added for DirectX 9
  976. PVOID pvOwnerContext; // Owner context value
  977. //@@END_MSINTERNAL
  978. } DPNMSG_CREATE_GROUP, *PDPNMSG_CREATE_GROUP;
  979. //
  980. // Create player structure for message handler
  981. // (DPN_MSGID_CREATE_PLAYER)
  982. //
  983. typedef struct _DPNMSG_CREATE_PLAYER
  984. {
  985. DWORD dwSize; // Size of this structure
  986. DPNID dpnidPlayer; // DPNID of new player
  987. PVOID pvPlayerContext; // Player context value
  988. } DPNMSG_CREATE_PLAYER, *PDPNMSG_CREATE_PLAYER;
  989. //
  990. // Destroy group structure for message handler
  991. // (DPN_MSGID_DESTROY_GROUP)
  992. //
  993. typedef struct _DPNMSG_DESTROY_GROUP
  994. {
  995. DWORD dwSize; // Size of this structure
  996. DPNID dpnidGroup; // DPNID of destroyed group
  997. PVOID pvGroupContext; // Group context value
  998. DWORD dwReason; // Information only
  999. } DPNMSG_DESTROY_GROUP, *PDPNMSG_DESTROY_GROUP;
  1000. //
  1001. // Destroy player structure for message handler
  1002. // (DPN_MSGID_DESTROY_PLAYER)
  1003. //
  1004. typedef struct _DPNMSG_DESTROY_PLAYER
  1005. {
  1006. DWORD dwSize; // Size of this structure
  1007. DPNID dpnidPlayer; // DPNID of leaving player
  1008. PVOID pvPlayerContext; // Player context value
  1009. DWORD dwReason; // Information only
  1010. } DPNMSG_DESTROY_PLAYER, *PDPNMSG_DESTROY_PLAYER;
  1011. //
  1012. // Enumeration request received structure for message handler
  1013. // (DPN_MSGID_ENUM_HOSTS_QUERY)
  1014. //
  1015. typedef struct _DPNMSG_ENUM_HOSTS_QUERY
  1016. {
  1017. DWORD dwSize; // Size of this structure.
  1018. IDirectPlay8Address *pAddressSender; // Address of client who sent the request
  1019. IDirectPlay8Address *pAddressDevice; // Address of device request was received on
  1020. PVOID pvReceivedData; // Request data (set on client)
  1021. DWORD dwReceivedDataSize; // Request data size (set on client)
  1022. DWORD dwMaxResponseDataSize; // Max allowable size of enum response
  1023. PVOID pvResponseData; // Optional query repsonse (user set)
  1024. DWORD dwResponseDataSize; // Optional query response size (user set)
  1025. PVOID pvResponseContext; // Optional query response context (user set)
  1026. } DPNMSG_ENUM_HOSTS_QUERY, *PDPNMSG_ENUM_HOSTS_QUERY;
  1027. //
  1028. // Enumeration response received structure for message handler
  1029. // (DPN_MSGID_ENUM_HOSTS_RESPONSE)
  1030. //
  1031. typedef struct _DPNMSG_ENUM_HOSTS_RESPONSE
  1032. {
  1033. DWORD dwSize; // Size of this structure
  1034. IDirectPlay8Address *pAddressSender; // Address of host who responded
  1035. IDirectPlay8Address *pAddressDevice; // Device response was received on
  1036. const DPN_APPLICATION_DESC *pApplicationDescription; // Application description for the session
  1037. PVOID pvResponseData; // Optional response data (set on host)
  1038. DWORD dwResponseDataSize; // Optional response data size (set on host)
  1039. PVOID pvUserContext; // Context value supplied for enumeration
  1040. DWORD dwRoundTripLatencyMS; // Round trip latency in MS
  1041. } DPNMSG_ENUM_HOSTS_RESPONSE, *PDPNMSG_ENUM_HOSTS_RESPONSE;
  1042. //
  1043. // Group info structure for message handler
  1044. // (DPN_MSGID_GROUP_INFO)
  1045. //
  1046. typedef struct _DPNMSG_GROUP_INFO
  1047. {
  1048. DWORD dwSize; // Size of this structure
  1049. DPNID dpnidGroup; // DPNID of group
  1050. PVOID pvGroupContext; // Group context value
  1051. } DPNMSG_GROUP_INFO, *PDPNMSG_GROUP_INFO;
  1052. //
  1053. // Migrate host structure for message handler
  1054. // (DPN_MSGID_HOST_MIGRATE)
  1055. //
  1056. typedef struct _DPNMSG_HOST_MIGRATE
  1057. {
  1058. DWORD dwSize; // Size of this structure
  1059. DPNID dpnidNewHost; // DPNID of new Host player
  1060. PVOID pvPlayerContext; // Player context value
  1061. } DPNMSG_HOST_MIGRATE, *PDPNMSG_HOST_MIGRATE;
  1062. //
  1063. // Indicate connect structure for message handler
  1064. // (DPN_MSGID_INDICATE_CONNECT)
  1065. //
  1066. typedef struct _DPNMSG_INDICATE_CONNECT
  1067. {
  1068. DWORD dwSize; // Size of this structure
  1069. PVOID pvUserConnectData; // Connecting player data
  1070. DWORD dwUserConnectDataSize; // Size (in bytes) of pvUserConnectData
  1071. PVOID pvReplyData; // Connection reply data
  1072. DWORD dwReplyDataSize; // Size (in bytes) of pvReplyData
  1073. PVOID pvReplyContext; // Buffer context for pvReplyData
  1074. PVOID pvPlayerContext; // Player context preset
  1075. IDirectPlay8Address *pAddressPlayer; // Address of connecting player
  1076. IDirectPlay8Address *pAddressDevice; // Address of device receiving connect attempt
  1077. } DPNMSG_INDICATE_CONNECT, *PDPNMSG_INDICATE_CONNECT;
  1078. //
  1079. // Indicated connect aborted structure for message handler
  1080. // (DPN_MSGID_INDICATED_CONNECT_ABORTED)
  1081. //
  1082. typedef struct _DPNMSG_INDICATED_CONNECT_ABORTED
  1083. {
  1084. DWORD dwSize; // Size of this structure
  1085. PVOID pvPlayerContext; // Player context preset from DPNMSG_INDICATE_CONNECT
  1086. } DPNMSG_INDICATED_CONNECT_ABORTED, *PDPNMSG_INDICATED_CONNECT_ABORTED;
  1087. //
  1088. // Peer info structure for message handler
  1089. // (DPN_MSGID_PEER_INFO)
  1090. //
  1091. typedef struct _DPNMSG_PEER_INFO
  1092. {
  1093. DWORD dwSize; // Size of this structure
  1094. DPNID dpnidPeer; // DPNID of peer
  1095. PVOID pvPlayerContext; // Player context value
  1096. } DPNMSG_PEER_INFO, *PDPNMSG_PEER_INFO;
  1097. //
  1098. // Receive structure for message handler
  1099. // (DPN_MSGID_RECEIVE)
  1100. //
  1101. typedef struct _DPNMSG_RECEIVE
  1102. {
  1103. DWORD dwSize; // Size of this structure
  1104. DPNID dpnidSender; // DPNID of sending player
  1105. PVOID pvPlayerContext; // Player context value of sending player
  1106. PBYTE pReceiveData; // Received data
  1107. DWORD dwReceiveDataSize; // Size (in bytes) of pReceiveData
  1108. DPNHANDLE hBufferHandle; // Buffer handle for pReceiveData
  1109. } DPNMSG_RECEIVE, *PDPNMSG_RECEIVE;
  1110. //
  1111. // Remove player from group structure for message handler
  1112. // (DPN_MSGID_REMOVE_PLAYER_FROM_GROUP)
  1113. //
  1114. typedef struct _DPNMSG_REMOVE_PLAYER_FROM_GROUP
  1115. {
  1116. DWORD dwSize; // Size of this structure
  1117. DPNID dpnidGroup; // DPNID of group
  1118. PVOID pvGroupContext; // Group context value
  1119. DPNID dpnidPlayer; // DPNID of deleted player
  1120. PVOID pvPlayerContext; // Player context value
  1121. } DPNMSG_REMOVE_PLAYER_FROM_GROUP, *PDPNMSG_REMOVE_PLAYER_FROM_GROUP;
  1122. //
  1123. // Returned buffer structure for message handler
  1124. // (DPN_MSGID_RETURN_BUFFER)
  1125. //
  1126. typedef struct _DPNMSG_RETURN_BUFFER
  1127. {
  1128. DWORD dwSize; // Size of this structure
  1129. HRESULT hResultCode; // Return value of operation
  1130. PVOID pvBuffer; // Buffer being returned
  1131. PVOID pvUserContext; // Context associated with buffer
  1132. } DPNMSG_RETURN_BUFFER, *PDPNMSG_RETURN_BUFFER;
  1133. //
  1134. // Send complete structure for message handler
  1135. // (DPN_MSGID_SEND_COMPLETE)
  1136. //
  1137. typedef struct _DPNMSG_SEND_COMPLETE
  1138. {
  1139. DWORD dwSize; // Size of this structure
  1140. DPNHANDLE hAsyncOp; // DirectPlay8 Async operation handle
  1141. PVOID pvUserContext; // User context supplied at Send/SendTo
  1142. HRESULT hResultCode; // HRESULT of send
  1143. DWORD dwSendTime; // Send time in ms
  1144. //@@BEGIN_MSINTERNAL
  1145. // Fields added for DirectX 9
  1146. DWORD dwFirstFrameRTT; // RTT of the first frame in the message
  1147. DWORD dwFirstFrameRetryCount; // Retry count of the first frame
  1148. //@@END_MSINTERNAL
  1149. } DPNMSG_SEND_COMPLETE, *PDPNMSG_SEND_COMPLETE;
  1150. //
  1151. // Server info structure for message handler
  1152. // (DPN_MSGID_SERVER_INFO)
  1153. //
  1154. typedef struct _DPNMSG_SERVER_INFO
  1155. {
  1156. DWORD dwSize; // Size of this structure
  1157. DPNID dpnidServer; // DPNID of server
  1158. PVOID pvPlayerContext; // Player context value
  1159. } DPNMSG_SERVER_INFO, *PDPNMSG_SERVER_INFO;
  1160. //
  1161. // Terminated session structure for message handler
  1162. // (DPN_MSGID_TERMINATE_SESSION)
  1163. //
  1164. typedef struct _DPNMSG_TERMINATE_SESSION
  1165. {
  1166. DWORD dwSize; // Size of this structure
  1167. HRESULT hResultCode; // Reason
  1168. PVOID pvTerminateData; // Data passed from Host/Server
  1169. DWORD dwTerminateDataSize;// Size (in bytes) of pvTerminateData
  1170. } DPNMSG_TERMINATE_SESSION, *PDPNMSG_TERMINATE_SESSION;
  1171. //@@BEGIN_MSINTERNAL
  1172. //
  1173. // Message structures added for DirectX 9
  1174. //
  1175. //
  1176. // Create thread info structure for message handler
  1177. // (DPN_MSGID_CREATE_THREAD)
  1178. //
  1179. typedef struct _DPNMSG_CREATE_THREAD
  1180. {
  1181. DWORD dwSize; // Size of this structure
  1182. DWORD dwFlags; // Flags describing this thread
  1183. DWORD dwProcessorNum; // Index of processor to which thread is bound
  1184. PVOID pvUserContext; // Thread context value
  1185. } DPNMSG_CREATE_THREAD, *PDPNMSG_CREATE_THREAD;
  1186. //
  1187. // Destroy thread info structure for message handler
  1188. // (DPN_MSGID_DESTROY_THREAD)
  1189. //
  1190. typedef struct _DPNMSG_DESTROY_THREAD
  1191. {
  1192. DWORD dwSize; // Size of this structure
  1193. DWORD dwProcessorNum; // Index of processor to which thread was bound
  1194. PVOID pvUserContext; // Thread context value
  1195. } DPNMSG_DESTROY_THREAD, *PDPNMSG_DESTROY_THREAD;
  1196. #ifndef DPNBUILD_NOMULTICAST
  1197. //
  1198. // Create sender context structure for message handler
  1199. // (DPN_MSGID_CREATE_SENDER_CONTEXT)
  1200. //
  1201. typedef struct _DPNMSG_CREATE_SENDER_CONTEXT
  1202. {
  1203. DWORD dwSize; // Size of this structure
  1204. PVOID pvSenderContext; // Sender context value
  1205. } DPNMSG_CREATE_SENDER_CONTEXT, *PDPNMSG_CREATE_SENDER_CONTEXT;
  1206. //
  1207. // Destroy sender context structure for message handler
  1208. // (DPN_MSGID_DESTROY_SENDER_CONTEXT)
  1209. //
  1210. typedef struct _DPNMSG_DESTROY_SENDER_CONTEXT
  1211. {
  1212. DWORD dwSize; // Size of this structure
  1213. PVOID pvSenderContext; // Sender context value
  1214. } DPNMSG_DESTROY_SENDER_CONTEXT, *PDPNMSG_DESTROY_SENDER_CONTEXT;
  1215. //
  1216. // Join complete structure for message handler
  1217. // (DPN_MSGID_JOIN_COMPLETE)
  1218. //
  1219. typedef struct _DPNMSG_JOIN_COMPLETE
  1220. {
  1221. DWORD dwSize; // Size of this structure
  1222. DPNHANDLE hAsyncOp; // DirectPlay8 Async operation handle
  1223. PVOID pvUserContext; // User context supplied at Join
  1224. HRESULT hResultCode; // HRESULT of join attempt
  1225. } DPNMSG_JOIN_COMPLETE, *PDPNMSG_JOIN_COMPLETE;
  1226. //
  1227. // Data received from unknown group sender structure for message handler
  1228. // (DPN_MSGID_RECEIVE_MULTICAST)
  1229. //
  1230. typedef struct _DPNMSG_RECEIVE_MULTICAST
  1231. {
  1232. DWORD dwSize; // Size of this structure.
  1233. PVOID pvSenderContext; // Pointer to user supplied sender context, or NULL if not known
  1234. IDirectPlay8Address *pAddressSender; // Address of client who sent the request
  1235. IDirectPlay8Address *pAddressDevice; // Address of device request was received on
  1236. PBYTE pReceiveData; // Received data
  1237. DWORD dwReceiveDataSize; // Size (in bytes) of pReceiveData
  1238. DPNHANDLE hBufferHandle; // Buffer handle for pReceiveData
  1239. } DPNMSG_RECEIVE_MULTICAST, *PDPNMSG_RECEIVE_MULTICAST;
  1240. #endif // ! DPNBUILD_NOMULTICAST
  1241. //@@END_MSINTERNAL
  1242. /****************************************************************************
  1243. *
  1244. * DirectPlay8 Functions
  1245. *
  1246. ****************************************************************************/
  1247. //@@BEGIN_MSINTERNAL
  1248. #ifdef _XBOX
  1249. #define XDP8STARTUP_BYPASSXNETSTARTUP 0x01 // prevents automatic initialization of the Xbox networking stack by DirectPlay
  1250. #define XDP8STARTUP_BYPASSSECURITY 0x02 // allows insecure communication to untrusted hosts
  1251. typedef struct _XDP8STARTUP_PARAMS
  1252. {
  1253. DWORD dwFlags; // initialization flags (XDP8STARTUP_xxx)
  1254. DWORD dwNumCoreInterfaces; // maximum number of IID_IDirectPlay8Client, IID_IDirectPlay8Server, or IID_IDirectPlay8Peer interfaces that will be created by the application
  1255. DWORD dwNumAddressInterfaces; // maximum number of IID_IDirectPlay8Address interfaces that will be created by the application
  1256. DWORD dwMaxMemUsage; // maximum amount of memory DirectPlay can allocate
  1257. } XDP8STARTUP_PARAMS, *PXDP8STARTUP_PARAMS;
  1258. extern HRESULT WINAPI XDirectPlay8Startup( const XDP8STARTUP_PARAMS * const pDP8StartupParams );
  1259. extern HRESULT WINAPI XDirectPlay8Cleanup( void );
  1260. #ifdef DPNBUILD_PREALLOCATEDMEMORYMODEL
  1261. typedef struct _XDP8CREATE_PARAMS
  1262. {
  1263. DP8REFIID riidInterfaceType; // interface type ID (IID_IDirectPlay8Client, IID_IDirectPlay8Server, IID_IDirectPlay8Peer)
  1264. DWORD dwMaxNumPlayers; // maximum number of players/clients for Peer/Server, ignored for Client
  1265. DWORD dwMaxPlayerNameLength; // maximum length of a player name, in WCHARs, including NULL termination, or 0 if DPN_PLAYER_INFO names are not used
  1266. DWORD dwMaxPlayerDataSize; // maximum size of player data
  1267. DWORD dwMaxNumGroups; // maximum number of groups that will be created for Peer/Server, ignored for Client
  1268. DWORD dwMaxGroupNameLength; // maximum length of a group name, in WCHARs, including NULL termination, or 0 if DPN_GROUP_INFO names are not used
  1269. DWORD dwMaxGroupDataSize; // maximum size of group data
  1270. DWORD dwMaxAppDescSessionNameLength; // maximum length of the application description structure's session name, in WCHARs, including NULL termination, or 0 if DPN_APPLICATION_DESC names are not used
  1271. DWORD dwMaxAppDescPasswordNameLength; // maximum length of the application description structure's password, in WCHARs, including NULL termination, or 0 if DPN_APPLICATION_DESC passwords are not used
  1272. DWORD dwMaxAppDescAppReservedDataSize; // maximum size of application description structure's application reserved data, in bytes
  1273. DWORD dwMaxSendsPerPlayer; // maximum number of messages that can be sent per player/client/server at any one time
  1274. DWORD dwMaxReceivesPerPlayer; // maximum number of messages that can be received per player/client/server at any one time (including receive buffers kept by returning DPNSUCCESS_PENDING)
  1275. DWORD dwMaxMessageSize; // maximum message size (send or receive), in bytes
  1276. DWORD dwNumSimultaneousEnumHosts; // maximum number of simultaneous EnumHosts initiated by non-host Peer/Client
  1277. DWORD dwMaxEnumHostsResponseDataSize; // maximum enum hosts response data size
  1278. } XDP8CREATE_PARAMS, *PXDP8CREATE_PARAMS;
  1279. extern HRESULT WINAPI XDirectPlay8Create( const XDP8CREATE_PARAMS * const pDP8CreateParams, void **ppvInterface );
  1280. #else // ! DPNBUILD_PREALLOCATEDMEMORYMODEL
  1281. extern HRESULT WINAPI XDirectPlay8Create( DP8REFIID riidInterfaceType, void **ppvInterface );
  1282. #endif // ! DPNBUILD_PREALLOCATEDMEMORYMODEL
  1283. extern HRESULT WINAPI XDirectPlay8DoWork( const DWORD dwAllowedTimeSlice );
  1284. extern HRESULT WINAPI XDirectPlay8BuildAppDescReservedData( const XNKID * const pSessionID, const XNKEY * const pKeyExchangeKey, PVOID pvReservedData, DWORD * const pcbReservedDataSize );
  1285. #else // ! _XBOX
  1286. //@@END_MSINTERNAL
  1287. /*
  1288. * This function is no longer supported. It is recommended that CoCreateInstance be used to create
  1289. * DirectPlay8 objects.
  1290. *
  1291. * extern HRESULT WINAPI DirectPlay8Create( const CLSID * pcIID, void **ppvInterface, IUnknown *pUnknown );
  1292. *
  1293. */
  1294. //@@BEGIN_MSINTERNAL
  1295. #endif // ! _XBOX
  1296. //@@END_MSINTERNAL
  1297. /****************************************************************************
  1298. *
  1299. * DirectPlay8 Application Interfaces
  1300. *
  1301. ****************************************************************************/
  1302. //
  1303. // COM definition for DirectPlay8 Client interface
  1304. //
  1305. #undef INTERFACE // External COM Implementation
  1306. #define INTERFACE IDirectPlay8Client
  1307. DECLARE_INTERFACE_(IDirectPlay8Client,IUnknown)
  1308. {
  1309. /*** IUnknown methods ***/
  1310. STDMETHOD(QueryInterface) (THIS_ DP8REFIID riid, LPVOID *ppvObj) PURE;
  1311. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  1312. STDMETHOD_(ULONG,Release) (THIS) PURE;
  1313. /*** IDirectPlay8Client methods ***/
  1314. STDMETHOD(Initialize) (THIS_ PVOID const pvUserContext, const PFNDPNMESSAGEHANDLER pfn, const DWORD dwFlags) PURE;
  1315. 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;
  1316. 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;
  1317. STDMETHOD(CancelAsyncOperation) (THIS_ const DPNHANDLE hAsyncHandle, const DWORD dwFlags) PURE;
  1318. 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;
  1319. 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;
  1320. STDMETHOD(GetSendQueueInfo) (THIS_ DWORD *const pdwNumMsgs, DWORD *const pdwNumBytes, const DWORD dwFlags) PURE;
  1321. STDMETHOD(GetApplicationDesc) (THIS_ DPN_APPLICATION_DESC *const pAppDescBuffer, DWORD *const pcbDataSize, const DWORD dwFlags) PURE;
  1322. STDMETHOD(SetClientInfo) (THIS_ const DPN_PLAYER_INFO *const pdpnPlayerInfo,PVOID const pvAsyncContext,DPNHANDLE *const phAsyncHandle, const DWORD dwFlags) PURE;
  1323. STDMETHOD(GetServerInfo) (THIS_ DPN_PLAYER_INFO *const pdpnPlayerInfo,DWORD *const pdwSize,const DWORD dwFlags) PURE;
  1324. STDMETHOD(GetServerAddress) (THIS_ IDirectPlay8Address **const pAddress,const DWORD dwFlags) PURE;
  1325. STDMETHOD(Close) (THIS_ const DWORD dwFlags) PURE;
  1326. STDMETHOD(ReturnBuffer) (THIS_ const DPNHANDLE hBufferHandle,const DWORD dwFlags) PURE;
  1327. STDMETHOD(GetCaps) (THIS_ DPN_CAPS *const pdpCaps,const DWORD dwFlags) PURE;
  1328. STDMETHOD(SetCaps) (THIS_ const DPN_CAPS *const pdpCaps, const DWORD dwFlags) PURE;
  1329. STDMETHOD(SetSPCaps) (THIS_ const GUID * const pguidSP, const DPN_SP_CAPS *const pdpspCaps, const DWORD dwFlags ) PURE;
  1330. STDMETHOD(GetSPCaps) (THIS_ const GUID * const pguidSP,DPN_SP_CAPS *const pdpspCaps,const DWORD dwFlags) PURE;
  1331. STDMETHOD(GetConnectionInfo) (THIS_ DPN_CONNECTION_INFO *const pdpConnectionInfo,const DWORD dwFlags) PURE;
  1332. STDMETHOD(RegisterLobby) (THIS_ const DPNHANDLE dpnHandle, struct IDirectPlay8LobbiedApplication *const pIDP8LobbiedApplication,const DWORD dwFlags) PURE;
  1333. };
  1334. //@@BEGIN_MSINTERNAL
  1335. #ifndef DPNBUILD_NOSERVER
  1336. //@@END_MSINTERNAL
  1337. //
  1338. // COM definition for DirectPlay8 Server interface
  1339. //
  1340. #undef INTERFACE // External COM Implementation
  1341. #define INTERFACE IDirectPlay8Server
  1342. DECLARE_INTERFACE_(IDirectPlay8Server,IUnknown)
  1343. {
  1344. /*** IUnknown methods ***/
  1345. STDMETHOD(QueryInterface) (THIS_ DP8REFIID riid, LPVOID *ppvObj) PURE;
  1346. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  1347. STDMETHOD_(ULONG,Release) (THIS) PURE;
  1348. /*** IDirectPlay8Server methods ***/
  1349. STDMETHOD(Initialize) (THIS_ PVOID const pvUserContext, const PFNDPNMESSAGEHANDLER pfn, const DWORD dwFlags) PURE;
  1350. 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;
  1351. STDMETHOD(CancelAsyncOperation) (THIS_ const DPNHANDLE hAsyncHandle,const DWORD dwFlags) PURE;
  1352. STDMETHOD(GetSendQueueInfo) (THIS_ const DPNID dpnid,DWORD *const pdwNumMsgs, DWORD *const pdwNumBytes, const DWORD dwFlags) PURE;
  1353. STDMETHOD(GetApplicationDesc) (THIS_ DPN_APPLICATION_DESC *const pAppDescBuffer, DWORD *const pcbDataSize, const DWORD dwFlags) PURE;
  1354. STDMETHOD(SetServerInfo) (THIS_ const DPN_PLAYER_INFO *const pdpnPlayerInfo,PVOID const pvAsyncContext, DPNHANDLE *const phAsyncHandle, const DWORD dwFlags) PURE;
  1355. STDMETHOD(GetClientInfo) (THIS_ const DPNID dpnid,DPN_PLAYER_INFO *const pdpnPlayerInfo,DWORD *const pdwSize,const DWORD dwFlags) PURE;
  1356. STDMETHOD(GetClientAddress) (THIS_ const DPNID dpnid,IDirectPlay8Address **const pAddress,const DWORD dwFlags) PURE;
  1357. STDMETHOD(GetLocalHostAddresses) (THIS_ IDirectPlay8Address **const prgpAddress,DWORD *const pcAddress,const DWORD dwFlags) PURE;
  1358. STDMETHOD(SetApplicationDesc) (THIS_ const DPN_APPLICATION_DESC *const pad, const DWORD dwFlags) PURE;
  1359. 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;
  1360. 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;
  1361. STDMETHOD(CreateGroup) (THIS_ const DPN_GROUP_INFO *const pdpnGroupInfo,void *const pvGroupContext,void *const pvAsyncContext,DPNHANDLE *const phAsyncHandle,const DWORD dwFlags) PURE;
  1362. STDMETHOD(DestroyGroup) (THIS_ const DPNID idGroup, PVOID const pvAsyncContext, DPNHANDLE *const phAsyncHandle, const DWORD dwFlags) PURE;
  1363. STDMETHOD(AddPlayerToGroup) (THIS_ const DPNID idGroup, const DPNID idClient, PVOID const pvAsyncContext, DPNHANDLE *const phAsyncHandle, const DWORD dwFlags) PURE;
  1364. STDMETHOD(RemovePlayerFromGroup) (THIS_ const DPNID idGroup, const DPNID idClient, PVOID const pvAsyncContext, DPNHANDLE *const phAsyncHandle, const DWORD dwFlags) PURE;
  1365. STDMETHOD(SetGroupInfo) (THIS_ const DPNID dpnid,DPN_GROUP_INFO *const pdpnGroupInfo,PVOID const pvAsyncContext,DPNHANDLE *const phAsyncHandle, const DWORD dwFlags) PURE;
  1366. STDMETHOD(GetGroupInfo) (THIS_ const DPNID dpnid,DPN_GROUP_INFO *const pdpnGroupInfo,DWORD *const pdwSize,const DWORD dwFlags) PURE;
  1367. STDMETHOD(EnumPlayersAndGroups) (THIS_ DPNID *const prgdpnid, DWORD *const pcdpnid, const DWORD dwFlags) PURE;
  1368. STDMETHOD(EnumGroupMembers) (THIS_ const DPNID dpnid, DPNID *const prgdpnid, DWORD *const pcdpnid, const DWORD dwFlags) PURE;
  1369. STDMETHOD(Close) (THIS_ const DWORD dwFlags) PURE;
  1370. STDMETHOD(DestroyClient) (THIS_ const DPNID dpnidClient, const void *const pvDestroyData, const DWORD dwDestroyDataSize, const DWORD dwFlags) PURE;
  1371. STDMETHOD(ReturnBuffer) (THIS_ const DPNHANDLE hBufferHandle,const DWORD dwFlags) PURE;
  1372. STDMETHOD(GetPlayerContext) (THIS_ const DPNID dpnid,PVOID *const ppvPlayerContext,const DWORD dwFlags) PURE;
  1373. STDMETHOD(GetGroupContext) (THIS_ const DPNID dpnid,PVOID *const ppvGroupContext,const DWORD dwFlags) PURE;
  1374. STDMETHOD(GetCaps) (THIS_ DPN_CAPS *const pdpCaps,const DWORD dwFlags) PURE;
  1375. STDMETHOD(SetCaps) (THIS_ const DPN_CAPS *const pdpCaps, const DWORD dwFlags) PURE;
  1376. STDMETHOD(SetSPCaps) (THIS_ const GUID * const pguidSP, const DPN_SP_CAPS *const pdpspCaps, const DWORD dwFlags ) PURE;
  1377. STDMETHOD(GetSPCaps) (THIS_ const GUID * const pguidSP, DPN_SP_CAPS *const pdpspCaps,const DWORD dwFlags) PURE;
  1378. STDMETHOD(GetConnectionInfo) (THIS_ const DPNID dpnid, DPN_CONNECTION_INFO *const pdpConnectionInfo,const DWORD dwFlags) PURE;
  1379. STDMETHOD(RegisterLobby) (THIS_ const DPNHANDLE dpnHandle, struct IDirectPlay8LobbiedApplication *const pIDP8LobbiedApplication,const DWORD dwFlags) PURE;
  1380. };
  1381. //@@BEGIN_MSINTERNAL
  1382. #endif // ! DPNBUILD_NOSERVER
  1383. //@@END_MSINTERNAL
  1384. //
  1385. // COM definition for DirectPlay8 Peer interface
  1386. //
  1387. #undef INTERFACE // External COM Implementation
  1388. #define INTERFACE IDirectPlay8Peer
  1389. DECLARE_INTERFACE_(IDirectPlay8Peer,IUnknown)
  1390. {
  1391. /*** IUnknown methods ***/
  1392. STDMETHOD(QueryInterface) (THIS_ DP8REFIID riid, LPVOID *ppvObj) PURE;
  1393. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  1394. STDMETHOD_(ULONG,Release) (THIS) PURE;
  1395. /*** IDirectPlay8Peer methods ***/
  1396. STDMETHOD(Initialize) (THIS_ PVOID const pvUserContext, const PFNDPNMESSAGEHANDLER pfn, const DWORD dwFlags) PURE;
  1397. 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;
  1398. STDMETHOD(CancelAsyncOperation) (THIS_ const DPNHANDLE hAsyncHandle, const DWORD dwFlags) PURE;
  1399. 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;
  1400. 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;
  1401. STDMETHOD(GetSendQueueInfo) (THIS_ const DPNID dpnid, DWORD *const pdwNumMsgs, DWORD *const pdwNumBytes, const DWORD dwFlags) PURE;
  1402. 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;
  1403. STDMETHOD(GetApplicationDesc) (THIS_ DPN_APPLICATION_DESC *const pAppDescBuffer, DWORD *const pcbDataSize, const DWORD dwFlags) PURE;
  1404. STDMETHOD(SetApplicationDesc) (THIS_ const DPN_APPLICATION_DESC *const pad, const DWORD dwFlags) PURE;
  1405. STDMETHOD(CreateGroup) (THIS_ const DPN_GROUP_INFO *const pdpnGroupInfo,void *const pvGroupContext,void *const pvAsyncContext,DPNHANDLE *const phAsyncHandle,const DWORD dwFlags) PURE;
  1406. STDMETHOD(DestroyGroup) (THIS_ const DPNID idGroup, PVOID const pvAsyncContext, DPNHANDLE *const phAsyncHandle, const DWORD dwFlags) PURE;
  1407. STDMETHOD(AddPlayerToGroup) (THIS_ const DPNID idGroup, const DPNID idClient, PVOID const pvAsyncContext, DPNHANDLE *const phAsyncHandle, const DWORD dwFlags) PURE;
  1408. STDMETHOD(RemovePlayerFromGroup) (THIS_ const DPNID idGroup, const DPNID idClient, PVOID const pvAsyncContext, DPNHANDLE *const phAsyncHandle, const DWORD dwFlags) PURE;
  1409. STDMETHOD(SetGroupInfo) (THIS_ const DPNID dpnid,DPN_GROUP_INFO *const pdpnGroupInfo,PVOID const pvAsyncContext,DPNHANDLE *const phAsyncHandle, const DWORD dwFlags) PURE;
  1410. STDMETHOD(GetGroupInfo) (THIS_ const DPNID dpnid,DPN_GROUP_INFO *const pdpnGroupInfo,DWORD *const pdwSize,const DWORD dwFlags) PURE;
  1411. STDMETHOD(EnumPlayersAndGroups) (THIS_ DPNID *const prgdpnid, DWORD *const pcdpnid, const DWORD dwFlags) PURE;
  1412. STDMETHOD(EnumGroupMembers) (THIS_ const DPNID dpnid, DPNID *const prgdpnid, DWORD *const pcdpnid, const DWORD dwFlags) PURE;
  1413. STDMETHOD(SetPeerInfo) (THIS_ const DPN_PLAYER_INFO *const pdpnPlayerInfo,PVOID const pvAsyncContext,DPNHANDLE *const phAsyncHandle, const DWORD dwFlags) PURE;
  1414. STDMETHOD(GetPeerInfo) (THIS_ const DPNID dpnid,DPN_PLAYER_INFO *const pdpnPlayerInfo,DWORD *const pdwSize,const DWORD dwFlags) PURE;
  1415. STDMETHOD(GetPeerAddress) (THIS_ const DPNID dpnid,IDirectPlay8Address **const ppAddress,const DWORD dwFlags) PURE;
  1416. STDMETHOD(GetLocalHostAddresses) (THIS_ IDirectPlay8Address **const prgpAddress,DWORD *const pcAddress,const DWORD dwFlags) PURE;
  1417. STDMETHOD(Close) (THIS_ const DWORD dwFlags) PURE;
  1418. 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;
  1419. STDMETHOD(DestroyPeer) (THIS_ const DPNID dpnidClient, const void *const pvDestroyData, const DWORD dwDestroyDataSize, const DWORD dwFlags) PURE;
  1420. STDMETHOD(ReturnBuffer) (THIS_ const DPNHANDLE hBufferHandle,const DWORD dwFlags) PURE;
  1421. STDMETHOD(GetPlayerContext) (THIS_ const DPNID dpnid,PVOID *const ppvPlayerContext,const DWORD dwFlags) PURE;
  1422. STDMETHOD(GetGroupContext) (THIS_ const DPNID dpnid,PVOID *const ppvGroupContext,const DWORD dwFlags) PURE;
  1423. STDMETHOD(GetCaps) (THIS_ DPN_CAPS *const pdpCaps,const DWORD dwFlags) PURE;
  1424. STDMETHOD(SetCaps) (THIS_ const DPN_CAPS *const pdpCaps, const DWORD dwFlags) PURE;
  1425. STDMETHOD(SetSPCaps) (THIS_ const GUID * const pguidSP, const DPN_SP_CAPS *const pdpspCaps, const DWORD dwFlags ) PURE;
  1426. STDMETHOD(GetSPCaps) (THIS_ const GUID * const pguidSP, DPN_SP_CAPS *const pdpspCaps,const DWORD dwFlags) PURE;
  1427. STDMETHOD(GetConnectionInfo) (THIS_ const DPNID dpnid, DPN_CONNECTION_INFO *const pdpConnectionInfo,const DWORD dwFlags) PURE;
  1428. STDMETHOD(RegisterLobby) (THIS_ const DPNHANDLE dpnHandle, struct IDirectPlay8LobbiedApplication *const pIDP8LobbiedApplication,const DWORD dwFlags) PURE;
  1429. STDMETHOD(TerminateSession) (THIS_ void *const pvTerminateData,const DWORD dwTerminateDataSize,const DWORD dwFlags) PURE;
  1430. };
  1431. //@@BEGIN_MSINTERNAL
  1432. #ifndef _XBOX
  1433. //
  1434. // COM definition for DirectPlay8 Thread Pool interface
  1435. //
  1436. #undef INTERFACE // External COM Implementation
  1437. #define INTERFACE IDirectPlay8ThreadPool
  1438. DECLARE_INTERFACE_(IDirectPlay8ThreadPool,IUnknown)
  1439. {
  1440. /*** IUnknown methods ***/
  1441. STDMETHOD(QueryInterface) (THIS_ DP8REFIID riid, LPVOID *ppvObj) PURE;
  1442. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  1443. STDMETHOD_(ULONG,Release) (THIS) PURE;
  1444. /*** IDirectPlay8ThreadPool methods ***/
  1445. STDMETHOD(Initialize) (THIS_ PVOID const pvUserContext, const PFNDPNMESSAGEHANDLER pfn, const DWORD dwFlags) PURE;
  1446. STDMETHOD(Close) (THIS_ const DWORD dwFlags) PURE;
  1447. STDMETHOD(GetThreadCount) (THIS_ const DWORD dwProcessorNum, DWORD *const pdwNumThreads, const DWORD dwFlags) PURE;
  1448. STDMETHOD(SetThreadCount) (THIS_ const DWORD dwProcessorNum, const DWORD dwNumThreads, const DWORD dwFlags) PURE;
  1449. STDMETHOD(DoWork) (THIS_ const DWORD dwAllowedTimeSlice, const DWORD dwFlags) PURE;
  1450. };
  1451. #endif // ! _XBOX
  1452. //
  1453. // COM definition for DirectPlay8 Thread Pool Work interface
  1454. //
  1455. #undef INTERFACE // External COM Implementation
  1456. #define INTERFACE IDirectPlay8ThreadPoolWork
  1457. DECLARE_INTERFACE_(IDirectPlay8ThreadPoolWork,IUnknown)
  1458. {
  1459. #if ((! defined(DPNBUILD_LIBINTERFACE)) || (! defined(DPNBUILD_ONLYONETHREAD)) || (defined(DPNBUILD_MULTIPLETHREADPOOLS)))
  1460. /*** IUnknown methods ***/
  1461. STDMETHOD(QueryInterface) (THIS_ DP8REFIID riid, LPVOID *ppvObj) PURE;
  1462. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  1463. STDMETHOD_(ULONG,Release) (THIS) PURE;
  1464. #endif // ! DPNBUILD_LIBINTERFACE or ! DPNBUILD_ONLYONETHREAD or DPNBUILD_MULTIPLETHREADPOOLS
  1465. /*** IDirectPlay8ThreadPoolWork methods ***/
  1466. STDMETHOD(QueueWorkItem) (THIS_ const DWORD dwCPU, const PFNDPTNWORKCALLBACK pfnWorkCallback, PVOID const pvCallbackContext, const DWORD dwFlags) PURE;
  1467. STDMETHOD(ScheduleTimer) (THIS_ const DWORD dwCPU, const DWORD dwDelay, const PFNDPTNWORKCALLBACK pfnWorkCallback, PVOID const pvCallbackContext, void **const ppvTimerData, UINT *const puiTimerUnique, const DWORD dwFlags) PURE;
  1468. STDMETHOD(StartTrackingFileIo) (THIS_ const DWORD dwCPU, const HANDLE hFile, const DWORD dwFlags) PURE;
  1469. STDMETHOD(StopTrackingFileIo) (THIS_ const DWORD dwCPU, const HANDLE hFile, const DWORD dwFlags) PURE;
  1470. STDMETHOD(CreateOverlapped) (THIS_ const DWORD dwCPU, const PFNDPTNWORKCALLBACK pfnWorkCallback, PVOID const pvCallbackContext, OVERLAPPED **const ppOverlapped, const DWORD dwFlags) PURE;
  1471. STDMETHOD(SubmitIoOperation) (THIS_ OVERLAPPED *const pOverlapped, const DWORD dwFlags) PURE;
  1472. STDMETHOD(ReleaseOverlapped) (THIS_ OVERLAPPED *const pOverlapped, const DWORD dwFlags) PURE;
  1473. STDMETHOD(CancelTimer) (THIS_ void *const pvTimerData, const UINT uiTimerUnique, const DWORD dwFlags) PURE;
  1474. STDMETHOD(ResetCompletingTimer) (THIS_ void *const pvTimerData, const DWORD dwNewDelay, const PFNDPTNWORKCALLBACK pfnNewWorkCallback, PVOID const pvNewCallbackContext, UINT *const puiNewTimerUnique, const DWORD dwFlags) PURE;
  1475. STDMETHOD(WaitWhileWorking) (THIS_ const HANDLE hWaitObject, const DWORD dwFlags) PURE;
  1476. STDMETHOD(SleepWhileWorking) (THIS_ const DWORD dwTimeout, const DWORD dwFlags) PURE;
  1477. STDMETHOD(RequestTotalThreadCount) (THIS_ const DWORD dwNumThreads, const DWORD dwFlags) PURE;
  1478. STDMETHOD(GetThreadCount) (THIS_ const DWORD dwCPU, DWORD *const pdwNumThreads, const DWORD dwFlags) PURE;
  1479. STDMETHOD(GetWorkRecursionDepth) (THIS_ DWORD *const pdwDepth, const DWORD dwFlags) PURE;
  1480. STDMETHOD(Preallocate) (THIS_ const DWORD dwNumWorkItems, const DWORD dwNumTimers, const DWORD dwNumIoOperations, const DWORD dwFlags) PURE;
  1481. #ifdef DPNBUILD_MANDATORYTHREADS
  1482. STDMETHOD(CreateMandatoryThread) (THIS_ LPSECURITY_ATTRIBUTES lpThreadAttributes, SIZE_T dwStackSize, LPTHREAD_START_ROUTINE lpStartAddress, LPVOID lpParameter, LPDWORD lpThreadId, HANDLE *const phThread, const DWORD dwFlags) PURE;
  1483. #endif // DPNBUILD_MANDATORYTHREADS
  1484. };
  1485. #ifndef DPNBUILD_NOMULTICAST
  1486. //
  1487. // COM definition for DirectPlay8 Multicast interface
  1488. //
  1489. #undef INTERFACE // External COM Implementation
  1490. #define INTERFACE IDirectPlay8Multicast
  1491. DECLARE_INTERFACE_(IDirectPlay8Multicast,IUnknown)
  1492. {
  1493. /*** IUnknown methods ***/
  1494. STDMETHOD(QueryInterface) (THIS_ DP8REFIID riid, LPVOID *ppvObj) PURE;
  1495. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  1496. STDMETHOD_(ULONG,Release) (THIS) PURE;
  1497. /*** IDirectPlay8Multicast methods ***/
  1498. STDMETHOD(Initialize) (THIS_ PVOID const pvUserContext, const PFNDPNMESSAGEHANDLER pfn, const DWORD dwFlags) PURE;
  1499. STDMETHOD(Join) (THIS_ IDirectPlay8Address *const pGroupAddr,IUnknown *const pDeviceInfo, const DPN_SECURITY_DESC *const pdnSecurity, const DPN_SECURITY_CREDENTIALS *const pdnCredentials, void *const pvAsyncContext, DPNHANDLE *const phAsyncHandle, const DWORD dwFlags) PURE;
  1500. STDMETHOD(Close) (THIS_ const DWORD dwFlags) PURE;
  1501. STDMETHOD(CreateSenderContext) (THIS_ IDirectPlay8Address *const pSenderAddress,void *const pvSenderContext, const DWORD dwFlags) PURE;
  1502. STDMETHOD(DestroySenderContext) (THIS_ IDirectPlay8Address *const pSenderAddress,const DWORD dwFlags) PURE;
  1503. 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;
  1504. STDMETHOD(GetGroupAddress) (THIS_ IDirectPlay8Address **const ppAddress, const DWORD dwFlags) PURE;
  1505. STDMETHOD(GetSendQueueInfo) (THIS_ DWORD *const pdwNumMsgs, DWORD *const pdwNumBytes, const DWORD dwFlags) PURE;
  1506. STDMETHOD(CancelAsyncOperation) (THIS_ const DPNHANDLE hAsyncHandle, const DWORD dwFlags) PURE;
  1507. STDMETHOD(ReturnBuffer) (THIS_ const DPNHANDLE hBufferHandle, const DWORD dwFlags) PURE;
  1508. 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;
  1509. STDMETHOD(EnumMulticastScopes) (THIS_ const GUID *const pguidServiceProvider, const GUID *const pguidDevice, const GUID *const pguidApplication, DPN_MULTICAST_SCOPE_INFO *const pScopeInfoBuffer, PDWORD const pcbEnumData, PDWORD const pcReturned, const DWORD dwFlags) PURE;
  1510. STDMETHOD(GetSPCaps) (THIS_ const GUID * const pguidSP, DPN_SP_CAPS *const pdpspCaps, const DWORD dwFlags) PURE;
  1511. STDMETHOD(SetSPCaps) (THIS_ const GUID * const pguidSP, const DPN_SP_CAPS *const pdpspCaps, const DWORD dwFlags ) PURE;
  1512. };
  1513. #endif // ! DPNBUILD_NOMULTICAST
  1514. //@@END_MSINTERNAL
  1515. /****************************************************************************
  1516. *
  1517. * IDirectPlay8 application interface macros
  1518. *
  1519. ****************************************************************************/
  1520. #if !defined(__cplusplus) || defined(CINTERFACE)
  1521. #define IDirectPlay8Client_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  1522. #define IDirectPlay8Client_AddRef(p) (p)->lpVtbl->AddRef(p)
  1523. #define IDirectPlay8Client_Release(p) (p)->lpVtbl->Release(p)
  1524. #define IDirectPlay8Client_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c)
  1525. #define IDirectPlay8Client_EnumServiceProviders(p,a,b,c,d,e,f) (p)->lpVtbl->EnumServiceProviders(p,a,b,c,d,e,f)
  1526. #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)
  1527. #define IDirectPlay8Client_CancelAsyncOperation(p,a,b) (p)->lpVtbl->CancelAsyncOperation(p,a,b)
  1528. #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)
  1529. #define IDirectPlay8Client_Send(p,a,b,c,d,e,f) (p)->lpVtbl->Send(p,a,b,c,d,e,f)
  1530. #define IDirectPlay8Client_GetSendQueueInfo(p,a,b,c) (p)->lpVtbl->GetSendQueueInfo(p,a,b,c)
  1531. #define IDirectPlay8Client_GetApplicationDesc(p,a,b,c) (p)->lpVtbl->GetApplicationDesc(p,a,b,c)
  1532. #define IDirectPlay8Client_SetClientInfo(p,a,b,c,d) (p)->lpVtbl->SetClientInfo(p,a,b,c,d)
  1533. #define IDirectPlay8Client_GetServerInfo(p,a,b,c) (p)->lpVtbl->GetServerInfo(p,a,b,c)
  1534. #define IDirectPlay8Client_GetServerAddress(p,a,b) (p)->lpVtbl->GetServerAddress(p,a,b)
  1535. #define IDirectPlay8Client_Close(p,a) (p)->lpVtbl->Close(p,a)
  1536. #define IDirectPlay8Client_ReturnBuffer(p,a,b) (p)->lpVtbl->ReturnBuffer(p,a,b)
  1537. #define IDirectPlay8Client_GetCaps(p,a,b) (p)->lpVtbl->GetCaps(p,a,b)
  1538. #define IDirectPlay8Client_SetCaps(p,a,b) (p)->lpVtbl->SetCaps(p,a,b)
  1539. #define IDirectPlay8Client_SetSPCaps(p,a,b,c) (p)->lpVtbl->SetSPCaps(p,a,b,c)
  1540. #define IDirectPlay8Client_GetSPCaps(p,a,b,c) (p)->lpVtbl->GetSPCaps(p,a,b,c)
  1541. #define IDirectPlay8Client_GetConnectionInfo(p,a,b) (p)->lpVtbl->GetConnectionInfo(p,a,b)
  1542. #define IDirectPlay8Client_RegisterLobby(p,a,b,c) (p)->lpVtbl->RegisterLobby(p,a,b,c)
  1543. //@@BEGIN_MSINTERNAL
  1544. #ifndef DPNBUILD_NOSERVER
  1545. //@@END_MSINTERNAL
  1546. #define IDirectPlay8Server_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  1547. #define IDirectPlay8Server_AddRef(p) (p)->lpVtbl->AddRef(p)
  1548. #define IDirectPlay8Server_Release(p) (p)->lpVtbl->Release(p)
  1549. #define IDirectPlay8Server_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c)
  1550. #define IDirectPlay8Server_EnumServiceProviders(p,a,b,c,d,e,f) (p)->lpVtbl->EnumServiceProviders(p,a,b,c,d,e,f)
  1551. #define IDirectPlay8Server_CancelAsyncOperation(p,a,b) (p)->lpVtbl->CancelAsyncOperation(p,a,b)
  1552. #define IDirectPlay8Server_GetSendQueueInfo(p,a,b,c,d) (p)->lpVtbl->GetSendQueueInfo(p,a,b,c,d)
  1553. #define IDirectPlay8Server_GetApplicationDesc(p,a,b,c) (p)->lpVtbl->GetApplicationDesc(p,a,b,c)
  1554. #define IDirectPlay8Server_SetServerInfo(p,a,b,c,d) (p)->lpVtbl->SetServerInfo(p,a,b,c,d)
  1555. #define IDirectPlay8Server_GetClientInfo(p,a,b,c,d) (p)->lpVtbl->GetClientInfo(p,a,b,c,d)
  1556. #define IDirectPlay8Server_GetClientAddress(p,a,b,c) (p)->lpVtbl->GetClientAddress(p,a,b,c)
  1557. #define IDirectPlay8Server_GetLocalHostAddresses(p,a,b,c) (p)->lpVtbl->GetLocalHostAddresses(p,a,b,c)
  1558. #define IDirectPlay8Server_SetApplicationDesc(p,a,b) (p)->lpVtbl->SetApplicationDesc(p,a,b)
  1559. #define IDirectPlay8Server_Host(p,a,b,c,d,e,f,g) (p)->lpVtbl->Host(p,a,b,c,d,e,f,g)
  1560. #define IDirectPlay8Server_SendTo(p,a,b,c,d,e,f,g) (p)->lpVtbl->SendTo(p,a,b,c,d,e,f,g)
  1561. #define IDirectPlay8Server_CreateGroup(p,a,b,c,d,e) (p)->lpVtbl->CreateGroup(p,a,b,c,d,e)
  1562. #define IDirectPlay8Server_DestroyGroup(p,a,b,c,d) (p)->lpVtbl->DestroyGroup(p,a,b,c,d)
  1563. #define IDirectPlay8Server_AddPlayerToGroup(p,a,b,c,d,e) (p)->lpVtbl->AddPlayerToGroup(p,a,b,c,d,e)
  1564. #define IDirectPlay8Server_RemovePlayerFromGroup(p,a,b,c,d,e) (p)->lpVtbl->RemovePlayerFromGroup(p,a,b,c,d,e)
  1565. #define IDirectPlay8Server_SetGroupInfo(p,a,b,c,d,e) (p)->lpVtbl->SetGroupInfo(p,a,b,c,d,e)
  1566. #define IDirectPlay8Server_GetGroupInfo(p,a,b,c,d) (p)->lpVtbl->GetGroupInfo(p,a,b,c,d)
  1567. #define IDirectPlay8Server_EnumPlayersAndGroups(p,a,b,c) (p)->lpVtbl->EnumPlayersAndGroups(p,a,b,c)
  1568. #define IDirectPlay8Server_EnumGroupMembers(p,a,b,c,d) (p)->lpVtbl->EnumGroupMembers(p,a,b,c,d)
  1569. #define IDirectPlay8Server_Close(p,a) (p)->lpVtbl->Close(p,a)
  1570. #define IDirectPlay8Server_DestroyClient(p,a,b,c,d) (p)->lpVtbl->DestroyClient(p,a,b,c,d)
  1571. #define IDirectPlay8Server_ReturnBuffer(p,a,b) (p)->lpVtbl->ReturnBuffer(p,a,b)
  1572. #define IDirectPlay8Server_GetPlayerContext(p,a,b,c) (p)->lpVtbl->GetPlayerContext(p,a,b,c)
  1573. #define IDirectPlay8Server_GetGroupContext(p,a,b,c) (p)->lpVtbl->GetGroupContext(p,a,b,c)
  1574. #define IDirectPlay8Server_GetCaps(p,a,b) (p)->lpVtbl->GetCaps(p,a,b)
  1575. #define IDirectPlay8Server_SetCaps(p,a,b) (p)->lpVtbl->SetCaps(p,a,b)
  1576. #define IDirectPlay8Server_SetSPCaps(p,a,b,c) (p)->lpVtbl->SetSPCaps(p,a,b,c)
  1577. #define IDirectPlay8Server_GetSPCaps(p,a,b,c) (p)->lpVtbl->GetSPCaps(p,a,b,c)
  1578. #define IDirectPlay8Server_GetConnectionInfo(p,a,b,c) (p)->lpVtbl->GetConnectionInfo(p,a,b,c)
  1579. #define IDirectPlay8Server_RegisterLobby(p,a,b,c) (p)->lpVtbl->RegisterLobby(p,a,b,c)
  1580. //@@BEGIN_MSINTERNAL
  1581. #endif // ! DPNBUILD_NOSERVER
  1582. //@@END_MSINTERNAL
  1583. #define IDirectPlay8Peer_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  1584. #define IDirectPlay8Peer_AddRef(p) (p)->lpVtbl->AddRef(p)
  1585. #define IDirectPlay8Peer_Release(p) (p)->lpVtbl->Release(p)
  1586. #define IDirectPlay8Peer_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c)
  1587. #define IDirectPlay8Peer_EnumServiceProviders(p,a,b,c,d,e,f) (p)->lpVtbl->EnumServiceProviders(p,a,b,c,d,e,f)
  1588. #define IDirectPlay8Peer_CancelAsyncOperation(p,a,b) (p)->lpVtbl->CancelAsyncOperation(p,a,b)
  1589. #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)
  1590. #define IDirectPlay8Peer_SendTo(p,a,b,c,d,e,f,g) (p)->lpVtbl->SendTo(p,a,b,c,d,e,f,g)
  1591. #define IDirectPlay8Peer_GetSendQueueInfo(p,a,b,c,d) (p)->lpVtbl->GetSendQueueInfo(p,a,b,c,d)
  1592. #define IDirectPlay8Peer_Host(p,a,b,c,d,e,f,g) (p)->lpVtbl->Host(p,a,b,c,d,e,f,g)
  1593. #define IDirectPlay8Peer_GetApplicationDesc(p,a,b,c) (p)->lpVtbl->GetApplicationDesc(p,a,b,c)
  1594. #define IDirectPlay8Peer_SetApplicationDesc(p,a,b) (p)->lpVtbl->SetApplicationDesc(p,a,b)
  1595. #define IDirectPlay8Peer_CreateGroup(p,a,b,c,d,e) (p)->lpVtbl->CreateGroup(p,a,b,c,d,e)
  1596. #define IDirectPlay8Peer_DestroyGroup(p,a,b,c,d) (p)->lpVtbl->DestroyGroup(p,a,b,c,d)
  1597. #define IDirectPlay8Peer_AddPlayerToGroup(p,a,b,c,d,e) (p)->lpVtbl->AddPlayerToGroup(p,a,b,c,d,e)
  1598. #define IDirectPlay8Peer_RemovePlayerFromGroup(p,a,b,c,d,e) (p)->lpVtbl->RemovePlayerFromGroup(p,a,b,c,d,e)
  1599. #define IDirectPlay8Peer_SetGroupInfo(p,a,b,c,d,e) (p)->lpVtbl->SetGroupInfo(p,a,b,c,d,e)
  1600. #define IDirectPlay8Peer_GetGroupInfo(p,a,b,c,d) (p)->lpVtbl->GetGroupInfo(p,a,b,c,d)
  1601. #define IDirectPlay8Peer_EnumPlayersAndGroups(p,a,b,c) (p)->lpVtbl->EnumPlayersAndGroups(p,a,b,c)
  1602. #define IDirectPlay8Peer_EnumGroupMembers(p,a,b,c,d) (p)->lpVtbl->EnumGroupMembers(p,a,b,c,d)
  1603. #define IDirectPlay8Peer_SetPeerInfo(p,a,b,c,d) (p)->lpVtbl->SetPeerInfo(p,a,b,c,d)
  1604. #define IDirectPlay8Peer_GetPeerInfo(p,a,b,c,d) (p)->lpVtbl->GetPeerInfo(p,a,b,c,d)
  1605. #define IDirectPlay8Peer_GetPeerAddress(p,a,b,c) (p)->lpVtbl->GetPeerAddress(p,a,b,c)
  1606. #define IDirectPlay8Peer_GetLocalHostAddresses(p,a,b,c) (p)->lpVtbl->GetLocalHostAddresses(p,a,b,c)
  1607. #define IDirectPlay8Peer_Close(p,a) (p)->lpVtbl->Close(p,a)
  1608. #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)
  1609. #define IDirectPlay8Peer_DestroyPeer(p,a,b,c,d) (p)->lpVtbl->DestroyPeer(p,a,b,c,d)
  1610. #define IDirectPlay8Peer_ReturnBuffer(p,a,b) (p)->lpVtbl->ReturnBuffer(p,a,b)
  1611. #define IDirectPlay8Peer_GetPlayerContext(p,a,b,c) (p)->lpVtbl->GetPlayerContext(p,a,b,c)
  1612. #define IDirectPlay8Peer_GetGroupContext(p,a,b,c) (p)->lpVtbl->GetGroupContext(p,a,b,c)
  1613. #define IDirectPlay8Peer_GetCaps(p,a,b) (p)->lpVtbl->GetCaps(p,a,b)
  1614. #define IDirectPlay8Peer_SetCaps(p,a,b) (p)->lpVtbl->SetCaps(p,a,b)
  1615. #define IDirectPlay8Peer_SetSPCaps(p,a,b,c) (p)->lpVtbl->SetSPCaps(p,a,b,c)
  1616. #define IDirectPlay8Peer_GetSPCaps(p,a,b,c) (p)->lpVtbl->GetSPCaps(p,a,b,c)
  1617. #define IDirectPlay8Peer_GetConnectionInfo(p,a,b,c) (p)->lpVtbl->GetConnectionInfo(p,a,b,c)
  1618. #define IDirectPlay8Peer_RegisterLobby(p,a,b,c) (p)->lpVtbl->RegisterLobby(p,a,b,c)
  1619. #define IDirectPlay8Peer_TerminateSession(p,a,b,c) (p)->lpVtbl->TerminateSession(p,a,b,c)
  1620. //@@BEGIN_MSINTERNAL
  1621. #define IDirectPlay8ThreadPool_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  1622. #define IDirectPlay8ThreadPool_AddRef(p) (p)->lpVtbl->AddRef(p)
  1623. #define IDirectPlay8ThreadPool_Release(p) (p)->lpVtbl->Release(p)
  1624. #define IDirectPlay8ThreadPool_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c)
  1625. #define IDirectPlay8ThreadPool_Close(p,a) (p)->lpVtbl->Close(p,a)
  1626. #define IDirectPlay8ThreadPool_GetThreadCount(p,a,b,c) (p)->lpVtbl->GetThreadCount(p,a,b,c)
  1627. #define IDirectPlay8ThreadPool_SetThreadCount(p,a,b,c) (p)->lpVtbl->SetThreadCount(p,a,b,c)
  1628. #define IDirectPlay8ThreadPool_DoWork(p,a,b) (p)->lpVtbl->DoWork(p,a,b)
  1629. #if ((defined(DPNBUILD_LIBINTERFACE)) && (defined(DPNBUILD_ONLYONETHREAD)) && (! defined(DPNBUILD_MULTIPLETHREADPOOLS)))
  1630. #define IDirectPlay8ThreadPoolWork_AddRef(p)
  1631. #define IDirectPlay8ThreadPoolWork_Release(p)
  1632. #else // ! DPNBUILD_LIBINTERFACE or ! DPNBUILD_ONLYONETHREAD or DPNBUILD_MULTIPLETHREADPOOLS
  1633. #define IDirectPlay8ThreadPoolWork_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  1634. #define IDirectPlay8ThreadPoolWork_AddRef(p) (p)->lpVtbl->AddRef(p)
  1635. #define IDirectPlay8ThreadPoolWork_Release(p) (p)->lpVtbl->Release(p)
  1636. #endif // ! DPNBUILD_LIBINTERFACE or ! DPNBUILD_ONLYONETHREAD or DPNBUILD_MULTIPLETHREADPOOLS
  1637. #define IDirectPlay8ThreadPoolWork_QueueWorkItem(p,a,b,c,d) (p)->lpVtbl->QueueWorkItem(p,a,b,c,d)
  1638. #define IDirectPlay8ThreadPoolWork_ScheduleTimer(p,a,b,c,d,e,f,g) (p)->lpVtbl->ScheduleTimer(p,a,b,c,d,e,f,g)
  1639. #define IDirectPlay8ThreadPoolWork_StartTrackingFileIo(p,a,b,c) (p)->lpVtbl->StartTrackingFileIo(p,a,b,c)
  1640. #define IDirectPlay8ThreadPoolWork_StopTrackingFileIo(p,a,b,c) (p)->lpVtbl->StopTrackingFileIo(p,a,b,c)
  1641. #define IDirectPlay8ThreadPoolWork_CreateOverlapped(p,a,b,c,d,e) (p)->lpVtbl->CreateOverlapped(p,a,b,c,d,e)
  1642. #ifdef DPNBUILD_USEIOCOMPLETIONPORTS
  1643. #define IDirectPlay8ThreadPoolWork_SubmitIoOperation(p,a,b) ((HRESULT) DPN_OK)
  1644. #else // ! DPNBUILD_USEIOCOMPLETIONPORTS
  1645. #define IDirectPlay8ThreadPoolWork_SubmitIoOperation(p,a,b) (p)->lpVtbl->SubmitIoOperation(p,a,b)
  1646. #endif // ! DPNBUILD_USEIOCOMPLETIONPORTS
  1647. #define IDirectPlay8ThreadPoolWork_ReleaseOverlapped(p,a,b) (p)->lpVtbl->ReleaseOverlapped(p,a,b)
  1648. #define IDirectPlay8ThreadPoolWork_CancelTimer(p,a,b,c) (p)->lpVtbl->CancelTimer(p,a,b,c)
  1649. #define IDirectPlay8ThreadPoolWork_ResetCompletingTimer(p,a,b,c,d,e,f) (p)->lpVtbl->ResetCompletingTimer(p,a,b,c,d,e,f)
  1650. #define IDirectPlay8ThreadPoolWork_WaitWhileWorking(p,a,b) (p)->lpVtbl->WaitWhileWorking(p,a,b)
  1651. #define IDirectPlay8ThreadPoolWork_SleepWhileWorking(p,a,b) (p)->lpVtbl->SleepWhileWorking(p,a,b)
  1652. #define IDirectPlay8ThreadPoolWork_RequestTotalThreadCount(p,a,b) (p)->lpVtbl->RequestTotalThreadCount(p,a,b)
  1653. #define IDirectPlay8ThreadPoolWork_GetThreadCount(p,a,b,c) (p)->lpVtbl->GetThreadCount(p,a,b,c)
  1654. #define IDirectPlay8ThreadPoolWork_GetWorkRecursionDepth(p,a,b) (p)->lpVtbl->GetWorkRecursionDepth(p,a,b)
  1655. #define IDirectPlay8ThreadPoolWork_Preallocate(p,a,b,c,d) (p)->lpVtbl->Preallocate(p,a,b,c,d)
  1656. #ifdef DPNBUILD_MANDATORYTHREADS
  1657. #define IDirectPlay8ThreadPoolWork_CreateMandatoryThread(p,a,b,c,d,e,f,g) (p)->lpVtbl->CreateMandatoryThread(p,a,b,c,d,e,f,g)
  1658. #endif // DPNBUILD_MANDATORYTHREADS
  1659. #ifndef DPNBUILD_NOMULTICAST
  1660. #define IDirectPlay8Multicast_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  1661. #define IDirectPlay8Multicast_AddRef(p) (p)->lpVtbl->AddRef(p)
  1662. #define IDirectPlay8Multicast_Release(p) (p)->lpVtbl->Release(p)
  1663. #define IDirectPlay8Multicast_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c)
  1664. #define IDirectPlay8Multicast_Join(p,a,b,c,d,e,f,g) (p)->lpVtbl->Join(p,a,b,c,d,e,f,g)
  1665. #define IDirectPlay8Multicast_Close(p,a) (p)->lpVtbl->Close(p,a)
  1666. #define IDirectPlay8Multicast_CreateSenderContext(p,a,b,c) (p)->lpVtbl->CreateSenderContext(p,a,b,c)
  1667. #define IDirectPlay8Multicast_DestroySenderContext(p,a,b,c) (p)->lpVtbl->DestroySenderContext(p,a,b,c)
  1668. #define IDirectPlay8Multicast_Send(p,a,b,c,d,e,f) (p)->lpVtbl->SendTo(p,a,b,c,d,e,f)
  1669. #define IDirectPlay8Multicast_GetGroupAddress(p,a,b) (p)->lpVtbl->GetGroupAddress(p,a,b)
  1670. #define IDirectPlay8Multicast_GetSendQueueInfo(p,a,b,c) (p)->lpVtbl->GetSendQueueInfo(p,a,b,c)
  1671. #define IDirectPlay8Multicast_CancelAsyncOperation(p,a,b) (p)->lpVtbl->CancelAsyncOperation(p,a,b)
  1672. #define IDirectPlay8Multicast_ReturnBuffer(p,a,b) (p)->lpVtbl->ReturnBuffer(p,a,b)
  1673. #define IDirectPlay8Multicast_EnumServiceProviders(p,a,b,c,d,e,f) (p)->lpVtbl->EnumServiceProviders(p,a,b,c,d,e,f)
  1674. #define IDirectPlay8Multicast_EnumMulticastScopes(p,a,b,c,d,e,f,g) (p)->lpVtbl->EnumMulticastScopes(p,a,b,c,d,e,f,g)
  1675. #define IDirectPlay8Multicast_GetSPCaps(p,a,b,c) (p)->lpVtbl->GetSPCaps(p,a,b,c)
  1676. #define IDirectPlay8Multicast_SetSPCaps(p,a,b,c) (p)->lpVtbl->SetSPCaps(p,a,b,c)
  1677. #endif // ! DPNBUILD_NOMULTICAST
  1678. //@@END_MSINTERNAL
  1679. #else /* C++ */
  1680. #define IDirectPlay8Client_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  1681. #define IDirectPlay8Client_AddRef(p) (p)->AddRef()
  1682. #define IDirectPlay8Client_Release(p) (p)->Release()
  1683. #define IDirectPlay8Client_Initialize(p,a,b,c) (p)->Initialize(a,b,c)
  1684. #define IDirectPlay8Client_EnumServiceProviders(p,a,b,c,d,e,f) (p)->EnumServiceProviders(a,b,c,d,e,f)
  1685. #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)
  1686. #define IDirectPlay8Client_CancelAsyncOperation(p,a,b) (p)->CancelAsyncOperation(a,b)
  1687. #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)
  1688. #define IDirectPlay8Client_Send(p,a,b,c,d,e,f) (p)->Send(a,b,c,d,e,f)
  1689. #define IDirectPlay8Client_GetSendQueueInfo(p,a,b,c) (p)->GetSendQueueInfo(a,b,c)
  1690. #define IDirectPlay8Client_GetApplicationDesc(p,a,b,c) (p)->GetApplicationDesc(a,b,c)
  1691. #define IDirectPlay8Client_SetClientInfo(p,a,b,c,d) (p)->SetClientInfo(a,b,c,d)
  1692. #define IDirectPlay8Client_GetServerInfo(p,a,b,c) (p)->GetServerInfo(a,b,c)
  1693. #define IDirectPlay8Client_GetServerAddress(p,a,b) (p)->GetServerAddress(a,b)
  1694. #define IDirectPlay8Client_Close(p,a) (p)->Close(a)
  1695. #define IDirectPlay8Client_ReturnBuffer(p,a,b) (p)->ReturnBuffer(a,b)
  1696. #define IDirectPlay8Client_GetCaps(p,a,b) (p)->GetCaps(a,b)
  1697. #define IDirectPlay8Client_SetCaps(p,a,b) (p)->SetCaps(a,b)
  1698. #define IDirectPlay8Client_SetSPCaps(p,a,b,c) (p)->SetSPCaps(a,b,c)
  1699. #define IDirectPlay8Client_GetSPCaps(p,a,b,c) (p)->GetSPCaps(a,b,c)
  1700. #define IDirectPlay8Client_GetConnectionInfo(p,a,b) (p)->GetConnectionInfo(a,b)
  1701. #define IDirectPlay8Client_RegisterLobby(p,a,b,c) (p)->RegisterLobby(a,b,c)
  1702. //@@BEGIN_MSINTERNAL
  1703. #ifndef DPNBUILD_NOSERVER
  1704. //@@END_MSINTERNAL
  1705. #define IDirectPlay8Server_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  1706. #define IDirectPlay8Server_AddRef(p) (p)->AddRef()
  1707. #define IDirectPlay8Server_Release(p) (p)->Release()
  1708. #define IDirectPlay8Server_Initialize(p,a,b,c) (p)->Initialize(a,b,c)
  1709. #define IDirectPlay8Server_EnumServiceProviders(p,a,b,c,d,e,f) (p)->EnumServiceProviders(a,b,c,d,e,f)
  1710. #define IDirectPlay8Server_CancelAsyncOperation(p,a,b) (p)->CancelAsyncOperation(a,b)
  1711. #define IDirectPlay8Server_GetSendQueueInfo(p,a,b,c,d) (p)->GetSendQueueInfo(a,b,c,d)
  1712. #define IDirectPlay8Server_GetApplicationDesc(p,a,b,c) (p)->GetApplicationDesc(a,b,c)
  1713. #define IDirectPlay8Server_SetServerInfo(p,a,b,c,d) (p)->SetServerInfo(a,b,c,d)
  1714. #define IDirectPlay8Server_GetClientInfo(p,a,b,c,d) (p)->GetClientInfo(a,b,c,d)
  1715. #define IDirectPlay8Server_GetClientAddress(p,a,b,c) (p)->GetClientAddress(a,b,c)
  1716. #define IDirectPlay8Server_GetLocalHostAddresses(p,a,b,c) (p)->GetLocalHostAddresses(a,b,c)
  1717. #define IDirectPlay8Server_SetApplicationDesc(p,a,b) (p)->SetApplicationDesc(a,b)
  1718. #define IDirectPlay8Server_Host(p,a,b,c,d,e,f,g) (p)->Host(a,b,c,d,e,f,g)
  1719. #define IDirectPlay8Server_SendTo(p,a,b,c,d,e,f,g) (p)->SendTo(a,b,c,d,e,f,g)
  1720. #define IDirectPlay8Server_CreateGroup(p,a,b,c,d,e) (p)->CreateGroup(a,b,c,d,e)
  1721. #define IDirectPlay8Server_DestroyGroup(p,a,b,c,d) (p)->DestroyGroup(a,b,c,d)
  1722. #define IDirectPlay8Server_AddPlayerToGroup(p,a,b,c,d,e) (p)->AddPlayerToGroup(a,b,c,d,e)
  1723. #define IDirectPlay8Server_RemovePlayerFromGroup(p,a,b,c,d,e) (p)->RemovePlayerFromGroup(a,b,c,d,e)
  1724. #define IDirectPlay8Server_SetGroupInfo(p,a,b,c,d,e) (p)->SetGroupInfo(a,b,c,d,e)
  1725. #define IDirectPlay8Server_GetGroupInfo(p,a,b,c,d) (p)->GetGroupInfo(a,b,c,d)
  1726. #define IDirectPlay8Server_EnumPlayersAndGroups(p,a,b,c) (p)->EnumPlayersAndGroups(a,b,c)
  1727. #define IDirectPlay8Server_EnumGroupMembers(p,a,b,c,d) (p)->EnumGroupMembers(a,b,c,d)
  1728. #define IDirectPlay8Server_Close(p,a) (p)->Close(a)
  1729. #define IDirectPlay8Server_DestroyClient(p,a,b,c,d) (p)->DestroyClient(a,b,c,d)
  1730. #define IDirectPlay8Server_ReturnBuffer(p,a,b) (p)->ReturnBuffer(a,b)
  1731. #define IDirectPlay8Server_GetPlayerContext(p,a,b,c) (p)->GetPlayerContext(a,b,c)
  1732. #define IDirectPlay8Server_GetGroupContext(p,a,b,c) (p)->GetGroupContext(a,b,c)
  1733. #define IDirectPlay8Server_GetCaps(p,a,b) (p)->GetCaps(a,b)
  1734. #define IDirectPlay8Server_SetCaps(p,a,b) (p)->SetCaps(a,b)
  1735. #define IDirectPlay8Server_SetSPCaps(p,a,b,c) (p)->SetSPCaps(a,b,c)
  1736. #define IDirectPlay8Server_GetSPCaps(p,a,b,c) (p)->GetSPCaps(a,b,c)
  1737. #define IDirectPlay8Server_GetConnectionInfo(p,a,b,c) (p)->GetConnectionInfo(a,b,c)
  1738. #define IDirectPlay8Server_RegisterLobby(p,a,b,c) (p)->RegisterLobby(a,b,c)
  1739. //@@BEGIN_MSINTERNAL
  1740. #endif // ! DPNBUILD_NOSERVER
  1741. //@@END_MSINTERNAL
  1742. #define IDirectPlay8Peer_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  1743. #define IDirectPlay8Peer_AddRef(p) (p)->AddRef()
  1744. #define IDirectPlay8Peer_Release(p) (p)->Release()
  1745. #define IDirectPlay8Peer_Initialize(p,a,b,c) (p)->Initialize(a,b,c)
  1746. #define IDirectPlay8Peer_EnumServiceProviders(p,a,b,c,d,e,f) (p)->EnumServiceProviders(a,b,c,d,e,f)
  1747. #define IDirectPlay8Peer_CancelAsyncOperation(p,a,b) (p)->CancelAsyncOperation(a,b)
  1748. #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)
  1749. #define IDirectPlay8Peer_SendTo(p,a,b,c,d,e,f,g) (p)->SendTo(a,b,c,d,e,f,g)
  1750. #define IDirectPlay8Peer_GetSendQueueInfo(p,a,b,c,d) (p)->GetSendQueueInfo(a,b,c,d)
  1751. #define IDirectPlay8Peer_Host(p,a,b,c,d,e,f,g) (p)->Host(a,b,c,d,e,f,g)
  1752. #define IDirectPlay8Peer_GetApplicationDesc(p,a,b,c) (p)->GetApplicationDesc(a,b,c)
  1753. #define IDirectPlay8Peer_SetApplicationDesc(p,a,b) (p)->SetApplicationDesc(a,b)
  1754. #define IDirectPlay8Peer_CreateGroup(p,a,b,c,d,e) (p)->CreateGroup(a,b,c,d,e)
  1755. #define IDirectPlay8Peer_DestroyGroup(p,a,b,c,d) (p)->DestroyGroup(a,b,c,d)
  1756. #define IDirectPlay8Peer_AddPlayerToGroup(p,a,b,c,d,e) (p)->AddPlayerToGroup(a,b,c,d,e)
  1757. #define IDirectPlay8Peer_RemovePlayerFromGroup(p,a,b,c,d,e) (p)->RemovePlayerFromGroup(a,b,c,d,e)
  1758. #define IDirectPlay8Peer_SetGroupInfo(p,a,b,c,d,e) (p)->SetGroupInfo(a,b,c,d,e)
  1759. #define IDirectPlay8Peer_GetGroupInfo(p,a,b,c,d) (p)->GetGroupInfo(a,b,c,d)
  1760. #define IDirectPlay8Peer_EnumPlayersAndGroups(p,a,b,c) (p)->EnumPlayersAndGroups(a,b,c)
  1761. #define IDirectPlay8Peer_EnumGroupMembers(p,a,b,c,d) (p)->EnumGroupMembers(a,b,c,d)
  1762. #define IDirectPlay8Peer_SetPeerInfo(p,a,b,c,d) (p)->SetPeerInfo(a,b,c,d)
  1763. #define IDirectPlay8Peer_GetPeerInfo(p,a,b,c,d) (p)->GetPeerInfo(a,b,c,d)
  1764. #define IDirectPlay8Peer_GetPeerAddress(p,a,b,c) (p)->GetPeerAddress(a,b,c)
  1765. #define IDirectPlay8Peer_GetLocalHostAddresses(p,a,b,c) (p)->GetLocalHostAddresses(a,b,c)
  1766. #define IDirectPlay8Peer_Close(p,a) (p)->Close(a)
  1767. #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)
  1768. #define IDirectPlay8Peer_DestroyPeer(p,a,b,c,d) (p)->DestroyPeer(a,b,c,d)
  1769. #define IDirectPlay8Peer_ReturnBuffer(p,a,b) (p)->ReturnBuffer(a,b)
  1770. #define IDirectPlay8Peer_GetPlayerContext(p,a,b,c) (p)->GetPlayerContext(a,b,c)
  1771. #define IDirectPlay8Peer_GetGroupContext(p,a,b,c) (p)->GetGroupContext(a,b,c)
  1772. #define IDirectPlay8Peer_GetCaps(p,a,b) (p)->GetCaps(a,b)
  1773. #define IDirectPlay8Peer_SetCaps(p,a,b) (p)->SetCaps(a,b)
  1774. #define IDirectPlay8Peer_SetSPCaps(p,a,b,c) (p)->SetSPCaps(a,b,c)
  1775. #define IDirectPlay8Peer_GetSPCaps(p,a,b,c) (p)->GetSPCaps(a,b,c)
  1776. #define IDirectPlay8Peer_GetConnectionInfo(p,a,b,c) (p)->GetConnectionInfo(a,b,c)
  1777. #define IDirectPlay8Peer_RegisterLobby(p,a,b,c) (p)->RegisterLobby(a,b,c)
  1778. #define IDirectPlay8Peer_TerminateSession(p,a,b,c) (p)->TerminateSession(a,b,c)
  1779. //@@BEGIN_MSINTERNAL
  1780. #define IDirectPlay8ThreadPool_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  1781. #define IDirectPlay8ThreadPool_AddRef(p) (p)->AddRef()
  1782. #define IDirectPlay8ThreadPool_Release(p) (p)->Release()
  1783. #define IDirectPlay8ThreadPool_Initialize(p,a,b,c) (p)->Initialize(a,b,c)
  1784. #define IDirectPlay8ThreadPool_Close(p,a) (p)->Close(a)
  1785. #define IDirectPlay8ThreadPool_GetThreadCount(p,a,b,c) (p)->GetThreadCount(a,b,c)
  1786. #define IDirectPlay8ThreadPool_SetThreadCount(p,a,b,c) (p)->SetThreadCount(a,b,c)
  1787. #define IDirectPlay8ThreadPool_DoWork(p,a,b) (p)->DoWork(a,b)
  1788. #if ((defined(DPNBUILD_LIBINTERFACE)) && (defined(DPNBUILD_ONLYONETHREAD)) && (! defined(DPNBUILD_MULTIPLETHREADPOOLS)))
  1789. #define IDirectPlay8ThreadPoolWork_AddRef(p)
  1790. #define IDirectPlay8ThreadPoolWork_Release(p)
  1791. #else // ! DPNBUILD_LIBINTERFACE or ! DPNBUILD_ONLYONETHREAD or DPNBUILD_MULTIPLETHREADPOOLS
  1792. #define IDirectPlay8ThreadPoolWork_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  1793. #define IDirectPlay8ThreadPoolWork_AddRef(p) (p)->AddRef()
  1794. #define IDirectPlay8ThreadPoolWork_Release(p) (p)->Release()
  1795. #endif // ! DPNBUILD_LIBINTERFACE or ! DPNBUILD_ONLYONETHREAD or DPNBUILD_MULTIPLETHREADPOOLS
  1796. #define IDirectPlay8ThreadPoolWork_QueueWorkItem(p,a,b,c,d) (p)->QueueWorkItem(a,b,c,d)
  1797. #define IDirectPlay8ThreadPoolWork_ScheduleTimer(p,a,b,c,d,e,f,g) (p)->ScheduleTimer(a,b,c,d,e,f,g)
  1798. #define IDirectPlay8ThreadPoolWork_StartTrackingFileIo(p,a,b,c) (p)->StartTrackingFileIo(p,a,b,c)
  1799. #define IDirectPlay8ThreadPoolWork_StopTrackingFileIo(p,a,b,c) (p)->StopTrackingFileIo(a,b,c)
  1800. #define IDirectPlay8ThreadPoolWork_CreateOverlapped(p,a,b,c,d,e) (p)->CreateOverlapped(a,b,c,d,e)
  1801. #ifdef DPNBUILD_USEIOCOMPLETIONPORTS
  1802. #define IDirectPlay8ThreadPoolWork_SubmitIoOperation(p,a,b) ((HRESULT) DPN_OK)
  1803. #else // ! DPNBUILD_USEIOCOMPLETIONPORTS
  1804. #define IDirectPlay8ThreadPoolWork_SubmitIoOperation(p,a,b) (p)->SubmitIoOperation(a,b)
  1805. #endif // ! DPNBUILD_USEIOCOMPLETIONPORTS
  1806. #define IDirectPlay8ThreadPoolWork_ReleaseOverlapped(p,a,b) (p)->ReleaseOverlapped(a,b)
  1807. #define IDirectPlay8ThreadPoolWork_CancelTimer(p,a,b,c) (p)->CancelTimer(a,b,c)
  1808. #define IDirectPlay8ThreadPoolWork_ResetCompletingTimer(p,a,b,c,d,e,f) (p)->ResetCompletingTimer(a,b,c,d,e,f)
  1809. #define IDirectPlay8ThreadPoolWork_WaitWhileWorking(p,a,b) (p)->WaitWhileWorking(a,b)
  1810. #define IDirectPlay8ThreadPoolWork_SleepWhileWorking(p,a,b) (p)->SleepWhileWorking(a,b)
  1811. #define IDirectPlay8ThreadPoolWork_RequestTotalThreadCount(p,a,b) (p)->RequestTotalThreadCount(a,b)
  1812. #define IDirectPlay8ThreadPoolWork_GetThreadCount(p,a,b,c) (p)->GetThreadCount(a,b,c)
  1813. #define IDirectPlay8ThreadPoolWork_GetWorkRecursionDepth(p,a,b) (p)->GetWorkRecursionDepth(a,b)
  1814. #define IDirectPlay8ThreadPoolWork_Preallocate(p,a,b,c,d) (p)->Preallocate(a,b,c,d)
  1815. #ifdef DPNBUILD_MANDATORYTHREADS
  1816. #define IDirectPlay8ThreadPoolWork_CreateMandatoryThread(p,a,b,c,d,e,f,g) (p)->CreateMandatoryThread(a,b,c,d,e,f,g)
  1817. #endif // DPNBUILD_MANDATORYTHREADS
  1818. #ifndef DPNBUILD_NOMULTICAST
  1819. #define IDirectPlay8Multicast_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  1820. #define IDirectPlay8Multicast_AddRef(p) (p)->AddRef()
  1821. #define IDirectPlay8Multicast_Release(p) (p)->Release()
  1822. #define IDirectPlay8Multicast_Initialize(p,a,b,c) (p)->Initialize(a,b,c)
  1823. #define IDirectPlay8Multicast_Join(p,a,b,c,d,e,f,g) (p)->Join(a,b,c,d,e,f,g)
  1824. #define IDirectPlay8Multicast_Close(p,a) (p)->Close(a)
  1825. #define IDirectPlay8Multicast_CreateSenderContext(p,a,b,c) (p)->CreateSenderContext(a,b,c)
  1826. #define IDirectPlay8Multicast_DestroySenderContext(p,a,b,c) (p)->DestroySenderContext(a,b,c)
  1827. #define IDirectPlay8Multicast_Send(p,a,b,c,d,e,f) (p)->SendTo(a,b,c,d,e,f)
  1828. #define IDirectPlay8Multicast_GetGroupAddress(p,a,b) (p)->GetGroupAddress(a,b)
  1829. #define IDirectPlay8Multicast_GetSendQueueInfo(p,a,b,c) (p)->GetSendQueueInfo(a,b,c)
  1830. #define IDirectPlay8Multicast_CancelAsyncOperation(p,a,b) (p)->CancelAsyncOperation(a,b)
  1831. #define IDirectPlay8Multicast_ReturnBuffer(p,a,b) (p)->ReturnBuffer(a,b)
  1832. #define IDirectPlay8Multicast_EnumServiceProviders(p,a,b,c,d,e,f) (p)->EnumServiceProviders(a,b,c,d,e,f)
  1833. #define IDirectPlay8Multicast_EnumMulticastScopes(p,a,b,c,d,e,f,g) (p)->EnumMulticastScopes(a,b,c,d,e,f,g)
  1834. #define IDirectPlay8Multicast_GetSPCaps(p,a,b,c) (p)->GetSPCaps(a,b,c)
  1835. #define IDirectPlay8Multicast_SetSPCaps(p,a,b,c) (p)->SetSPCaps(a,b,c)
  1836. #endif // ! DPNBUILD_NOMULTICAST
  1837. //@@END_MSINTERNAL
  1838. #endif
  1839. /****************************************************************************
  1840. *
  1841. * DIRECTPLAY8 ERRORS
  1842. *
  1843. * Errors are represented by negative values and cannot be combined.
  1844. *
  1845. ****************************************************************************/
  1846. #define _DPN_FACILITY_CODE 0x015
  1847. #define _DPNHRESULT_BASE 0x8000
  1848. #define MAKE_DPNHRESULT( code ) MAKE_HRESULT( 1, _DPN_FACILITY_CODE, ( code + _DPNHRESULT_BASE ) )
  1849. #define DPN_OK S_OK
  1850. #define DPNSUCCESS_EQUAL MAKE_HRESULT( 0, _DPN_FACILITY_CODE, ( 0x5 + _DPNHRESULT_BASE ) )
  1851. //@@BEGIN_MSINTERNAL
  1852. #define DPNSUCCESS_NOPLAYERSINGROUP MAKE_HRESULT( 0, _DPN_FACILITY_CODE, ( 0x8 + _DPNHRESULT_BASE ) ) // added for DirectX 9
  1853. //@@END_MSINTERNAL
  1854. #define DPNSUCCESS_NOTEQUAL MAKE_HRESULT( 0, _DPN_FACILITY_CODE, (0x0A + _DPNHRESULT_BASE ) )
  1855. #define DPNSUCCESS_PENDING MAKE_HRESULT( 0, _DPN_FACILITY_CODE, (0x0e + _DPNHRESULT_BASE ) )
  1856. #define DPNERR_ABORTED MAKE_DPNHRESULT( 0x30 )
  1857. #define DPNERR_ADDRESSING MAKE_DPNHRESULT( 0x40 )
  1858. #define DPNERR_ALREADYCLOSING MAKE_DPNHRESULT( 0x50 )
  1859. #define DPNERR_ALREADYCONNECTED MAKE_DPNHRESULT( 0x60 )
  1860. #define DPNERR_ALREADYDISCONNECTING MAKE_DPNHRESULT( 0x70 )
  1861. #define DPNERR_ALREADYINITIALIZED MAKE_DPNHRESULT( 0x80 )
  1862. #define DPNERR_ALREADYREGISTERED MAKE_DPNHRESULT( 0x90 )
  1863. #define DPNERR_BUFFERTOOSMALL MAKE_DPNHRESULT( 0x100 )
  1864. #define DPNERR_CANNOTCANCEL MAKE_DPNHRESULT( 0x110 )
  1865. #define DPNERR_CANTCREATEGROUP MAKE_DPNHRESULT( 0x120 )
  1866. #define DPNERR_CANTCREATEPLAYER MAKE_DPNHRESULT( 0x130 )
  1867. #define DPNERR_CANTLAUNCHAPPLICATION MAKE_DPNHRESULT( 0x140 )
  1868. #define DPNERR_CONNECTING MAKE_DPNHRESULT( 0x150 )
  1869. #define DPNERR_CONNECTIONLOST MAKE_DPNHRESULT( 0x160 )
  1870. #define DPNERR_CONVERSION MAKE_DPNHRESULT( 0x170 )
  1871. #define DPNERR_DATATOOLARGE MAKE_DPNHRESULT( 0x175 )
  1872. #define DPNERR_DOESNOTEXIST MAKE_DPNHRESULT( 0x180 )
  1873. #define DPNERR_DPNSVRNOTAVAILABLE MAKE_DPNHRESULT( 0x185 )
  1874. #define DPNERR_DUPLICATECOMMAND MAKE_DPNHRESULT( 0x190 )
  1875. #define DPNERR_ENDPOINTNOTRECEIVING MAKE_DPNHRESULT( 0x200 )
  1876. #define DPNERR_ENUMQUERYTOOLARGE MAKE_DPNHRESULT( 0x210 )
  1877. #define DPNERR_ENUMRESPONSETOOLARGE MAKE_DPNHRESULT( 0x220 )
  1878. #define DPNERR_EXCEPTION MAKE_DPNHRESULT( 0x230 )
  1879. #define DPNERR_GENERIC E_FAIL
  1880. #define DPNERR_GROUPNOTEMPTY MAKE_DPNHRESULT( 0x240 )
  1881. #define DPNERR_HOSTING MAKE_DPNHRESULT( 0x250 )
  1882. #define DPNERR_HOSTREJECTEDCONNECTION MAKE_DPNHRESULT( 0x260 )
  1883. #define DPNERR_HOSTTERMINATEDSESSION MAKE_DPNHRESULT( 0x270 )
  1884. #define DPNERR_INCOMPLETEADDRESS MAKE_DPNHRESULT( 0x280 )
  1885. #define DPNERR_INVALIDADDRESSFORMAT MAKE_DPNHRESULT( 0x290 )
  1886. #define DPNERR_INVALIDAPPLICATION MAKE_DPNHRESULT( 0x300 )
  1887. #define DPNERR_INVALIDCOMMAND MAKE_DPNHRESULT( 0x310 )
  1888. #define DPNERR_INVALIDDEVICEADDRESS MAKE_DPNHRESULT( 0x320 )
  1889. #define DPNERR_INVALIDENDPOINT MAKE_DPNHRESULT( 0x330 )
  1890. #define DPNERR_INVALIDFLAGS MAKE_DPNHRESULT( 0x340 )
  1891. #define DPNERR_INVALIDGROUP MAKE_DPNHRESULT( 0x350 )
  1892. #define DPNERR_INVALIDHANDLE MAKE_DPNHRESULT( 0x360 )
  1893. #define DPNERR_INVALIDHOSTADDRESS MAKE_DPNHRESULT( 0x370 )
  1894. #define DPNERR_INVALIDINSTANCE MAKE_DPNHRESULT( 0x380 )
  1895. #define DPNERR_INVALIDINTERFACE MAKE_DPNHRESULT( 0x390 )
  1896. #define DPNERR_INVALIDOBJECT MAKE_DPNHRESULT( 0x400 )
  1897. #define DPNERR_INVALIDPARAM E_INVALIDARG
  1898. #define DPNERR_INVALIDPASSWORD MAKE_DPNHRESULT( 0x410 )
  1899. #define DPNERR_INVALIDPLAYER MAKE_DPNHRESULT( 0x420 )
  1900. #define DPNERR_INVALIDPOINTER E_POINTER
  1901. #define DPNERR_INVALIDPRIORITY MAKE_DPNHRESULT( 0x430 )
  1902. #define DPNERR_INVALIDSTRING MAKE_DPNHRESULT( 0x440 )
  1903. #define DPNERR_INVALIDURL MAKE_DPNHRESULT( 0x450 )
  1904. #define DPNERR_INVALIDVERSION MAKE_DPNHRESULT( 0x460 )
  1905. #define DPNERR_NOCAPS MAKE_DPNHRESULT( 0x470 )
  1906. #define DPNERR_NOCONNECTION MAKE_DPNHRESULT( 0x480 )
  1907. #define DPNERR_NOHOSTPLAYER MAKE_DPNHRESULT( 0x490 )
  1908. #define DPNERR_NOINTERFACE E_NOINTERFACE
  1909. #define DPNERR_NOMOREADDRESSCOMPONENTS MAKE_DPNHRESULT( 0x500 )
  1910. #define DPNERR_NORESPONSE MAKE_DPNHRESULT( 0x510 )
  1911. #define DPNERR_NOTALLOWED MAKE_DPNHRESULT( 0x520 )
  1912. #define DPNERR_NOTHOST MAKE_DPNHRESULT( 0x530 )
  1913. #define DPNERR_NOTREADY MAKE_DPNHRESULT( 0x540 )
  1914. #define DPNERR_NOTREGISTERED MAKE_DPNHRESULT( 0x550 )
  1915. #define DPNERR_OUTOFMEMORY E_OUTOFMEMORY
  1916. #define DPNERR_PENDING DPNSUCCESS_PENDING
  1917. #define DPNERR_PLAYERALREADYINGROUP MAKE_DPNHRESULT( 0x560 )
  1918. #define DPNERR_PLAYERLOST MAKE_DPNHRESULT( 0x570 )
  1919. #define DPNERR_PLAYERNOTINGROUP MAKE_DPNHRESULT( 0x580 )
  1920. #define DPNERR_PLAYERNOTREACHABLE MAKE_DPNHRESULT( 0x590 )
  1921. #define DPNERR_SENDTOOLARGE MAKE_DPNHRESULT( 0x600 )
  1922. #define DPNERR_SESSIONFULL MAKE_DPNHRESULT( 0x610 )
  1923. #define DPNERR_TABLEFULL MAKE_DPNHRESULT( 0x620 )
  1924. #define DPNERR_TIMEDOUT MAKE_DPNHRESULT( 0x630 )
  1925. #define DPNERR_UNINITIALIZED MAKE_DPNHRESULT( 0x640 )
  1926. #define DPNERR_UNSUPPORTED E_NOTIMPL
  1927. #define DPNERR_USERCANCEL MAKE_DPNHRESULT( 0x650 )
  1928. #ifdef __cplusplus
  1929. }
  1930. #endif
  1931. #endif