Counter Strike : Global Offensive Source Code
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.

1456 lines
68 KiB

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