dplay8.h
上传用户:dzyhzl
上传日期:2019-04-29
资源大小:56270k
文件大小:59k
源码类别:

模拟服务器

开发平台:

C/C++

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