Source code of Windows XP (NT5)
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.

1410 lines
69 KiB

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