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

1230 lines
59 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. /****************************************************************************
  31. *
  32. * DirectPlay8 Interface IIDs
  33. *
  34. ****************************************************************************/
  35. typedef REFIID DP8REFIID;
  36. // {5102DACD-241B-11d3-AEA7-006097B01411}
  37. DEFINE_GUID(IID_IDirectPlay8Client,
  38. 0x5102dacd, 0x241b, 0x11d3, 0xae, 0xa7, 0x0, 0x60, 0x97, 0xb0, 0x14, 0x11);
  39. // {5102DACE-241B-11d3-AEA7-006097B01411}
  40. DEFINE_GUID(IID_IDirectPlay8Server,
  41. 0x5102dace, 0x241b, 0x11d3, 0xae, 0xa7, 0x0, 0x60, 0x97, 0xb0, 0x14, 0x11);
  42. // {5102DACF-241B-11d3-AEA7-006097B01411}
  43. DEFINE_GUID(IID_IDirectPlay8Peer,
  44. 0x5102dacf, 0x241b, 0x11d3, 0xae, 0xa7, 0x0, 0x60, 0x97, 0xb0, 0x14, 0x11);
  45. /****************************************************************************
  46. *
  47. * DirectPlay8 Service Provider GUIDs
  48. *
  49. ****************************************************************************/
  50. // {53934290-628D-11D2-AE0F-006097B01411}
  51. DEFINE_GUID(CLSID_DP8SP_IPX,
  52. 0x53934290, 0x628d, 0x11d2, 0xae, 0xf, 0x0, 0x60, 0x97, 0xb0, 0x14, 0x11);
  53. // {6D4A3650-628D-11D2-AE0F-006097B01411}
  54. DEFINE_GUID(CLSID_DP8SP_MODEM,
  55. 0x6d4a3650, 0x628d, 0x11d2, 0xae, 0xf, 0x0, 0x60, 0x97, 0xb0, 0x14, 0x11);
  56. // {743B5D60-628D-11D2-AE0F-006097B01411}
  57. DEFINE_GUID(CLSID_DP8SP_SERIAL,
  58. 0x743b5d60, 0x628d, 0x11d2, 0xae, 0xf, 0x0, 0x60, 0x97, 0xb0, 0x14, 0x11);
  59. // {EBFE7BA0-628D-11D2-AE0F-006097B01411}
  60. DEFINE_GUID(CLSID_DP8SP_TCPIP,
  61. 0xebfe7ba0, 0x628d, 0x11d2, 0xae, 0xf, 0x0, 0x60, 0x97, 0xb0, 0x14, 0x11);
  62. /****************************************************************************
  63. *
  64. * DirectPlay8 Interface Pointer definitions
  65. *
  66. ****************************************************************************/
  67. typedef struct IDirectPlay8Client *PDIRECTPLAY8CLIENT;
  68. typedef struct IDirectPlay8Server *PDIRECTPLAY8SERVER;
  69. typedef struct IDirectPlay8Peer *PDIRECTPLAY8PEER;
  70. /****************************************************************************
  71. *
  72. * DirectPlay8 Forward Declarations For External Types
  73. *
  74. ****************************************************************************/
  75. typedef struct IDirectPlay8LobbiedApplication *PDNLOBBIEDAPPLICATION;
  76. typedef struct IDirectPlay8Address IDirectPlay8Address;
  77. /****************************************************************************
  78. *
  79. * DirectPlay8 Callback Functions
  80. *
  81. ****************************************************************************/
  82. //
  83. // Callback Function Type Definition
  84. //
  85. typedef HRESULT (WINAPI *PFNDPNMESSAGEHANDLER)(PVOID,DWORD,PVOID);
  86. /****************************************************************************
  87. *
  88. * DirectPlay8 Datatypes (Non-Structure / Non-Message)
  89. *
  90. ****************************************************************************/
  91. //
  92. // Player IDs. Used to uniquely identify a player in a session
  93. //
  94. typedef DWORD DPNID, *PDPNID;
  95. //
  96. // Used as identifiers for operations
  97. //
  98. typedef DWORD DPNHANDLE, *PDPNHANDLE;
  99. /****************************************************************************
  100. *
  101. * DirectPlay8 Message Identifiers
  102. *
  103. ****************************************************************************/
  104. #define DPN_MSGID_OFFSET 0xFFFF0000
  105. #define DPN_MSGID_ADD_PLAYER_TO_GROUP ( DPN_MSGID_OFFSET | 0x0001 )
  106. #define DPN_MSGID_APPLICATION_DESC ( DPN_MSGID_OFFSET | 0x0002 )
  107. #define DPN_MSGID_ASYNC_OP_COMPLETE ( DPN_MSGID_OFFSET | 0x0003 )
  108. #define DPN_MSGID_CLIENT_INFO ( DPN_MSGID_OFFSET | 0x0004 )
  109. #define DPN_MSGID_CONNECT_COMPLETE ( DPN_MSGID_OFFSET | 0x0005 )
  110. #define DPN_MSGID_CREATE_GROUP ( DPN_MSGID_OFFSET | 0x0006 )
  111. #define DPN_MSGID_CREATE_PLAYER ( DPN_MSGID_OFFSET | 0x0007 )
  112. #define DPN_MSGID_DESTROY_GROUP ( DPN_MSGID_OFFSET | 0x0008 )
  113. #define DPN_MSGID_DESTROY_PLAYER ( DPN_MSGID_OFFSET | 0x0009 )
  114. #define DPN_MSGID_ENUM_HOSTS_QUERY ( DPN_MSGID_OFFSET | 0x000a )
  115. #define DPN_MSGID_ENUM_HOSTS_RESPONSE ( DPN_MSGID_OFFSET | 0x000b )
  116. #define DPN_MSGID_GROUP_INFO ( DPN_MSGID_OFFSET | 0x000c )
  117. #define DPN_MSGID_HOST_MIGRATE ( DPN_MSGID_OFFSET | 0x000d )
  118. #define DPN_MSGID_INDICATE_CONNECT ( DPN_MSGID_OFFSET | 0x000e )
  119. #define DPN_MSGID_INDICATED_CONNECT_ABORTED ( DPN_MSGID_OFFSET | 0x000f )
  120. #define DPN_MSGID_PEER_INFO ( DPN_MSGID_OFFSET | 0x0010 )
  121. #define DPN_MSGID_RECEIVE ( DPN_MSGID_OFFSET | 0x0011 )
  122. #define DPN_MSGID_REMOVE_PLAYER_FROM_GROUP ( DPN_MSGID_OFFSET | 0x0012 )
  123. #define DPN_MSGID_RETURN_BUFFER ( DPN_MSGID_OFFSET | 0x0013 )
  124. #define DPN_MSGID_SEND_COMPLETE ( DPN_MSGID_OFFSET | 0x0014 )
  125. #define DPN_MSGID_SERVER_INFO ( DPN_MSGID_OFFSET | 0x0015 )
  126. #define DPN_MSGID_TERMINATE_SESSION ( DPN_MSGID_OFFSET | 0x0016 )
  127. /****************************************************************************
  128. *
  129. * DirectPlay8 Constants
  130. *
  131. ****************************************************************************/
  132. #define DPNID_ALL_PLAYERS_GROUP 0
  133. //
  134. // DESTROY_GROUP reasons
  135. //
  136. #define DPNDESTROYGROUPREASON_NORMAL 0x0001
  137. #define DPNDESTROYGROUPREASON_AUTODESTRUCTED 0x0002
  138. #define DPNDESTROYGROUPREASON_SESSIONTERMINATED 0x0003
  139. //
  140. // DESTROY_PLAYER reasons
  141. //
  142. #define DPNDESTROYPLAYERREASON_NORMAL 0x0001
  143. #define DPNDESTROYPLAYERREASON_CONNECTIONLOST 0x0002
  144. #define DPNDESTROYPLAYERREASON_SESSIONTERMINATED 0x0003
  145. #define DPNDESTROYPLAYERREASON_HOSTDESTROYEDPLAYER 0x0004
  146. #define DPN_MAX_APPDESC_RESERVEDDATA_SIZE 64
  147. /****************************************************************************
  148. *
  149. * DirectPlay8 Flags
  150. *
  151. ****************************************************************************/
  152. //
  153. // Asynchronous operation flags (for Async Ops)
  154. //
  155. #define DPNOP_SYNC 0x80000000
  156. //
  157. // Add player to group flags (for AddPlayerToGroup)
  158. //
  159. #define DPNADDPLAYERTOGROUP_SYNC DPNOP_SYNC
  160. //
  161. // Cancel flags
  162. //
  163. #define DPNCANCEL_CONNECT 0x00000001
  164. #define DPNCANCEL_ENUM 0x00000002
  165. #define DPNCANCEL_SEND 0x00000004
  166. #define DPNCANCEL_ALL_OPERATIONS 0x00008000
  167. //
  168. // Connect flags (for Connect)
  169. //
  170. #define DPNCONNECT_SYNC DPNOP_SYNC
  171. #define DPNCONNECT_OKTOQUERYFORADDRESSING 0x0001
  172. //
  173. // Create group flags (for CreateGroup)
  174. //
  175. #define DPNCREATEGROUP_SYNC DPNOP_SYNC
  176. //
  177. // Destroy group flags (for DestroyGroup)
  178. //
  179. #define DPNDESTROYGROUP_SYNC DPNOP_SYNC
  180. //
  181. // Enumerate clients and groups flags (for EnumPlayersAndGroups)
  182. //
  183. #define DPNENUM_PLAYERS 0x0001
  184. #define DPNENUM_GROUPS 0x0010
  185. //
  186. // Enum hosts flags (for EnumHosts)
  187. //
  188. #define DPNENUMHOSTS_SYNC DPNOP_SYNC
  189. #define DPNENUMHOSTS_OKTOQUERYFORADDRESSING 0x0001
  190. #define DPNENUMHOSTS_NOBROADCASTFALLBACK 0x0002
  191. //
  192. // Enum service provider flags (for EnumSP)
  193. //
  194. #define DPNENUMSERVICEPROVIDERS_ALL 0x0001
  195. //
  196. // Get send queue info flags (for GetSendQueueInfo)
  197. //
  198. #define DPNGETSENDQUEUEINFO_PRIORITY_NORMAL 0x0001
  199. #define DPNGETSENDQUEUEINFO_PRIORITY_HIGH 0x0002
  200. #define DPNGETSENDQUEUEINFO_PRIORITY_LOW 0x0004
  201. //
  202. // Group information flags (for Group Info)
  203. //
  204. #define DPNGROUP_AUTODESTRUCT 0x0001
  205. //
  206. // Host flags (for Host)
  207. //
  208. #define DPNHOST_OKTOQUERYFORADDRESSING 0x0001
  209. //
  210. // Set info
  211. //
  212. #define DPNINFO_NAME 0x0001
  213. #define DPNINFO_DATA 0x0002
  214. //
  215. // Initialize flags (for Initialize)
  216. //
  217. #define DPNINITIALIZE_DISABLEPARAMVAL 0x0001
  218. //
  219. // Register Lobby flags
  220. //
  221. #define DPNLOBBY_REGISTER 0x0001
  222. #define DPNLOBBY_UNREGISTER 0x0002
  223. //
  224. // Player information flags (for Player Info / Player Messages)
  225. //
  226. #define DPNPLAYER_LOCAL 0x0002
  227. #define DPNPLAYER_HOST 0x0004
  228. //
  229. // Remove player from group flags (for RemovePlayerFromGroup)
  230. //
  231. #define DPNREMOVEPLAYERFROMGROUP_SYNC DPNOP_SYNC
  232. //
  233. // Send flags (for Send/SendTo)
  234. //
  235. #define DPNSEND_SYNC DPNOP_SYNC
  236. #define DPNSEND_NOCOPY 0x0001
  237. #define DPNSEND_NOCOMPLETE 0x0002
  238. #define DPNSEND_COMPLETEONPROCESS 0x0004
  239. #define DPNSEND_GUARANTEED 0x0008
  240. #define DPNSEND_NONSEQUENTIAL 0x0010
  241. #define DPNSEND_NOLOOPBACK 0x0020
  242. #define DPNSEND_PRIORITY_LOW 0x0040
  243. #define DPNSEND_PRIORITY_HIGH 0x0080
  244. //
  245. // Session Flags (for DPN_APPLICATION_DESC)
  246. //
  247. #define DPNSESSION_CLIENT_SERVER 0x0001
  248. #define DPNSESSION_MIGRATE_HOST 0x0004
  249. #define DPNSESSION_NODPNSVR 0x0040
  250. #define DPNSESSION_REQUIREPASSWORD 0x0080
  251. //
  252. // Set client info flags (for SetClientInfo)
  253. //
  254. #define DPNSETCLIENTINFO_SYNC DPNOP_SYNC
  255. //
  256. // Set group info flags (for SetGroupInfo)
  257. //
  258. #define DPNSETGROUPINFO_SYNC DPNOP_SYNC
  259. //
  260. // Set peer info flags (for SetPeerInfo)
  261. //
  262. #define DPNSETPEERINFO_SYNC DPNOP_SYNC
  263. //
  264. // Set server info flags (for SetServerInfo)
  265. //
  266. #define DPNSETSERVERINFO_SYNC DPNOP_SYNC
  267. //
  268. // SP capabilities flags
  269. //
  270. #define DPNSPCAPS_SUPPORTSDPNSRV 0x0001
  271. #define DPNSPCAPS_SUPPORTSBROADCAST 0x0002
  272. #define DPNSPCAPS_SUPPORTSALLADAPTERS 0x0004
  273. /****************************************************************************
  274. *
  275. * DirectPlay8 Structures (Non-Message)
  276. *
  277. ****************************************************************************/
  278. //
  279. // Application description
  280. //
  281. typedef struct _DPN_APPLICATION_DESC
  282. {
  283. DWORD dwSize; // Size of this structure
  284. DWORD dwFlags; // Flags (DPNSESSION_...)
  285. GUID guidInstance; // Instance GUID
  286. GUID guidApplication; // Application GUID
  287. DWORD dwMaxPlayers; // Maximum # of players allowed (0=no limit)
  288. DWORD dwCurrentPlayers; // Current # of players allowed
  289. WCHAR *pwszSessionName; // Name of the session
  290. WCHAR *pwszPassword; // Password for the session
  291. PVOID pvReservedData;
  292. DWORD dwReservedDataSize;
  293. PVOID pvApplicationReservedData;
  294. DWORD dwApplicationReservedDataSize;
  295. } DPN_APPLICATION_DESC, *PDPN_APPLICATION_DESC;
  296. //
  297. // Generic Buffer Description
  298. //
  299. typedef struct _BUFFERDESC
  300. {
  301. DWORD dwBufferSize;
  302. BYTE * pBufferData;
  303. } BUFFERDESC, DPN_BUFFER_DESC, *PDPN_BUFFER_DESC;
  304. typedef BUFFERDESC FAR * PBUFFERDESC;
  305. //
  306. // DirectPlay8 capabilities
  307. //
  308. typedef struct _DPN_CAPS
  309. {
  310. DWORD dwSize; // Size of this structure
  311. DWORD dwFlags; // Flags
  312. DWORD dwConnectTimeout; // ms before a connect request times out
  313. DWORD dwConnectRetries; // # of times to attempt the connection
  314. DWORD dwTimeoutUntilKeepAlive; // ms of inactivity before a keep alive is sent
  315. } DPN_CAPS, *PDPN_CAPS;
  316. //
  317. // Connection Statistics information
  318. //
  319. typedef struct _DPN_CONNECTION_INFO
  320. {
  321. DWORD dwSize;
  322. DWORD dwRoundTripLatencyMS;
  323. DWORD dwThroughputBPS;
  324. DWORD dwPeakThroughputBPS;
  325. DWORD dwBytesSentGuaranteed;
  326. DWORD dwPacketsSentGuaranteed;
  327. DWORD dwBytesSentNonGuaranteed;
  328. DWORD dwPacketsSentNonGuaranteed;
  329. DWORD dwBytesRetried; // Guaranteed only
  330. DWORD dwPacketsRetried; // Guaranteed only
  331. DWORD dwBytesDropped; // Non Guaranteed only
  332. DWORD dwPacketsDropped; // Non Guaranteed only
  333. DWORD dwMessagesTransmittedHighPriority;
  334. DWORD dwMessagesTimedOutHighPriority;
  335. DWORD dwMessagesTransmittedNormalPriority;
  336. DWORD dwMessagesTimedOutNormalPriority;
  337. DWORD dwMessagesTransmittedLowPriority;
  338. DWORD dwMessagesTimedOutLowPriority;
  339. DWORD dwBytesReceivedGuaranteed;
  340. DWORD dwPacketsReceivedGuaranteed;
  341. DWORD dwBytesReceivedNonGuaranteed;
  342. DWORD dwPacketsReceivedNonGuaranteed;
  343. DWORD dwMessagesReceived;
  344. } DPN_CONNECTION_INFO, *PDPN_CONNECTION_INFO;
  345. //
  346. // Group information strucutre
  347. //
  348. typedef struct _DPN_GROUP_INFO
  349. {
  350. DWORD dwSize; // size of this structure
  351. DWORD dwInfoFlags; // information contained
  352. PWSTR pwszName; // Unicode Name
  353. PVOID pvData; // data block
  354. DWORD dwDataSize; // size in BYTES of data block
  355. DWORD dwGroupFlags; // group flags (DPNGROUP_...)
  356. } DPN_GROUP_INFO, *PDPN_GROUP_INFO;
  357. //
  358. // Player information structure
  359. //
  360. typedef struct _DPN_PLAYER_INFO
  361. {
  362. DWORD dwSize; // size of this structure
  363. DWORD dwInfoFlags; // information contained
  364. PWSTR pwszName; // Unicode Name
  365. PVOID pvData; // data block
  366. DWORD dwDataSize; // size in BYTES of data block
  367. DWORD dwPlayerFlags; // player flags (DPNPLAYER_...)
  368. } DPN_PLAYER_INFO, *PDPN_PLAYER_INFO;
  369. typedef struct _DPN_SECURITY_CREDENTIALS DPN_SECURITY_CREDENTIALS, *PDPN_SECURITY_CREDENTIALS;
  370. typedef struct _DPN_SECURITY_DESC DPN_SECURITY_DESC, *PDPN_SECURITY_DESC;
  371. //
  372. // Service provider & adapter enumeration structure
  373. //
  374. typedef struct _DPN_SERVICE_PROVIDER_INFO
  375. {
  376. DWORD dwFlags;
  377. GUID guid; // SP Guid
  378. WCHAR *pwszName; // Friendly Name
  379. PVOID pvReserved;
  380. DWORD dwReserved;
  381. } DPN_SERVICE_PROVIDER_INFO, *PDPN_SERVICE_PROVIDER_INFO;
  382. //
  383. // Service provider caps structure
  384. //
  385. typedef struct _DPN_SP_CAPS
  386. {
  387. DWORD dwSize; // Size of this structure
  388. DWORD dwFlags; // Flags (DPNSPCAPS_...)
  389. DWORD dwNumThreads; // # of worker threads to use
  390. DWORD dwDefaultEnumCount; // default # of enum requests
  391. DWORD dwDefaultEnumRetryInterval; // default ms between enum requests
  392. DWORD dwDefaultEnumTimeout; // default enum timeout
  393. DWORD dwMaxEnumPayloadSize; // maximum size in bytes for enum payload data
  394. DWORD dwBuffersPerThread; // number of receive buffers per thread
  395. DWORD dwSystemBufferSize; // amount of buffering to do in addition to posted receive buffers
  396. } DPN_SP_CAPS, *PDPN_SP_CAPS;
  397. /****************************************************************************
  398. *
  399. * IDirectPlay8 message handler call back structures
  400. *
  401. ****************************************************************************/
  402. //
  403. // Add player to group structure for message handler
  404. // (DPN_MSGID_ADD_PLAYER_TO_GROUP)
  405. //
  406. typedef struct _DPNMSG_ADD_PLAYER_TO_GROUP
  407. {
  408. DWORD dwSize; // Size of this structure
  409. DPNID dpnidGroup; // DPNID of group
  410. PVOID pvGroupContext; // Group context value
  411. DPNID dpnidPlayer; // DPNID of added player
  412. PVOID pvPlayerContext; // Player context value
  413. } DPNMSG_ADD_PLAYER_TO_GROUP, *PDPNMSG_ADD_PLAYER_TO_GROUP;
  414. //
  415. // Async operation completion structure for message handler
  416. // (DPN_MSGID_ASYNC_OP_COMPLETE)
  417. //
  418. typedef struct _DPNMSG_ASYNC_OP_COMPLETE
  419. {
  420. DWORD dwSize; // Size of this structure
  421. DPNHANDLE hAsyncOp; // DirectPlay8 async operation handle
  422. PVOID pvUserContext; // User context supplied
  423. HRESULT hResultCode; // HRESULT of operation
  424. } DPNMSG_ASYNC_OP_COMPLETE, *PDPNMSG_ASYNC_OP_COMPLETE;
  425. //
  426. // Client info structure for message handler
  427. // (DPN_MSGID_CLIENT_INFO)
  428. //
  429. typedef struct _DPNMSG_CLIENT_INFO
  430. {
  431. DWORD dwSize; // Size of this structure
  432. DPNID dpnidClient; // DPNID of client
  433. PVOID pvPlayerContext; // Player context value
  434. } DPNMSG_CLIENT_INFO, *PDPNMSG_CLIENT_INFO;
  435. //
  436. // Connect complete structure for message handler
  437. // (DPN_MSGID_CONNECT_COMPLETE)
  438. //
  439. typedef struct _DPNMSG_CONNECT_COMPLETE
  440. {
  441. DWORD dwSize; // Size of this structure
  442. DPNHANDLE hAsyncOp; // DirectPlay8 Async operation handle
  443. PVOID pvUserContext; // User context supplied at Connect
  444. HRESULT hResultCode; // HRESULT of connection attempt
  445. PVOID pvApplicationReplyData; // Connection reply data from Host/Server
  446. DWORD dwApplicationReplyDataSize; // Size (in bytes) of pvApplicationReplyData
  447. } DPNMSG_CONNECT_COMPLETE, *PDPNMSG_CONNECT_COMPLETE;
  448. //
  449. // Create group structure for message handler
  450. // (DPN_MSGID_CREATE_GROUP)
  451. //
  452. typedef struct _DPNMSG_CREATE_GROUP
  453. {
  454. DWORD dwSize; // Size of this structure
  455. DPNID dpnidGroup; // DPNID of new group
  456. DPNID dpnidOwner; // Owner of newgroup
  457. PVOID pvGroupContext; // Group context value
  458. } DPNMSG_CREATE_GROUP, *PDPNMSG_CREATE_GROUP;
  459. //
  460. // Create player structure for message handler
  461. // (DPN_MSGID_CREATE_PLAYER)
  462. //
  463. typedef struct _DPNMSG_CREATE_PLAYER
  464. {
  465. DWORD dwSize; // Size of this structure
  466. DPNID dpnidPlayer; // DPNID of new player
  467. PVOID pvPlayerContext; // Player context value
  468. } DPNMSG_CREATE_PLAYER, *PDPNMSG_CREATE_PLAYER;
  469. //
  470. // Destroy group structure for message handler
  471. // (DPN_MSGID_DESTROY_GROUP)
  472. //
  473. typedef struct _DPNMSG_DESTROY_GROUP
  474. {
  475. DWORD dwSize; // Size of this structure
  476. DPNID dpnidGroup; // DPNID of destroyed group
  477. PVOID pvGroupContext; // Group context value
  478. DWORD dwReason; // Information only
  479. } DPNMSG_DESTROY_GROUP, *PDPNMSG_DESTROY_GROUP;
  480. //
  481. // Destroy player structure for message handler
  482. // (DPN_MSGID_DESTROY_PLAYER)
  483. //
  484. typedef struct _DPNMSG_DESTROY_PLAYER
  485. {
  486. DWORD dwSize; // Size of this structure
  487. DPNID dpnidPlayer; // DPNID of leaving player
  488. PVOID pvPlayerContext; // Player context value
  489. DWORD dwReason; // Information only
  490. } DPNMSG_DESTROY_PLAYER, *PDPNMSG_DESTROY_PLAYER;
  491. //
  492. // Enumeration request received structure for message handler
  493. // (DPN_MSGID_ENUM_HOSTS_QUERY)
  494. //
  495. typedef struct _DPNMSG_ENUM_HOSTS_QUERY
  496. {
  497. DWORD dwSize; // Size of this structure.
  498. IDirectPlay8Address *pAddressSender; // Address of client who sent the request
  499. IDirectPlay8Address *pAddressDevice; // Address of device request was received on
  500. PVOID pvReceivedData; // Request data (set on client)
  501. DWORD dwReceivedDataSize; // Request data size (set on client)
  502. DWORD dwMaxResponseDataSize; // Max allowable size of enum response
  503. PVOID pvResponseData; // Optional query repsonse (user set)
  504. DWORD dwResponseDataSize; // Optional query response size (user set)
  505. PVOID pvResponseContext; // Optional query response context (user set)
  506. } DPNMSG_ENUM_HOSTS_QUERY, *PDPNMSG_ENUM_HOSTS_QUERY;
  507. //
  508. // Enumeration response received structure for message handler
  509. // (DPN_MSGID_ENUM_HOSTS_RESPONSE)
  510. //
  511. typedef struct _DPNMSG_ENUM_HOSTS_RESPONSE
  512. {
  513. DWORD dwSize; // Size of this structure
  514. IDirectPlay8Address *pAddressSender; // Address of host who responded
  515. IDirectPlay8Address *pAddressDevice; // Device response was received on
  516. const DPN_APPLICATION_DESC *pApplicationDescription; // Application description for the session
  517. PVOID pvResponseData; // Optional response data (set on host)
  518. DWORD dwResponseDataSize; // Optional response data size (set on host)
  519. PVOID pvUserContext; // Context value supplied for enumeration
  520. DWORD dwRoundTripLatencyMS; // Round trip latency in MS
  521. } DPNMSG_ENUM_HOSTS_RESPONSE, *PDPNMSG_ENUM_HOSTS_RESPONSE;
  522. //
  523. // Group info structure for message handler
  524. // (DPN_MSGID_GROUP_INFO)
  525. //
  526. typedef struct _DPNMSG_GROUP_INFO
  527. {
  528. DWORD dwSize; // Size of this structure
  529. DPNID dpnidGroup; // DPNID of group
  530. PVOID pvGroupContext; // Group context value
  531. } DPNMSG_GROUP_INFO, *PDPNMSG_GROUP_INFO;
  532. //
  533. // Migrate host structure for message handler
  534. // (DPN_MSGID_HOST_MIGRATE)
  535. //
  536. typedef struct _DPNMSG_HOST_MIGRATE
  537. {
  538. DWORD dwSize; // Size of this structure
  539. DPNID dpnidNewHost; // DPNID of new Host player
  540. PVOID pvPlayerContext; // Player context value
  541. } DPNMSG_HOST_MIGRATE, *PDPNMSG_HOST_MIGRATE;
  542. //
  543. // Indicate connect structure for message handler
  544. // (DPN_MSGID_INDICATE_CONNECT)
  545. //
  546. typedef struct _DPNMSG_INDICATE_CONNECT
  547. {
  548. DWORD dwSize; // Size of this structure
  549. PVOID pvUserConnectData; // Connecting player data
  550. DWORD dwUserConnectDataSize; // Size (in bytes) of pvUserConnectData
  551. PVOID pvReplyData; // Connection reply data
  552. DWORD dwReplyDataSize; // Size (in bytes) of pvReplyData
  553. PVOID pvReplyContext; // Buffer context for pvReplyData
  554. PVOID pvPlayerContext; // Player context preset
  555. IDirectPlay8Address *pAddressPlayer; // Address of connecting player
  556. IDirectPlay8Address *pAddressDevice; // Address of device receiving connect attempt
  557. } DPNMSG_INDICATE_CONNECT, *PDPNMSG_INDICATE_CONNECT;
  558. //
  559. // Indicated connect aborted structure for message handler
  560. // (DPN_MSGID_INDICATED_CONNECT_ABORTED)
  561. //
  562. typedef struct _DPNMSG_INDICATED_CONNECT_ABORTED
  563. {
  564. DWORD dwSize; // Size of this structure
  565. PVOID pvPlayerContext; // Player context preset from DPNMSG_INDICATE_CONNECT
  566. } DPNMSG_INDICATED_CONNECT_ABORTED, *PDPNMSG_INDICATED_CONNECT_ABORTED;
  567. //
  568. // Peer info structure for message handler
  569. // (DPN_MSGID_PEER_INFO)
  570. //
  571. typedef struct _DPNMSG_PEER_INFO
  572. {
  573. DWORD dwSize; // Size of this structure
  574. DPNID dpnidPeer; // DPNID of peer
  575. PVOID pvPlayerContext; // Player context value
  576. } DPNMSG_PEER_INFO, *PDPNMSG_PEER_INFO;
  577. //
  578. // Receive structure for message handler
  579. // (DPN_MSGID_RECEIVE)
  580. //
  581. typedef struct _DPNMSG_RECEIVE
  582. {
  583. DWORD dwSize; // Size of this structure
  584. DPNID dpnidSender; // DPNID of sending player
  585. PVOID pvPlayerContext; // Player context value of sending player
  586. PBYTE pReceiveData; // Received data
  587. DWORD dwReceiveDataSize; // Size (in bytes) of pReceiveData
  588. DPNHANDLE hBufferHandle; // Buffer handle for pReceiveData
  589. } DPNMSG_RECEIVE, *PDPNMSG_RECEIVE;
  590. //
  591. // Remove player from group structure for message handler
  592. // (DPN_MSGID_REMOVE_PLAYER_FROM_GROUP)
  593. //
  594. typedef struct _DPNMSG_REMOVE_PLAYER_FROM_GROUP
  595. {
  596. DWORD dwSize; // Size of this structure
  597. DPNID dpnidGroup; // DPNID of group
  598. PVOID pvGroupContext; // Group context value
  599. DPNID dpnidPlayer; // DPNID of deleted player
  600. PVOID pvPlayerContext; // Player context value
  601. } DPNMSG_REMOVE_PLAYER_FROM_GROUP, *PDPNMSG_REMOVE_PLAYER_FROM_GROUP;
  602. //
  603. // Returned buffer structure for message handler
  604. // (DPN_MSGID_RETURN_BUFFER)
  605. //
  606. typedef struct _DPNMSG_RETURN_BUFFER
  607. {
  608. DWORD dwSize; // Size of this structure
  609. HRESULT hResultCode; // Return value of operation
  610. PVOID pvBuffer; // Buffer being returned
  611. PVOID pvUserContext; // Context associated with buffer
  612. } DPNMSG_RETURN_BUFFER, *PDPNMSG_RETURN_BUFFER;
  613. //
  614. // Send complete structure for message handler
  615. // (DPN_MSGID_SEND_COMPLETE)
  616. //
  617. typedef struct _DPNMSG_SEND_COMPLETE
  618. {
  619. DWORD dwSize; // Size of this structure
  620. DPNHANDLE hAsyncOp; // DirectPlay8 Async operation handle
  621. PVOID pvUserContext; // User context supplied at Send/SendTo
  622. HRESULT hResultCode; // HRESULT of send
  623. DWORD dwSendTime; // Send time in ms
  624. } DPNMSG_SEND_COMPLETE, *PDPNMSG_SEND_COMPLETE;
  625. //
  626. // Server info structure for message handler
  627. // (DPN_MSGID_SERVER_INFO)
  628. //
  629. typedef struct _DPNMSG_SERVER_INFO
  630. {
  631. DWORD dwSize; // Size of this structure
  632. DPNID dpnidServer; // DPNID of server
  633. PVOID pvPlayerContext; // Player context value
  634. } DPNMSG_SERVER_INFO, *PDPNMSG_SERVER_INFO;
  635. //
  636. // Terminated session structure for message handler
  637. // (DPN_MSGID_TERMINATE_SESSION)
  638. //
  639. typedef struct _DPNMSG_TERMINATE_SESSION
  640. {
  641. DWORD dwSize; // Size of this structure
  642. HRESULT hResultCode; // Reason
  643. PVOID pvTerminateData; // Data passed from Host/Server
  644. DWORD dwTerminateDataSize;// Size (in bytes) of pvTerminateData
  645. } DPNMSG_TERMINATE_SESSION, *PDPNMSG_TERMINATE_SESSION;
  646. /****************************************************************************
  647. *
  648. * DirectPlay8 Functions
  649. *
  650. ****************************************************************************/
  651. /*
  652. * This function is no longer supported. It is recommended that CoCreateInstance be used to create
  653. * DirectPlay8 objects.
  654. *
  655. * extern HRESULT WINAPI DirectPlay8Create( const CLSID * pcIID, void **ppvInterface, IUnknown *pUnknown );
  656. *
  657. */
  658. /****************************************************************************
  659. *
  660. * DirectPlay8 Application Interfaces
  661. *
  662. ****************************************************************************/
  663. //
  664. // COM definition for DirectPlay8 Client interface
  665. //
  666. #undef INTERFACE // External COM Implementation
  667. #define INTERFACE IDirectPlay8Client
  668. DECLARE_INTERFACE_(IDirectPlay8Client,IUnknown)
  669. {
  670. /*** IUnknown methods ***/
  671. STDMETHOD(QueryInterface) (THIS_ DP8REFIID riid, LPVOID *ppvObj) PURE;
  672. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  673. STDMETHOD_(ULONG,Release) (THIS) PURE;
  674. /*** IDirectPlay8Client methods ***/
  675. STDMETHOD(Initialize) (THIS_ PVOID const pvUserContext, const PFNDPNMESSAGEHANDLER pfn, const DWORD dwFlags) PURE;
  676. 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;
  677. 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;
  678. STDMETHOD(CancelAsyncOperation) (THIS_ const DPNHANDLE hAsyncHandle, const DWORD dwFlags) PURE;
  679. 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;
  680. 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;
  681. STDMETHOD(GetSendQueueInfo) (THIS_ DWORD *const pdwNumMsgs, DWORD *const pdwNumBytes, const DWORD dwFlags) PURE;
  682. STDMETHOD(GetApplicationDesc) (THIS_ DPN_APPLICATION_DESC *const pAppDescBuffer, DWORD *const pcbDataSize, const DWORD dwFlags) PURE;
  683. STDMETHOD(SetClientInfo) (THIS_ const DPN_PLAYER_INFO *const pdpnPlayerInfo,PVOID const pvAsyncContext,DPNHANDLE *const phAsyncHandle, const DWORD dwFlags) PURE;
  684. STDMETHOD(GetServerInfo) (THIS_ DPN_PLAYER_INFO *const pdpnPlayerInfo,DWORD *const pdwSize,const DWORD dwFlags) PURE;
  685. STDMETHOD(GetServerAddress) (THIS_ IDirectPlay8Address **const pAddress,const DWORD dwFlags) PURE;
  686. STDMETHOD(Close) (THIS_ const DWORD dwFlags) PURE;
  687. STDMETHOD(ReturnBuffer) (THIS_ const DPNHANDLE hBufferHandle,const DWORD dwFlags) PURE;
  688. STDMETHOD(GetCaps) (THIS_ DPN_CAPS *const pdpCaps,const DWORD dwFlags) PURE;
  689. STDMETHOD(SetCaps) (THIS_ const DPN_CAPS *const pdpCaps, const DWORD dwFlags) PURE;
  690. STDMETHOD(SetSPCaps) (THIS_ const GUID * const pguidSP, const DPN_SP_CAPS *const pdpspCaps, const DWORD dwFlags ) PURE;
  691. STDMETHOD(GetSPCaps) (THIS_ const GUID * const pguidSP,DPN_SP_CAPS *const pdpspCaps,const DWORD dwFlags) PURE;
  692. STDMETHOD(GetConnectionInfo) (THIS_ DPN_CONNECTION_INFO *const pdpConnectionInfo,const DWORD dwFlags) PURE;
  693. STDMETHOD(RegisterLobby) (THIS_ const DPNHANDLE dpnHandle, struct IDirectPlay8LobbiedApplication *const pIDP8LobbiedApplication,const DWORD dwFlags) PURE;
  694. };
  695. //
  696. // COM definition for DirectPlay8 Server interface
  697. //
  698. #undef INTERFACE // External COM Implementation
  699. #define INTERFACE IDirectPlay8Server
  700. DECLARE_INTERFACE_(IDirectPlay8Server,IUnknown)
  701. {
  702. /*** IUnknown methods ***/
  703. STDMETHOD(QueryInterface) (THIS_ DP8REFIID riid, LPVOID *ppvObj) PURE;
  704. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  705. STDMETHOD_(ULONG,Release) (THIS) PURE;
  706. /*** IDirectPlay8Server methods ***/
  707. STDMETHOD(Initialize) (THIS_ PVOID const pvUserContext, const PFNDPNMESSAGEHANDLER pfn, const DWORD dwFlags) PURE;
  708. 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;
  709. STDMETHOD(CancelAsyncOperation) (THIS_ const DPNHANDLE hAsyncHandle,const DWORD dwFlags) PURE;
  710. STDMETHOD(GetSendQueueInfo) (THIS_ const DPNID dpnid,DWORD *const pdwNumMsgs, DWORD *const pdwNumBytes, const DWORD dwFlags) PURE;
  711. STDMETHOD(GetApplicationDesc) (THIS_ DPN_APPLICATION_DESC *const pAppDescBuffer, DWORD *const pcbDataSize, const DWORD dwFlags) PURE;
  712. STDMETHOD(SetServerInfo) (THIS_ const DPN_PLAYER_INFO *const pdpnPlayerInfo,PVOID const pvAsyncContext, DPNHANDLE *const phAsyncHandle, const DWORD dwFlags) PURE;
  713. STDMETHOD(GetClientInfo) (THIS_ const DPNID dpnid,DPN_PLAYER_INFO *const pdpnPlayerInfo,DWORD *const pdwSize,const DWORD dwFlags) PURE;
  714. STDMETHOD(GetClientAddress) (THIS_ const DPNID dpnid,IDirectPlay8Address **const pAddress,const DWORD dwFlags) PURE;
  715. STDMETHOD(GetLocalHostAddresses) (THIS_ IDirectPlay8Address **const prgpAddress,DWORD *const pcAddress,const DWORD dwFlags) PURE;
  716. STDMETHOD(SetApplicationDesc) (THIS_ const DPN_APPLICATION_DESC *const pad, const DWORD dwFlags) PURE;
  717. 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;
  718. 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;
  719. STDMETHOD(CreateGroup) (THIS_ const DPN_GROUP_INFO *const pdpnGroupInfo,void *const pvGroupContext,void *const pvAsyncContext,DPNHANDLE *const phAsyncHandle,const DWORD dwFlags) PURE;
  720. STDMETHOD(DestroyGroup) (THIS_ const DPNID idGroup, PVOID const pvAsyncContext, DPNHANDLE *const phAsyncHandle, const DWORD dwFlags) PURE;
  721. STDMETHOD(AddPlayerToGroup) (THIS_ const DPNID idGroup, const DPNID idClient, PVOID const pvAsyncContext, DPNHANDLE *const phAsyncHandle, const DWORD dwFlags) PURE;
  722. STDMETHOD(RemovePlayerFromGroup) (THIS_ const DPNID idGroup, const DPNID idClient, PVOID const pvAsyncContext, DPNHANDLE *const phAsyncHandle, const DWORD dwFlags) PURE;
  723. STDMETHOD(SetGroupInfo) (THIS_ const DPNID dpnid,DPN_GROUP_INFO *const pdpnGroupInfo,PVOID const pvAsyncContext,DPNHANDLE *const phAsyncHandle, const DWORD dwFlags) PURE;
  724. STDMETHOD(GetGroupInfo) (THIS_ const DPNID dpnid,DPN_GROUP_INFO *const pdpnGroupInfo,DWORD *const pdwSize,const DWORD dwFlags) PURE;
  725. STDMETHOD(EnumPlayersAndGroups) (THIS_ DPNID *const prgdpnid, DWORD *const pcdpnid, const DWORD dwFlags) PURE;
  726. STDMETHOD(EnumGroupMembers) (THIS_ const DPNID dpnid, DPNID *const prgdpnid, DWORD *const pcdpnid, const DWORD dwFlags) PURE;
  727. STDMETHOD(Close) (THIS_ const DWORD dwFlags) PURE;
  728. STDMETHOD(DestroyClient) (THIS_ const DPNID dpnidClient, const void *const pvDestroyData, const DWORD dwDestroyDataSize, const DWORD dwFlags) PURE;
  729. STDMETHOD(ReturnBuffer) (THIS_ const DPNHANDLE hBufferHandle,const DWORD dwFlags) PURE;
  730. STDMETHOD(GetPlayerContext) (THIS_ const DPNID dpnid,PVOID *const ppvPlayerContext,const DWORD dwFlags) PURE;
  731. STDMETHOD(GetGroupContext) (THIS_ const DPNID dpnid,PVOID *const ppvGroupContext,const DWORD dwFlags) PURE;
  732. STDMETHOD(GetCaps) (THIS_ DPN_CAPS *const pdpCaps,const DWORD dwFlags) PURE;
  733. STDMETHOD(SetCaps) (THIS_ const DPN_CAPS *const pdpCaps, const DWORD dwFlags) PURE;
  734. STDMETHOD(SetSPCaps) (THIS_ const GUID * const pguidSP, const DPN_SP_CAPS *const pdpspCaps, const DWORD dwFlags ) PURE;
  735. STDMETHOD(GetSPCaps) (THIS_ const GUID * const pguidSP, DPN_SP_CAPS *const pdpspCaps,const DWORD dwFlags) PURE;
  736. STDMETHOD(GetConnectionInfo) (THIS_ const DPNID dpnid, DPN_CONNECTION_INFO *const pdpConnectionInfo,const DWORD dwFlags) PURE;
  737. STDMETHOD(RegisterLobby) (THIS_ const DPNHANDLE dpnHandle, struct IDirectPlay8LobbiedApplication *const pIDP8LobbiedApplication,const DWORD dwFlags) PURE;
  738. };
  739. //
  740. // COM definition for DirectPlay8 Peer interface
  741. //
  742. #undef INTERFACE // External COM Implementation
  743. #define INTERFACE IDirectPlay8Peer
  744. DECLARE_INTERFACE_(IDirectPlay8Peer,IUnknown)
  745. {
  746. /*** IUnknown methods ***/
  747. STDMETHOD(QueryInterface) (THIS_ DP8REFIID riid, LPVOID *ppvObj) PURE;
  748. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  749. STDMETHOD_(ULONG,Release) (THIS) PURE;
  750. /*** IDirectPlay8Peer methods ***/
  751. STDMETHOD(Initialize) (THIS_ PVOID const pvUserContext, const PFNDPNMESSAGEHANDLER pfn, const DWORD dwFlags) PURE;
  752. 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;
  753. STDMETHOD(CancelAsyncOperation) (THIS_ const DPNHANDLE hAsyncHandle, const DWORD dwFlags) PURE;
  754. 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;
  755. 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;
  756. STDMETHOD(GetSendQueueInfo) (THIS_ const DPNID dpnid, DWORD *const pdwNumMsgs, DWORD *const pdwNumBytes, const DWORD dwFlags) PURE;
  757. 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;
  758. STDMETHOD(GetApplicationDesc) (THIS_ DPN_APPLICATION_DESC *const pAppDescBuffer, DWORD *const pcbDataSize, const DWORD dwFlags) PURE;
  759. STDMETHOD(SetApplicationDesc) (THIS_ const DPN_APPLICATION_DESC *const pad, const DWORD dwFlags) PURE;
  760. STDMETHOD(CreateGroup) (THIS_ const DPN_GROUP_INFO *const pdpnGroupInfo,void *const pvGroupContext,void *const pvAsyncContext,DPNHANDLE *const phAsyncHandle,const DWORD dwFlags) PURE;
  761. STDMETHOD(DestroyGroup) (THIS_ const DPNID idGroup, PVOID const pvAsyncContext, DPNHANDLE *const phAsyncHandle, const DWORD dwFlags) PURE;
  762. STDMETHOD(AddPlayerToGroup) (THIS_ const DPNID idGroup, const DPNID idClient, PVOID const pvAsyncContext, DPNHANDLE *const phAsyncHandle, const DWORD dwFlags) PURE;
  763. STDMETHOD(RemovePlayerFromGroup) (THIS_ const DPNID idGroup, const DPNID idClient, PVOID const pvAsyncContext, DPNHANDLE *const phAsyncHandle, const DWORD dwFlags) PURE;
  764. STDMETHOD(SetGroupInfo) (THIS_ const DPNID dpnid,DPN_GROUP_INFO *const pdpnGroupInfo,PVOID const pvAsyncContext,DPNHANDLE *const phAsyncHandle, const DWORD dwFlags) PURE;
  765. STDMETHOD(GetGroupInfo) (THIS_ const DPNID dpnid,DPN_GROUP_INFO *const pdpnGroupInfo,DWORD *const pdwSize,const DWORD dwFlags) PURE;
  766. STDMETHOD(EnumPlayersAndGroups) (THIS_ DPNID *const prgdpnid, DWORD *const pcdpnid, const DWORD dwFlags) PURE;
  767. STDMETHOD(EnumGroupMembers) (THIS_ const DPNID dpnid, DPNID *const prgdpnid, DWORD *const pcdpnid, const DWORD dwFlags) PURE;
  768. STDMETHOD(SetPeerInfo) (THIS_ const DPN_PLAYER_INFO *const pdpnPlayerInfo,PVOID const pvAsyncContext,DPNHANDLE *const phAsyncHandle, const DWORD dwFlags) PURE;
  769. STDMETHOD(GetPeerInfo) (THIS_ const DPNID dpnid,DPN_PLAYER_INFO *const pdpnPlayerInfo,DWORD *const pdwSize,const DWORD dwFlags) PURE;
  770. STDMETHOD(GetPeerAddress) (THIS_ const DPNID dpnid,IDirectPlay8Address **const ppAddress,const DWORD dwFlags) PURE;
  771. STDMETHOD(GetLocalHostAddresses) (THIS_ IDirectPlay8Address **const prgpAddress,DWORD *const pcAddress,const DWORD dwFlags) PURE;
  772. STDMETHOD(Close) (THIS_ const DWORD dwFlags) PURE;
  773. 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;
  774. STDMETHOD(DestroyPeer) (THIS_ const DPNID dpnidClient, const void *const pvDestroyData, const DWORD dwDestroyDataSize, const DWORD dwFlags) PURE;
  775. STDMETHOD(ReturnBuffer) (THIS_ const DPNHANDLE hBufferHandle,const DWORD dwFlags) PURE;
  776. STDMETHOD(GetPlayerContext) (THIS_ const DPNID dpnid,PVOID *const ppvPlayerContext,const DWORD dwFlags) PURE;
  777. STDMETHOD(GetGroupContext) (THIS_ const DPNID dpnid,PVOID *const ppvGroupContext,const DWORD dwFlags) PURE;
  778. STDMETHOD(GetCaps) (THIS_ DPN_CAPS *const pdpCaps,const DWORD dwFlags) PURE;
  779. STDMETHOD(SetCaps) (THIS_ const DPN_CAPS *const pdpCaps, const DWORD dwFlags) PURE;
  780. STDMETHOD(SetSPCaps) (THIS_ const GUID * const pguidSP, const DPN_SP_CAPS *const pdpspCaps, const DWORD dwFlags ) PURE;
  781. STDMETHOD(GetSPCaps) (THIS_ const GUID * const pguidSP, DPN_SP_CAPS *const pdpspCaps,const DWORD dwFlags) PURE;
  782. STDMETHOD(GetConnectionInfo) (THIS_ const DPNID dpnid, DPN_CONNECTION_INFO *const pdpConnectionInfo,const DWORD dwFlags) PURE;
  783. STDMETHOD(RegisterLobby) (THIS_ const DPNHANDLE dpnHandle, struct IDirectPlay8LobbiedApplication *const pIDP8LobbiedApplication,const DWORD dwFlags) PURE;
  784. STDMETHOD(TerminateSession) (THIS_ void *const pvTerminateData,const DWORD dwTerminateDataSize,const DWORD dwFlags) PURE;
  785. };
  786. /****************************************************************************
  787. *
  788. * IDirectPlay8 application interface macros
  789. *
  790. ****************************************************************************/
  791. #if !defined(__cplusplus) || defined(CINTERFACE)
  792. #define IDirectPlay8Client_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  793. #define IDirectPlay8Client_AddRef(p) (p)->lpVtbl->AddRef(p)
  794. #define IDirectPlay8Client_Release(p) (p)->lpVtbl->Release(p)
  795. #define IDirectPlay8Client_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c)
  796. #define IDirectPlay8Client_EnumServiceProviders(p,a,b,c,d,e,f) (p)->lpVtbl->EnumServiceProviders(p,a,b,c,d,e,f)
  797. #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)
  798. #define IDirectPlay8Client_CancelAsyncOperation(p,a,b) (p)->lpVtbl->CancelAsyncOperation(p,a,b)
  799. #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)
  800. #define IDirectPlay8Client_Send(p,a,b,c,d,e,f) (p)->lpVtbl->Send(p,a,b,c,d,e,f)
  801. #define IDirectPlay8Client_GetSendQueueInfo(p,a,b,c) (p)->lpVtbl->GetSendQueueInfo(p,a,b,c)
  802. #define IDirectPlay8Client_GetApplicationDesc(p,a,b,c) (p)->lpVtbl->GetApplicationDesc(p,a,b,c)
  803. #define IDirectPlay8Client_SetClientInfo(p,a,b,c,d) (p)->lpVtbl->SetClientInfo(p,a,b,c,d)
  804. #define IDirectPlay8Client_GetServerInfo(p,a,b,c) (p)->lpVtbl->GetServerInfo(p,a,b,c)
  805. #define IDirectPlay8Client_GetServerAddress(p,a,b) (p)->lpVtbl->GetServerAddress(p,a,b)
  806. #define IDirectPlay8Client_Close(p,a) (p)->lpVtbl->Close(p,a)
  807. #define IDirectPlay8Client_ReturnBuffer(p,a,b) (p)->lpVtbl->ReturnBuffer(p,a,b)
  808. #define IDirectPlay8Client_GetCaps(p,a,b) (p)->lpVtbl->GetCaps(p,a,b)
  809. #define IDirectPlay8Client_SetCaps(p,a,b) (p)->lpVtbl->SetCaps(p,a,b)
  810. #define IDirectPlay8Client_SetSPCaps(p,a,b,c) (p)->lpVtbl->SetSPCaps(p,a,b,c)
  811. #define IDirectPlay8Client_GetSPCaps(p,a,b,c) (p)->lpVtbl->GetSPCaps(p,a,b,c)
  812. #define IDirectPlay8Client_GetConnectionInfo(p,a,b) (p)->lpVtbl->GetConnectionInfo(p,a,b)
  813. #define IDirectPlay8Client_RegisterLobby(p,a,b,c) (p)->lpVtbl->RegisterLobby(p,a,b,c)
  814. #define IDirectPlay8Server_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  815. #define IDirectPlay8Server_AddRef(p) (p)->lpVtbl->AddRef(p)
  816. #define IDirectPlay8Server_Release(p) (p)->lpVtbl->Release(p)
  817. #define IDirectPlay8Server_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c)
  818. #define IDirectPlay8Server_EnumServiceProviders(p,a,b,c,d,e,f) (p)->lpVtbl->EnumServiceProviders(p,a,b,c,d,e,f)
  819. #define IDirectPlay8Server_CancelAsyncOperation(p,a,b) (p)->lpVtbl->CancelAsyncOperation(p,a,b)
  820. #define IDirectPlay8Server_GetSendQueueInfo(p,a,b,c,d) (p)->lpVtbl->GetSendQueueInfo(p,a,b,c,d)
  821. #define IDirectPlay8Server_GetApplicationDesc(p,a,b,c) (p)->lpVtbl->GetApplicationDesc(p,a,b,c)
  822. #define IDirectPlay8Server_SetServerInfo(p,a,b,c,d) (p)->lpVtbl->SetServerInfo(p,a,b,c,d)
  823. #define IDirectPlay8Server_GetClientInfo(p,a,b,c,d) (p)->lpVtbl->GetClientInfo(p,a,b,c,d)
  824. #define IDirectPlay8Server_GetClientAddress(p,a,b,c) (p)->lpVtbl->GetClientAddress(p,a,b,c)
  825. #define IDirectPlay8Server_GetLocalHostAddresses(p,a,b,c) (p)->lpVtbl->GetLocalHostAddresses(p,a,b,c)
  826. #define IDirectPlay8Server_SetApplicationDesc(p,a,b) (p)->lpVtbl->SetApplicationDesc(p,a,b)
  827. #define IDirectPlay8Server_Host(p,a,b,c,d,e,f,g) (p)->lpVtbl->Host(p,a,b,c,d,e,f,g)
  828. #define IDirectPlay8Server_SendTo(p,a,b,c,d,e,f,g) (p)->lpVtbl->SendTo(p,a,b,c,d,e,f,g)
  829. #define IDirectPlay8Server_CreateGroup(p,a,b,c,d,e) (p)->lpVtbl->CreateGroup(p,a,b,c,d,e)
  830. #define IDirectPlay8Server_DestroyGroup(p,a,b,c,d) (p)->lpVtbl->DestroyGroup(p,a,b,c,d)
  831. #define IDirectPlay8Server_AddPlayerToGroup(p,a,b,c,d,e) (p)->lpVtbl->AddPlayerToGroup(p,a,b,c,d,e)
  832. #define IDirectPlay8Server_RemovePlayerFromGroup(p,a,b,c,d,e) (p)->lpVtbl->RemovePlayerFromGroup(p,a,b,c,d,e)
  833. #define IDirectPlay8Server_SetGroupInfo(p,a,b,c,d,e) (p)->lpVtbl->SetGroupInfo(p,a,b,c,d,e)
  834. #define IDirectPlay8Server_GetGroupInfo(p,a,b,c,d) (p)->lpVtbl->GetGroupInfo(p,a,b,c,d)
  835. #define IDirectPlay8Server_EnumPlayersAndGroups(p,a,b,c) (p)->lpVtbl->EnumPlayersAndGroups(p,a,b,c)
  836. #define IDirectPlay8Server_EnumGroupMembers(p,a,b,c,d) (p)->lpVtbl->EnumGroupMembers(p,a,b,c,d)
  837. #define IDirectPlay8Server_Close(p,a) (p)->lpVtbl->Close(p,a)
  838. #define IDirectPlay8Server_DestroyClient(p,a,b,c,d) (p)->lpVtbl->DestroyClient(p,a,b,c,d)
  839. #define IDirectPlay8Server_ReturnBuffer(p,a,b) (p)->lpVtbl->ReturnBuffer(p,a,b)
  840. #define IDirectPlay8Server_GetPlayerContext(p,a,b,c) (p)->lpVtbl->GetPlayerContext(p,a,b,c)
  841. #define IDirectPlay8Server_GetGroupContext(p,a,b,c) (p)->lpVtbl->GetGroupContext(p,a,b,c)
  842. #define IDirectPlay8Server_GetCaps(p,a,b) (p)->lpVtbl->GetCaps(p,a,b)
  843. #define IDirectPlay8Server_SetCaps(p,a,b) (p)->lpVtbl->SetCaps(p,a,b)
  844. #define IDirectPlay8Server_SetSPCaps(p,a,b,c) (p)->lpVtbl->SetSPCaps(p,a,b,c)
  845. #define IDirectPlay8Server_GetSPCaps(p,a,b,c) (p)->lpVtbl->GetSPCaps(p,a,b,c)
  846. #define IDirectPlay8Server_GetConnectionInfo(p,a,b,c) (p)->lpVtbl->GetConnectionInfo(p,a,b,c)
  847. #define IDirectPlay8Server_RegisterLobby(p,a,b,c) (p)->lpVtbl->RegisterLobby(p,a,b,c)
  848. #define IDirectPlay8Peer_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  849. #define IDirectPlay8Peer_AddRef(p) (p)->lpVtbl->AddRef(p)
  850. #define IDirectPlay8Peer_Release(p) (p)->lpVtbl->Release(p)
  851. #define IDirectPlay8Peer_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c)
  852. #define IDirectPlay8Peer_EnumServiceProviders(p,a,b,c,d,e,f) (p)->lpVtbl->EnumServiceProviders(p,a,b,c,d,e,f)
  853. #define IDirectPlay8Peer_CancelAsyncOperation(p,a,b) (p)->lpVtbl->CancelAsyncOperation(p,a,b)
  854. #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)
  855. #define IDirectPlay8Peer_SendTo(p,a,b,c,d,e,f,g) (p)->lpVtbl->SendTo(p,a,b,c,d,e,f,g)
  856. #define IDirectPlay8Peer_GetSendQueueInfo(p,a,b,c,d) (p)->lpVtbl->GetSendQueueInfo(p,a,b,c,d)
  857. #define IDirectPlay8Peer_Host(p,a,b,c,d,e,f,g) (p)->lpVtbl->Host(p,a,b,c,d,e,f,g)
  858. #define IDirectPlay8Peer_GetApplicationDesc(p,a,b,c) (p)->lpVtbl->GetApplicationDesc(p,a,b,c)
  859. #define IDirectPlay8Peer_SetApplicationDesc(p,a,b) (p)->lpVtbl->SetApplicationDesc(p,a,b)
  860. #define IDirectPlay8Peer_CreateGroup(p,a,b,c,d,e) (p)->lpVtbl->CreateGroup(p,a,b,c,d,e)
  861. #define IDirectPlay8Peer_DestroyGroup(p,a,b,c,d) (p)->lpVtbl->DestroyGroup(p,a,b,c,d)
  862. #define IDirectPlay8Peer_AddPlayerToGroup(p,a,b,c,d,e) (p)->lpVtbl->AddPlayerToGroup(p,a,b,c,d,e)
  863. #define IDirectPlay8Peer_RemovePlayerFromGroup(p,a,b,c,d,e) (p)->lpVtbl->RemovePlayerFromGroup(p,a,b,c,d,e)
  864. #define IDirectPlay8Peer_SetGroupInfo(p,a,b,c,d,e) (p)->lpVtbl->SetGroupInfo(p,a,b,c,d,e)
  865. #define IDirectPlay8Peer_GetGroupInfo(p,a,b,c,d) (p)->lpVtbl->GetGroupInfo(p,a,b,c,d)
  866. #define IDirectPlay8Peer_EnumPlayersAndGroups(p,a,b,c) (p)->lpVtbl->EnumPlayersAndGroups(p,a,b,c)
  867. #define IDirectPlay8Peer_EnumGroupMembers(p,a,b,c,d) (p)->lpVtbl->EnumGroupMembers(p,a,b,c,d)
  868. #define IDirectPlay8Peer_SetPeerInfo(p,a,b,c,d) (p)->lpVtbl->SetPeerInfo(p,a,b,c,d)
  869. #define IDirectPlay8Peer_GetPeerInfo(p,a,b,c,d) (p)->lpVtbl->GetPeerInfo(p,a,b,c,d)
  870. #define IDirectPlay8Peer_GetPeerAddress(p,a,b,c) (p)->lpVtbl->GetPeerAddress(p,a,b,c)
  871. #define IDirectPlay8Peer_GetLocalHostAddresses(p,a,b,c) (p)->lpVtbl->GetLocalHostAddresses(p,a,b,c)
  872. #define IDirectPlay8Peer_Close(p,a) (p)->lpVtbl->Close(p,a)
  873. #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)
  874. #define IDirectPlay8Peer_DestroyPeer(p,a,b,c,d) (p)->lpVtbl->DestroyPeer(p,a,b,c,d)
  875. #define IDirectPlay8Peer_ReturnBuffer(p,a,b) (p)->lpVtbl->ReturnBuffer(p,a,b)
  876. #define IDirectPlay8Peer_GetPlayerContext(p,a,b,c) (p)->lpVtbl->GetPlayerContext(p,a,b,c)
  877. #define IDirectPlay8Peer_GetGroupContext(p,a,b,c) (p)->lpVtbl->GetGroupContext(p,a,b,c)
  878. #define IDirectPlay8Peer_GetCaps(p,a,b) (p)->lpVtbl->GetCaps(p,a,b)
  879. #define IDirectPlay8Peer_SetCaps(p,a,b) (p)->lpVtbl->SetCaps(p,a,b)
  880. #define IDirectPlay8Peer_SetSPCaps(p,a,b,c) (p)->lpVtbl->SetSPCaps(p,a,b,c)
  881. #define IDirectPlay8Peer_GetSPCaps(p,a,b,c) (p)->lpVtbl->GetSPCaps(p,a,b,c)
  882. #define IDirectPlay8Peer_GetConnectionInfo(p,a,b,c) (p)->lpVtbl->GetConnectionInfo(p,a,b,c)
  883. #define IDirectPlay8Peer_RegisterLobby(p,a,b,c) (p)->lpVtbl->RegisterLobby(p,a,b,c)
  884. #define IDirectPlay8Peer_TerminateSession(p,a,b,c) (p)->lpVtbl->TerminateSession(p,a,b,c)
  885. #else /* C++ */
  886. #define IDirectPlay8Client_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  887. #define IDirectPlay8Client_AddRef(p) (p)->AddRef()
  888. #define IDirectPlay8Client_Release(p) (p)->Release()
  889. #define IDirectPlay8Client_Initialize(p,a,b,c) (p)->Initialize(a,b,c)
  890. #define IDirectPlay8Client_EnumServiceProviders(p,a,b,c,d,e,f) (p)->EnumServiceProviders(a,b,c,d,e,f)
  891. #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)
  892. #define IDirectPlay8Client_CancelAsyncOperation(p,a,b) (p)->CancelAsyncOperation(a,b)
  893. #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)
  894. #define IDirectPlay8Client_Send(p,a,b,c,d,e,f) (p)->Send(a,b,c,d,e,f)
  895. #define IDirectPlay8Client_GetSendQueueInfo(p,a,b,c) (p)->GetSendQueueInfo(a,b,c)
  896. #define IDirectPlay8Client_GetApplicationDesc(p,a,b,c) (p)->GetApplicationDesc(a,b,c)
  897. #define IDirectPlay8Client_SetClientInfo(p,a,b,c,d) (p)->SetClientInfo(a,b,c,d)
  898. #define IDirectPlay8Client_GetServerInfo(p,a,b,c) (p)->GetServerInfo(a,b,c)
  899. #define IDirectPlay8Client_GetServerAddress(p,a,b) (p)->GetServerAddress(a,b)
  900. #define IDirectPlay8Client_Close(p,a) (p)->Close(a)
  901. #define IDirectPlay8Client_ReturnBuffer(p,a,b) (p)->ReturnBuffer(a,b)
  902. #define IDirectPlay8Client_GetCaps(p,a,b) (p)->GetCaps(a,b)
  903. #define IDirectPlay8Client_SetCaps(p,a,b) (p)->SetCaps(a,b)
  904. #define IDirectPlay8Client_SetSPCaps(p,a,b,c) (p)->SetSPCaps(a,b,c)
  905. #define IDirectPlay8Client_GetSPCaps(p,a,b,c) (p)->GetSPCaps(a,b,c)
  906. #define IDirectPlay8Client_GetConnectionInfo(p,a,b) (p)->GetConnectionInfo(a,b)
  907. #define IDirectPlay8Client_RegisterLobby(p,a,b,c) (p)->RegisterLobby(a,b,c)
  908. #define IDirectPlay8Server_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  909. #define IDirectPlay8Server_AddRef(p) (p)->AddRef()
  910. #define IDirectPlay8Server_Release(p) (p)->Release()
  911. #define IDirectPlay8Server_Initialize(p,a,b,c) (p)->Initialize(a,b,c)
  912. #define IDirectPlay8Server_EnumServiceProviders(p,a,b,c,d,e,f) (p)->EnumServiceProviders(a,b,c,d,e,f)
  913. #define IDirectPlay8Server_CancelAsyncOperation(p,a,b) (p)->CancelAsyncOperation(a,b)
  914. #define IDirectPlay8Server_GetSendQueueInfo(p,a,b,c,d) (p)->GetSendQueueInfo(a,b,c,d)
  915. #define IDirectPlay8Server_GetApplicationDesc(p,a,b,c) (p)->GetApplicationDesc(a,b,c)
  916. #define IDirectPlay8Server_SetServerInfo(p,a,b,c,d) (p)->SetServerInfo(a,b,c,d)
  917. #define IDirectPlay8Server_GetClientInfo(p,a,b,c,d) (p)->GetClientInfo(a,b,c,d)
  918. #define IDirectPlay8Server_GetClientAddress(p,a,b,c) (p)->GetClientAddress(a,b,c)
  919. #define IDirectPlay8Server_GetLocalHostAddresses(p,a,b,c) (p)->GetLocalHostAddresses(a,b,c)
  920. #define IDirectPlay8Server_SetApplicationDesc(p,a,b) (p)->SetApplicationDesc(a,b)
  921. #define IDirectPlay8Server_Host(p,a,b,c,d,e,f,g) (p)->Host(a,b,c,d,e,f,g)
  922. #define IDirectPlay8Server_SendTo(p,a,b,c,d,e,f,g) (p)->SendTo(a,b,c,d,e,f,g)
  923. #define IDirectPlay8Server_CreateGroup(p,a,b,c,d,e) (p)->CreateGroup(a,b,c,d,e)
  924. #define IDirectPlay8Server_DestroyGroup(p,a,b,c,d) (p)->DestroyGroup(a,b,c,d)
  925. #define IDirectPlay8Server_AddPlayerToGroup(p,a,b,c,d,e) (p)->AddPlayerToGroup(a,b,c,d,e)
  926. #define IDirectPlay8Server_RemovePlayerFromGroup(p,a,b,c,d,e) (p)->RemovePlayerFromGroup(a,b,c,d,e)
  927. #define IDirectPlay8Server_SetGroupInfo(p,a,b,c,d,e) (p)->SetGroupInfo(a,b,c,d,e)
  928. #define IDirectPlay8Server_GetGroupInfo(p,a,b,c,d) (p)->GetGroupInfo(a,b,c,d)
  929. #define IDirectPlay8Server_EnumPlayersAndGroups(p,a,b,c) (p)->EnumPlayersAndGroups(a,b,c)
  930. #define IDirectPlay8Server_EnumGroupMembers(p,a,b,c,d) (p)->EnumGroupMembers(a,b,c,d)
  931. #define IDirectPlay8Server_Close(p,a) (p)->Close(a)
  932. #define IDirectPlay8Server_DestroyClient(p,a,b,c,d) (p)->DestroyClient(a,b,c,d)
  933. #define IDirectPlay8Server_ReturnBuffer(p,a,b) (p)->ReturnBuffer(a,b)
  934. #define IDirectPlay8Server_GetPlayerContext(p,a,b,c) (p)->GetPlayerContext(a,b,c)
  935. #define IDirectPlay8Server_GetGroupContext(p,a,b,c) (p)->GetGroupContext(a,b,c)
  936. #define IDirectPlay8Server_GetCaps(p,a,b) (p)->GetCaps(a,b)
  937. #define IDirectPlay8Server_SetCaps(p,a,b) (p)->SetCaps(a,b)
  938. #define IDirectPlay8Server_SetSPCaps(p,a,b,c) (p)->SetSPCaps(a,b,c)
  939. #define IDirectPlay8Server_GetSPCaps(p,a,b,c) (p)->GetSPCaps(a,b,c)
  940. #define IDirectPlay8Server_GetConnectionInfo(p,a,b,c) (p)->GetConnectionInfo(a,b,c)
  941. #define IDirectPlay8Server_RegisterLobby(p,a,b,c) (p)->RegisterLobby(a,b,c)
  942. #define IDirectPlay8Peer_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  943. #define IDirectPlay8Peer_AddRef(p) (p)->AddRef()
  944. #define IDirectPlay8Peer_Release(p) (p)->Release()
  945. #define IDirectPlay8Peer_Initialize(p,a,b,c) (p)->Initialize(a,b,c)
  946. #define IDirectPlay8Peer_EnumServiceProviders(p,a,b,c,d,e,f) (p)->EnumServiceProviders(a,b,c,d,e,f)
  947. #define IDirectPlay8Peer_CancelAsyncOperation(p,a,b) (p)->CancelAsyncOperation(a,b)
  948. #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)
  949. #define IDirectPlay8Peer_SendTo(p,a,b,c,d,e,f,g) (p)->SendTo(a,b,c,d,e,f,g)
  950. #define IDirectPlay8Peer_GetSendQueueInfo(p,a,b,c,d) (p)->GetSendQueueInfo(a,b,c,d)
  951. #define IDirectPlay8Peer_Host(p,a,b,c,d,e,f,g) (p)->Host(a,b,c,d,e,f,g)
  952. #define IDirectPlay8Peer_GetApplicationDesc(p,a,b,c) (p)->GetApplicationDesc(a,b,c)
  953. #define IDirectPlay8Peer_SetApplicationDesc(p,a,b) (p)->SetApplicationDesc(a,b)
  954. #define IDirectPlay8Peer_CreateGroup(p,a,b,c,d,e) (p)->CreateGroup(a,b,c,d,e)
  955. #define IDirectPlay8Peer_DestroyGroup(p,a,b,c,d) (p)->DestroyGroup(a,b,c,d)
  956. #define IDirectPlay8Peer_AddPlayerToGroup(p,a,b,c,d,e) (p)->AddPlayerToGroup(a,b,c,d,e)
  957. #define IDirectPlay8Peer_RemovePlayerFromGroup(p,a,b,c,d,e) (p)->RemovePlayerFromGroup(a,b,c,d,e)
  958. #define IDirectPlay8Peer_SetGroupInfo(p,a,b,c,d,e) (p)->SetGroupInfo(a,b,c,d,e)
  959. #define IDirectPlay8Peer_GetGroupInfo(p,a,b,c,d) (p)->GetGroupInfo(a,b,c,d)
  960. #define IDirectPlay8Peer_EnumPlayersAndGroups(p,a,b,c) (p)->EnumPlayersAndGroups(a,b,c)
  961. #define IDirectPlay8Peer_EnumGroupMembers(p,a,b,c,d) (p)->EnumGroupMembers(a,b,c,d)
  962. #define IDirectPlay8Peer_SetPeerInfo(p,a,b,c,d) (p)->SetPeerInfo(a,b,c,d)
  963. #define IDirectPlay8Peer_GetPeerInfo(p,a,b,c,d) (p)->GetPeerInfo(a,b,c,d)
  964. #define IDirectPlay8Peer_GetPeerAddress(p,a,b,c) (p)->GetPeerAddress(a,b,c)
  965. #define IDirectPlay8Peer_GetLocalHostAddresses(p,a,b,c) (p)->GetLocalHostAddresses(a,b,c)
  966. #define IDirectPlay8Peer_Close(p,a) (p)->Close(a)
  967. #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)
  968. #define IDirectPlay8Peer_DestroyPeer(p,a,b,c,d) (p)->DestroyPeer(a,b,c,d)
  969. #define IDirectPlay8Peer_ReturnBuffer(p,a,b) (p)->ReturnBuffer(a,b)
  970. #define IDirectPlay8Peer_GetPlayerContext(p,a,b,c) (p)->GetPlayerContext(a,b,c)
  971. #define IDirectPlay8Peer_GetGroupContext(p,a,b,c) (p)->GetGroupContext(a,b,c)
  972. #define IDirectPlay8Peer_GetCaps(p,a,b) (p)->GetCaps(a,b)
  973. #define IDirectPlay8Peer_SetCaps(p,a,b) (p)->SetCaps(a,b)
  974. #define IDirectPlay8Peer_SetSPCaps(p,a,b,c) (p)->SetSPCaps(a,b,c)
  975. #define IDirectPlay8Peer_GetSPCaps(p,a,b,c) (p)->GetSPCaps(a,b,c)
  976. #define IDirectPlay8Peer_GetConnectionInfo(p,a,b,c) (p)->GetConnectionInfo(a,b,c)
  977. #define IDirectPlay8Peer_RegisterLobby(p,a,b,c) (p)->RegisterLobby(a,b,c)
  978. #define IDirectPlay8Peer_TerminateSession(p,a,b,c) (p)->TerminateSession(a,b,c)
  979. #endif
  980. /****************************************************************************
  981. *
  982. * DIRECTPLAY8 ERRORS
  983. *
  984. * Errors are represented by negative values and cannot be combined.
  985. *
  986. ****************************************************************************/
  987. #define _DPN_FACILITY_CODE 0x015
  988. #define _DPNHRESULT_BASE 0x8000
  989. #define MAKE_DPNHRESULT( code ) MAKE_HRESULT( 1, _DPN_FACILITY_CODE, ( code + _DPNHRESULT_BASE ) )
  990. #define DPN_OK S_OK
  991. #define DPNSUCCESS_EQUAL MAKE_HRESULT( 0, _DPN_FACILITY_CODE, ( 0x5 + _DPNHRESULT_BASE ) )
  992. #define DPNSUCCESS_NOTEQUAL MAKE_HRESULT( 0, _DPN_FACILITY_CODE, (0x0A + _DPNHRESULT_BASE ) )
  993. #define DPNSUCCESS_PENDING MAKE_HRESULT( 0, _DPN_FACILITY_CODE, (0x0e + _DPNHRESULT_BASE ) )
  994. #define DPNERR_ABORTED MAKE_DPNHRESULT( 0x30 )
  995. #define DPNERR_ADDRESSING MAKE_DPNHRESULT( 0x40 )
  996. #define DPNERR_ALREADYCLOSING MAKE_DPNHRESULT( 0x50 )
  997. #define DPNERR_ALREADYCONNECTED MAKE_DPNHRESULT( 0x60 )
  998. #define DPNERR_ALREADYDISCONNECTING MAKE_DPNHRESULT( 0x70 )
  999. #define DPNERR_ALREADYINITIALIZED MAKE_DPNHRESULT( 0x80 )
  1000. #define DPNERR_ALREADYREGISTERED MAKE_DPNHRESULT( 0x90 )
  1001. #define DPNERR_BUFFERTOOSMALL MAKE_DPNHRESULT( 0x100 )
  1002. #define DPNERR_CANNOTCANCEL MAKE_DPNHRESULT( 0x110 )
  1003. #define DPNERR_CANTCREATEGROUP MAKE_DPNHRESULT( 0x120 )
  1004. #define DPNERR_CANTCREATEPLAYER MAKE_DPNHRESULT( 0x130 )
  1005. #define DPNERR_CANTLAUNCHAPPLICATION MAKE_DPNHRESULT( 0x140 )
  1006. #define DPNERR_CONNECTING MAKE_DPNHRESULT( 0x150 )
  1007. #define DPNERR_CONNECTIONLOST MAKE_DPNHRESULT( 0x160 )
  1008. #define DPNERR_CONVERSION MAKE_DPNHRESULT( 0x170 )
  1009. #define DPNERR_DATATOOLARGE MAKE_DPNHRESULT( 0x175 )
  1010. #define DPNERR_DOESNOTEXIST MAKE_DPNHRESULT( 0x180 )
  1011. #define DPNERR_DPNSVRNOTAVAILABLE MAKE_DPNHRESULT( 0x185 )
  1012. #define DPNERR_DUPLICATECOMMAND MAKE_DPNHRESULT( 0x190 )
  1013. #define DPNERR_ENDPOINTNOTRECEIVING MAKE_DPNHRESULT( 0x200 )
  1014. #define DPNERR_ENUMQUERYTOOLARGE MAKE_DPNHRESULT( 0x210 )
  1015. #define DPNERR_ENUMRESPONSETOOLARGE MAKE_DPNHRESULT( 0x220 )
  1016. #define DPNERR_EXCEPTION MAKE_DPNHRESULT( 0x230 )
  1017. #define DPNERR_GENERIC E_FAIL
  1018. #define DPNERR_GROUPNOTEMPTY MAKE_DPNHRESULT( 0x240 )
  1019. #define DPNERR_HOSTING MAKE_DPNHRESULT( 0x250 )
  1020. #define DPNERR_HOSTREJECTEDCONNECTION MAKE_DPNHRESULT( 0x260 )
  1021. #define DPNERR_HOSTTERMINATEDSESSION MAKE_DPNHRESULT( 0x270 )
  1022. #define DPNERR_INCOMPLETEADDRESS MAKE_DPNHRESULT( 0x280 )
  1023. #define DPNERR_INVALIDADDRESSFORMAT MAKE_DPNHRESULT( 0x290 )
  1024. #define DPNERR_INVALIDAPPLICATION MAKE_DPNHRESULT( 0x300 )
  1025. #define DPNERR_INVALIDCOMMAND MAKE_DPNHRESULT( 0x310 )
  1026. #define DPNERR_INVALIDDEVICEADDRESS MAKE_DPNHRESULT( 0x320 )
  1027. #define DPNERR_INVALIDENDPOINT MAKE_DPNHRESULT( 0x330 )
  1028. #define DPNERR_INVALIDFLAGS MAKE_DPNHRESULT( 0x340 )
  1029. #define DPNERR_INVALIDGROUP MAKE_DPNHRESULT( 0x350 )
  1030. #define DPNERR_INVALIDHANDLE MAKE_DPNHRESULT( 0x360 )
  1031. #define DPNERR_INVALIDHOSTADDRESS MAKE_DPNHRESULT( 0x370 )
  1032. #define DPNERR_INVALIDINSTANCE MAKE_DPNHRESULT( 0x380 )
  1033. #define DPNERR_INVALIDINTERFACE MAKE_DPNHRESULT( 0x390 )
  1034. #define DPNERR_INVALIDOBJECT MAKE_DPNHRESULT( 0x400 )
  1035. #define DPNERR_INVALIDPARAM E_INVALIDARG
  1036. #define DPNERR_INVALIDPASSWORD MAKE_DPNHRESULT( 0x410 )
  1037. #define DPNERR_INVALIDPLAYER MAKE_DPNHRESULT( 0x420 )
  1038. #define DPNERR_INVALIDPOINTER E_POINTER
  1039. #define DPNERR_INVALIDPRIORITY MAKE_DPNHRESULT( 0x430 )
  1040. #define DPNERR_INVALIDSTRING MAKE_DPNHRESULT( 0x440 )
  1041. #define DPNERR_INVALIDURL MAKE_DPNHRESULT( 0x450 )
  1042. #define DPNERR_INVALIDVERSION MAKE_DPNHRESULT( 0x460 )
  1043. #define DPNERR_NOCAPS MAKE_DPNHRESULT( 0x470 )
  1044. #define DPNERR_NOCONNECTION MAKE_DPNHRESULT( 0x480 )
  1045. #define DPNERR_NOHOSTPLAYER MAKE_DPNHRESULT( 0x490 )
  1046. #define DPNERR_NOINTERFACE E_NOINTERFACE
  1047. #define DPNERR_NOMOREADDRESSCOMPONENTS MAKE_DPNHRESULT( 0x500 )
  1048. #define DPNERR_NORESPONSE MAKE_DPNHRESULT( 0x510 )
  1049. #define DPNERR_NOTALLOWED MAKE_DPNHRESULT( 0x520 )
  1050. #define DPNERR_NOTHOST MAKE_DPNHRESULT( 0x530 )
  1051. #define DPNERR_NOTREADY MAKE_DPNHRESULT( 0x540 )
  1052. #define DPNERR_NOTREGISTERED MAKE_DPNHRESULT( 0x550 )
  1053. #define DPNERR_OUTOFMEMORY E_OUTOFMEMORY
  1054. #define DPNERR_PENDING DPNSUCCESS_PENDING
  1055. #define DPNERR_PLAYERALREADYINGROUP MAKE_DPNHRESULT( 0x560 )
  1056. #define DPNERR_PLAYERLOST MAKE_DPNHRESULT( 0x570 )
  1057. #define DPNERR_PLAYERNOTINGROUP MAKE_DPNHRESULT( 0x580 )
  1058. #define DPNERR_PLAYERNOTREACHABLE MAKE_DPNHRESULT( 0x590 )
  1059. #define DPNERR_SENDTOOLARGE MAKE_DPNHRESULT( 0x600 )
  1060. #define DPNERR_SESSIONFULL MAKE_DPNHRESULT( 0x610 )
  1061. #define DPNERR_TABLEFULL MAKE_DPNHRESULT( 0x620 )
  1062. #define DPNERR_TIMEDOUT MAKE_DPNHRESULT( 0x630 )
  1063. #define DPNERR_UNINITIALIZED MAKE_DPNHRESULT( 0x640 )
  1064. #define DPNERR_UNSUPPORTED E_NOTIMPL
  1065. #define DPNERR_USERCANCEL MAKE_DPNHRESULT( 0x650 )
  1066. #ifdef __cplusplus
  1067. }
  1068. #endif
  1069. #endif