dplay8.h 51 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823
  1. /*
  2. * Copyright (C) 2003 Raphael Junqueira
  3. *
  4. * This library is free software; you can redistribute it and/or
  5. * modify it under the terms of the GNU Lesser General Public
  6. * License as published by the Free Software Foundation; either
  7. * version 2.1 of the License, or (at your option) any later version.
  8. *
  9. * This library is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  12. * Lesser General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU Lesser General Public
  15. * License along with this library; if not, write to the Free Software
  16. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  17. */
  18. #ifndef __WINE_DPLAY8_H
  19. #define __WINE_DPLAY8_H
  20. #include <ole2.h>
  21. #include <dpaddr.h>
  22. #ifdef __cplusplus
  23. extern "C" {
  24. #endif /* defined(__cplusplus) */
  25. typedef HRESULT (WINAPI *PFNDPNMESSAGEHANDLER)(PVOID, DWORD, PVOID);
  26. typedef DWORD DPNID, *PDPNID;
  27. typedef DWORD DPNHANDLE, *PDPNHANDLE;
  28. /*****************************************************************************
  29. * DirectPlay8 Message Id
  30. */
  31. #define DPN_MSGID_OFFSET 0xFFFF0000
  32. #define DPN_MSGID_ADD_PLAYER_TO_GROUP (DPN_MSGID_OFFSET | 0x0001)
  33. #define DPN_MSGID_APPLICATION_DESC (DPN_MSGID_OFFSET | 0x0002)
  34. #define DPN_MSGID_ASYNC_OP_COMPLETE (DPN_MSGID_OFFSET | 0x0003)
  35. #define DPN_MSGID_CLIENT_INFO (DPN_MSGID_OFFSET | 0x0004)
  36. #define DPN_MSGID_CONNECT_COMPLETE (DPN_MSGID_OFFSET | 0x0005)
  37. #define DPN_MSGID_CREATE_GROUP (DPN_MSGID_OFFSET | 0x0006)
  38. #define DPN_MSGID_CREATE_PLAYER (DPN_MSGID_OFFSET | 0x0007)
  39. #define DPN_MSGID_DESTROY_GROUP (DPN_MSGID_OFFSET | 0x0008)
  40. #define DPN_MSGID_DESTROY_PLAYER (DPN_MSGID_OFFSET | 0x0009)
  41. #define DPN_MSGID_ENUM_HOSTS_QUERY (DPN_MSGID_OFFSET | 0x000A)
  42. #define DPN_MSGID_ENUM_HOSTS_RESPONSE (DPN_MSGID_OFFSET | 0x000B)
  43. #define DPN_MSGID_GROUP_INFO (DPN_MSGID_OFFSET | 0x000C)
  44. #define DPN_MSGID_HOST_MIGRATE (DPN_MSGID_OFFSET | 0x000D)
  45. #define DPN_MSGID_INDICATE_CONNECT (DPN_MSGID_OFFSET | 0x000E)
  46. #define DPN_MSGID_INDICATED_CONNECT_ABORTED (DPN_MSGID_OFFSET | 0x000F)
  47. #define DPN_MSGID_PEER_INFO (DPN_MSGID_OFFSET | 0x0010)
  48. #define DPN_MSGID_RECEIVE (DPN_MSGID_OFFSET | 0x0011)
  49. #define DPN_MSGID_REMOVE_PLAYER_FROM_GROUP (DPN_MSGID_OFFSET | 0x0012)
  50. #define DPN_MSGID_RETURN_BUFFER (DPN_MSGID_OFFSET | 0x0013)
  51. #define DPN_MSGID_SEND_COMPLETE (DPN_MSGID_OFFSET | 0x0014)
  52. #define DPN_MSGID_SERVER_INFO (DPN_MSGID_OFFSET | 0x0015)
  53. #define DPN_MSGID_TERMINATE_SESSION (DPN_MSGID_OFFSET | 0x0016)
  54. /*****************************************************************************
  55. * DirectPlay8 Errors
  56. */
  57. #define _DPN_FACILITY_CODE 0x015
  58. #define _DPNHRESULT_BASE 0x8000
  59. #define MAKE_DPNHRESULT(code) MAKE_HRESULT(1, _DPN_FACILITY_CODE, (code + _DPNHRESULT_BASE))
  60. #define DPNSUCCESS_EQUAL MAKE_HRESULT(0, _DPN_FACILITY_CODE, (0x05 + _DPNHRESULT_BASE))
  61. #define DPNSUCCESS_NOTEQUAL MAKE_HRESULT(0, _DPN_FACILITY_CODE, (0x0A + _DPNHRESULT_BASE))
  62. #define DPNSUCCESS_PENDING MAKE_HRESULT(0, _DPN_FACILITY_CODE, (0x0E + _DPNHRESULT_BASE))
  63. #define DPN_OK S_OK
  64. #define DPNERR_GENERIC E_FAIL
  65. #define DPNERR_INVALIDPARAM E_INVALIDARG
  66. #define DPNERR_UNSUPPORTED E_NOTIMPL
  67. #define DPNERR_NOINTERFACE E_NOINTERFACE
  68. #define DPNERR_OUTOFMEMORY E_OUTOFMEMORY
  69. #define DPNERR_INVALIDPOINTER E_POINTER
  70. #define DPNERR_PENDING DPNSUCCESS_PENDING
  71. #define DPNERR_ABORTED MAKE_DPNHRESULT(0x030)
  72. #define DPNERR_ADDRESSING MAKE_DPNHRESULT(0x040)
  73. #define DPNERR_ALREADYCLOSING MAKE_DPNHRESULT(0x050)
  74. #define DPNERR_ALREADYCONNECTED MAKE_DPNHRESULT(0x060)
  75. #define DPNERR_ALREADYDISCONNECTING MAKE_DPNHRESULT(0x070)
  76. #define DPNERR_ALREADYINITIALIZED MAKE_DPNHRESULT(0x080)
  77. #define DPNERR_ALREADYREGISTERED MAKE_DPNHRESULT(0x090)
  78. #define DPNERR_BUFFERTOOSMALL MAKE_DPNHRESULT(0x100)
  79. #define DPNERR_CANNOTCANCEL MAKE_DPNHRESULT(0x110)
  80. #define DPNERR_CANTCREATEGROUP MAKE_DPNHRESULT(0x120)
  81. #define DPNERR_CANTCREATEPLAYER MAKE_DPNHRESULT(0x130)
  82. #define DPNERR_CANTLAUNCHAPPLICATION MAKE_DPNHRESULT(0x140)
  83. #define DPNERR_CONNECTING MAKE_DPNHRESULT(0x150)
  84. #define DPNERR_CONNECTIONLOST MAKE_DPNHRESULT(0x160)
  85. #define DPNERR_CONVERSION MAKE_DPNHRESULT(0x170)
  86. #define DPNERR_DATATOOLARGE MAKE_DPNHRESULT(0x175)
  87. #define DPNERR_DOESNOTEXIST MAKE_DPNHRESULT(0x180)
  88. #define DPNERR_DUPLICATECOMMAND MAKE_DPNHRESULT(0x190)
  89. #define DPNERR_ENDPOINTNOTRECEIVING MAKE_DPNHRESULT(0x200)
  90. #define DPNERR_ENUMQUERYTOOLARGE MAKE_DPNHRESULT(0x210)
  91. #define DPNERR_ENUMRESPONSETOOLARGE MAKE_DPNHRESULT(0x220)
  92. #define DPNERR_EXCEPTION MAKE_DPNHRESULT(0x230)
  93. #define DPNERR_GROUPNOTEMPTY MAKE_DPNHRESULT(0x240)
  94. #define DPNERR_HOSTING MAKE_DPNHRESULT(0x250)
  95. #define DPNERR_HOSTREJECTEDCONNECTION MAKE_DPNHRESULT(0x260)
  96. #define DPNERR_HOSTTERMINATEDSESSION MAKE_DPNHRESULT(0x270)
  97. #define DPNERR_INCOMPLETEADDRESS MAKE_DPNHRESULT(0x280)
  98. #define DPNERR_INVALIDADDRESSFORMAT MAKE_DPNHRESULT(0x290)
  99. #define DPNERR_INVALIDAPPLICATION MAKE_DPNHRESULT(0x300)
  100. #define DPNERR_INVALIDCOMMAND MAKE_DPNHRESULT(0x310)
  101. #define DPNERR_INVALIDDEVICEADDRESS MAKE_DPNHRESULT(0x320)
  102. #define DPNERR_INVALIDENDPOINT MAKE_DPNHRESULT(0x330)
  103. #define DPNERR_INVALIDFLAGS MAKE_DPNHRESULT(0x340)
  104. #define DPNERR_INVALIDGROUP MAKE_DPNHRESULT(0x350)
  105. #define DPNERR_INVALIDHANDLE MAKE_DPNHRESULT(0x360)
  106. #define DPNERR_INVALIDHOSTADDRESS MAKE_DPNHRESULT(0x370)
  107. #define DPNERR_INVALIDINSTANCE MAKE_DPNHRESULT(0x380)
  108. #define DPNERR_INVALIDINTERFACE MAKE_DPNHRESULT(0x390)
  109. #define DPNERR_INVALIDOBJECT MAKE_DPNHRESULT(0x400)
  110. #define DPNERR_INVALIDPASSWORD MAKE_DPNHRESULT(0x410)
  111. #define DPNERR_INVALIDPLAYER MAKE_DPNHRESULT(0x420)
  112. #define DPNERR_INVALIDPRIORITY MAKE_DPNHRESULT(0x430)
  113. #define DPNERR_INVALIDSTRING MAKE_DPNHRESULT(0x440)
  114. #define DPNERR_INVALIDURL MAKE_DPNHRESULT(0x450)
  115. #define DPNERR_INVALIDVERSION MAKE_DPNHRESULT(0x460)
  116. #define DPNERR_NOCAPS MAKE_DPNHRESULT(0x470)
  117. #define DPNERR_NOCONNECTION MAKE_DPNHRESULT(0x480)
  118. #define DPNERR_NOHOSTPLAYER MAKE_DPNHRESULT(0x490)
  119. #define DPNERR_NOMOREADDRESSCOMPONENTS MAKE_DPNHRESULT(0x500)
  120. #define DPNERR_NORESPONSE MAKE_DPNHRESULT(0x510)
  121. #define DPNERR_NOTALLOWED MAKE_DPNHRESULT(0x520)
  122. #define DPNERR_NOTHOST MAKE_DPNHRESULT(0x530)
  123. #define DPNERR_NOTREADY MAKE_DPNHRESULT(0x540)
  124. #define DPNERR_NOTREGISTERED MAKE_DPNHRESULT(0x550)
  125. #define DPNERR_PLAYERALREADYINGROUP MAKE_DPNHRESULT(0x560)
  126. #define DPNERR_PLAYERLOST MAKE_DPNHRESULT(0x570)
  127. #define DPNERR_PLAYERNOTINGROUP MAKE_DPNHRESULT(0x580)
  128. #define DPNERR_PLAYERNOTREACHABLE MAKE_DPNHRESULT(0x590)
  129. #define DPNERR_SENDTOOLARGE MAKE_DPNHRESULT(0x600)
  130. #define DPNERR_SESSIONFULL MAKE_DPNHRESULT(0x610)
  131. #define DPNERR_TABLEFULL MAKE_DPNHRESULT(0x620)
  132. #define DPNERR_TIMEDOUT MAKE_DPNHRESULT(0x630)
  133. #define DPNERR_UNINITIALIZED MAKE_DPNHRESULT(0x640)
  134. #define DPNERR_USERCANCEL MAKE_DPNHRESULT(0x650)
  135. /*****************************************************************************
  136. * DirectPlay8 defines
  137. */
  138. #define DPNOP_SYNC 0x80000000
  139. #define DPNADDPLAYERTOGROUP_SYNC DPNOP_SYNC
  140. #define DPNCANCEL_CONNECT 0x0001
  141. #define DPNCANCEL_ENUM 0x0002
  142. #define DPNCANCEL_SEND 0x0004
  143. #define DPNCANCEL_ALL_OPERATIONS 0x8000
  144. #define DPNCONNECT_SYNC DPNOP_SYNC
  145. #define DPNCONNECT_OKTOQUERYFORADDRESSING 0x0001
  146. #define DPNCREATEGROUP_SYNC DPNOP_SYNC
  147. #define DPNDESTROYGROUP_SYNC DPNOP_SYNC
  148. #define DPNENUM_PLAYERS 0x0001
  149. #define DPNENUM_GROUPS 0x0010
  150. #define DPNENUMHOSTS_SYNC DPNOP_SYNC
  151. #define DPNENUMHOSTS_OKTOQUERYFORADDRESSING 0x0001
  152. #define DPNENUMHOSTS_NOBROADCASTFALLBACK 0x0002
  153. #define DPNENUMSERVICEPROVIDERS_ALL 0x0001
  154. #define DPNGETSENDQUEUEINFO_PRIORITY_NORMAL 0x0001
  155. #define DPNGETSENDQUEUEINFO_PRIORITY_HIGH 0x0002
  156. #define DPNGETSENDQUEUEINFO_PRIORITY_LOW 0x0004
  157. #define DPNGROUP_AUTODESTRUCT 0x0001
  158. #define DPNHOST_OKTOQUERYFORADDRESSING 0x0001
  159. #define DPNINFO_NAME 0x0001
  160. #define DPNINFO_DATA 0x0002
  161. #define DPNINITIALIZE_DISABLEPARAMVAL 0x0001
  162. #define DPNLOBBY_REGISTER 0x0001
  163. #define DPNLOBBY_UNREGISTER 0x0002
  164. #define DPNPLAYER_LOCAL 0x0002
  165. #define DPNPLAYER_HOST 0x0004
  166. #define DPNREMOVEPLAYERFROMGROUP_SYNC DPNOP_SYNC
  167. #define DPNSEND_SYNC DPNOP_SYNC
  168. #define DPNSEND_NOCOPY 0x0001
  169. #define DPNSEND_NOCOMPLETE 0x0002
  170. #define DPNSEND_COMPLETEONPROCESS 0x0004
  171. #define DPNSEND_GUARANTEED 0x0008
  172. #define DPNSEND_NONSEQUENTIAL 0x0010
  173. #define DPNSEND_NOLOOPBACK 0x0020
  174. #define DPNSEND_PRIORITY_LOW 0x0040
  175. #define DPNSEND_PRIORITY_HIGH 0x0080
  176. #define DPNSESSION_CLIENT_SERVER 0x0001
  177. #define DPNSESSION_MIGRATE_HOST 0x0004
  178. #define DPNSESSION_NODPNSVR 0x0040
  179. #define DPNSESSION_REQUIREPASSWORD 0x0080
  180. #define DPNSETCLIENTINFO_SYNC DPNOP_SYNC
  181. #define DPNSETGROUPINFO_SYNC DPNOP_SYNC
  182. #define DPNSETPEERINFO_SYNC DPNOP_SYNC
  183. #define DPNSETSERVERINFO_SYNC DPNOP_SYNC
  184. #define DPNSPCAPS_SUPPORTSDPNSRV 0x0001
  185. #define DPNSPCAPS_SUPPORTSBROADCAST 0x0002
  186. #define DPNSPCAPS_SUPPORTSALLADAPTERS 0x0004
  187. /*****************************************************************************
  188. * DirectPlay8 structures Typedefs
  189. */
  190. typedef struct _DPN_APPLICATION_DESC {
  191. DWORD dwSize;
  192. DWORD dwFlags;
  193. GUID guidInstance;
  194. GUID guidApplication;
  195. DWORD dwMaxPlayers;
  196. DWORD dwCurrentPlayers;
  197. WCHAR* pwszSessionName;
  198. WCHAR* pwszPassword;
  199. PVOID pvReservedData;
  200. DWORD dwReservedDataSize;
  201. PVOID pvApplicationReservedData;
  202. DWORD dwApplicationReservedDataSize;
  203. } DPN_APPLICATION_DESC, *PDPN_APPLICATION_DESC;
  204. typedef struct _BUFFERDESC {
  205. DWORD dwBufferSize;
  206. BYTE* pBufferData;
  207. } BUFFERDESC, DPN_BUFFER_DESC, *PDPN_BUFFER_DESC, *PBUFFERDESC;
  208. typedef struct _DPN_CAPS {
  209. DWORD dwSize;
  210. DWORD dwFlags;
  211. DWORD dwConnectTimeout;
  212. DWORD dwConnectRetries;
  213. DWORD dwTimeoutUntilKeepAlive;
  214. } DPN_CAPS, *PDPN_CAPS;
  215. typedef struct _DPN_CONNECTION_INFO {
  216. DWORD dwSize;
  217. DWORD dwRoundTripLatencyMS;
  218. DWORD dwThroughputBPS;
  219. DWORD dwPeakThroughputBPS;
  220. DWORD dwBytesSentGuaranteed;
  221. DWORD dwPacketsSentGuaranteed;
  222. DWORD dwBytesSentNonGuaranteed;
  223. DWORD dwPacketsSentNonGuaranteed;
  224. DWORD dwBytesRetried;
  225. DWORD dwPacketsRetried;
  226. DWORD dwBytesDropped;
  227. DWORD dwPacketsDropped;
  228. DWORD dwMessagesTransmittedHighPriority;
  229. DWORD dwMessagesTimedOutHighPriority;
  230. DWORD dwMessagesTransmittedNormalPriority;
  231. DWORD dwMessagesTimedOutNormalPriority;
  232. DWORD dwMessagesTransmittedLowPriority;
  233. DWORD dwMessagesTimedOutLowPriority;
  234. DWORD dwBytesReceivedGuaranteed;
  235. DWORD dwPacketsReceivedGuaranteed;
  236. DWORD dwBytesReceivedNonGuaranteed;
  237. DWORD dwPacketsReceivedNonGuaranteed;
  238. DWORD dwMessagesReceived;
  239. } DPN_CONNECTION_INFO, *PDPN_CONNECTION_INFO;
  240. typedef struct _DPN_GROUP_INFO {
  241. DWORD dwSize;
  242. DWORD dwInfoFlags;
  243. PWSTR pwszName;
  244. PVOID pvData;
  245. DWORD dwDataSize;
  246. DWORD dwGroupFlags;
  247. } DPN_GROUP_INFO, *PDPN_GROUP_INFO;
  248. typedef struct _DPN_PLAYER_INFO {
  249. DWORD dwSize;
  250. DWORD dwInfoFlags;
  251. PWSTR pwszName;
  252. PVOID pvData;
  253. DWORD dwDataSize;
  254. DWORD dwPlayerFlags;
  255. } DPN_PLAYER_INFO, *PDPN_PLAYER_INFO;
  256. typedef struct _DPN_SERVICE_PROVIDER_INFO {
  257. DWORD dwFlags;
  258. GUID guid;
  259. WCHAR* pwszName;
  260. PVOID pvReserved;
  261. DWORD dwReserved;
  262. } DPN_SERVICE_PROVIDER_INFO, *PDPN_SERVICE_PROVIDER_INFO;
  263. typedef struct _DPN_SP_CAPS {
  264. DWORD dwSize;
  265. DWORD dwFlags;
  266. DWORD dwNumThreads;
  267. DWORD dwDefaultEnumCount;
  268. DWORD dwDefaultEnumRetryInterval;
  269. DWORD dwDefaultEnumTimeout;
  270. DWORD dwMaxEnumPayloadSize;
  271. DWORD dwBuffersPerThread;
  272. DWORD dwSystemBufferSize;
  273. } DPN_SP_CAPS, *PDPN_SP_CAPS;
  274. typedef struct _DPN_SECURITY_CREDENTIALS DPN_SECURITY_CREDENTIALS, *PDPN_SECURITY_CREDENTIALS;
  275. typedef struct _DPN_SECURITY_DESC DPN_SECURITY_DESC, *PDPN_SECURITY_DESC;
  276. typedef struct _DPNMSG_ADD_PLAYER_TO_GROUP {
  277. DWORD dwSize;
  278. DPNID dpnidGroup;
  279. PVOID pvGroupContext;
  280. DPNID dpnidPlayer;
  281. PVOID pvPlayerContext;
  282. } DPNMSG_ADD_PLAYER_TO_GROUP, *PDPNMSG_ADD_PLAYER_TO_GROUP;
  283. typedef struct _DPNMSG_ASYNC_OP_COMPLETE {
  284. DWORD dwSize;
  285. DPNHANDLE hAsyncOp;
  286. PVOID pvUserContext;
  287. HRESULT hResultCode;
  288. } DPNMSG_ASYNC_OP_COMPLETE, *PDPNMSG_ASYNC_OP_COMPLETE;
  289. typedef struct _DPNMSG_CLIENT_INFO {
  290. DWORD dwSize;
  291. DPNID dpnidClient;
  292. PVOID pvPlayerContext;
  293. } DPNMSG_CLIENT_INFO, *PDPNMSG_CLIENT_INFO;
  294. typedef struct _DPNMSG_CONNECT_COMPLETE {
  295. DWORD dwSize;
  296. DPNHANDLE hAsyncOp;
  297. PVOID pvUserContext;
  298. HRESULT hResultCode;
  299. PVOID pvApplicationReplyData;
  300. DWORD dwApplicationReplyDataSize;
  301. } DPNMSG_CONNECT_COMPLETE, *PDPNMSG_CONNECT_COMPLETE;
  302. typedef struct _DPNMSG_CREATE_GROUP {
  303. DWORD dwSize;
  304. DPNID dpnidGroup;
  305. DPNID dpnidOwner;
  306. PVOID pvGroupContext;
  307. } DPNMSG_CREATE_GROUP, *PDPNMSG_CREATE_GROUP;
  308. typedef struct _DPNMSG_CREATE_PLAYER {
  309. DWORD dwSize;
  310. DPNID dpnidPlayer;
  311. PVOID pvPlayerContext;
  312. } DPNMSG_CREATE_PLAYER, *PDPNMSG_CREATE_PLAYER;
  313. typedef struct _DPNMSG_DESTROY_GROUP {
  314. DWORD dwSize;
  315. DPNID dpnidGroup;
  316. PVOID pvGroupContext;
  317. DWORD dwReason;
  318. } DPNMSG_DESTROY_GROUP, *PDPNMSG_DESTROY_GROUP;
  319. typedef struct _DPNMSG_DESTROY_PLAYER {
  320. DWORD dwSize;
  321. DPNID dpnidPlayer;
  322. PVOID pvPlayerContext;
  323. DWORD dwReason;
  324. } DPNMSG_DESTROY_PLAYER, *PDPNMSG_DESTROY_PLAYER;
  325. typedef struct _DPNMSG_ENUM_HOSTS_QUERY {
  326. DWORD dwSize;
  327. IDirectPlay8Address* pAddressSender;
  328. IDirectPlay8Address* pAddressDevice;
  329. PVOID pvReceivedData;
  330. DWORD dwReceivedDataSize;
  331. DWORD dwMaxResponseDataSize;
  332. PVOID pvResponseData;
  333. DWORD dwResponseDataSize;
  334. PVOID pvResponseContext;
  335. } DPNMSG_ENUM_HOSTS_QUERY, *PDPNMSG_ENUM_HOSTS_QUERY;
  336. typedef struct _DPNMSG_ENUM_HOSTS_RESPONSE {
  337. DWORD dwSize;
  338. IDirectPlay8Address* pAddressSender;
  339. IDirectPlay8Address* pAddressDevice;
  340. const DPN_APPLICATION_DESC* pApplicationDescription;
  341. PVOID pvResponseData;
  342. DWORD dwResponseDataSize;
  343. PVOID pvUserContext;
  344. DWORD dwRoundTripLatencyMS;
  345. } DPNMSG_ENUM_HOSTS_RESPONSE, *PDPNMSG_ENUM_HOSTS_RESPONSE;
  346. typedef struct _DPNMSG_GROUP_INFO {
  347. DWORD dwSize;
  348. DPNID dpnidGroup;
  349. PVOID pvGroupContext;
  350. } DPNMSG_GROUP_INFO, *PDPNMSG_GROUP_INFO;
  351. typedef struct _DPNMSG_HOST_MIGRATE {
  352. DWORD dwSize;
  353. DPNID dpnidNewHost;
  354. PVOID pvPlayerContext;
  355. } DPNMSG_HOST_MIGRATE, *PDPNMSG_HOST_MIGRATE;
  356. typedef struct _DPNMSG_INDICATE_CONNECT {
  357. DWORD dwSize;
  358. PVOID pvUserConnectData;
  359. DWORD dwUserConnectDataSize;
  360. PVOID pvReplyData;
  361. DWORD dwReplyDataSize;
  362. PVOID pvReplyContext;
  363. PVOID pvPlayerContext;
  364. IDirectPlay8Address* pAddressPlayer;
  365. IDirectPlay8Address* pAddressDevice;
  366. } DPNMSG_INDICATE_CONNECT, *PDPNMSG_INDICATE_CONNECT;
  367. typedef struct _DPNMSG_INDICATED_CONNECT_ABORTED {
  368. DWORD dwSize;
  369. PVOID pvPlayerContext;
  370. } DPNMSG_INDICATED_CONNECT_ABORTED, *PDPNMSG_INDICATED_CONNECT_ABORTED;
  371. typedef struct _DPNMSG_PEER_INFO {
  372. DWORD dwSize;
  373. DPNID dpnidPeer;
  374. PVOID pvPlayerContext;
  375. } DPNMSG_PEER_INFO, *PDPNMSG_PEER_INFO;
  376. typedef struct _DPNMSG_RECEIVE {
  377. DWORD dwSize;
  378. DPNID dpnidSender;
  379. PVOID pvPlayerContext;
  380. PBYTE pReceiveData;
  381. DWORD dwReceiveDataSize;
  382. DPNHANDLE hBufferHandle;
  383. } DPNMSG_RECEIVE, *PDPNMSG_RECEIVE;
  384. typedef struct _DPNMSG_REMOVE_PLAYER_FROM_GROUP {
  385. DWORD dwSize;
  386. DPNID dpnidGroup;
  387. PVOID pvGroupContext;
  388. DPNID dpnidPlayer;
  389. PVOID pvPlayerContext;
  390. } DPNMSG_REMOVE_PLAYER_FROM_GROUP, *PDPNMSG_REMOVE_PLAYER_FROM_GROUP;
  391. typedef struct _DPNMSG_RETURN_BUFFER {
  392. DWORD dwSize;
  393. HRESULT hResultCode;
  394. PVOID pvBuffer;
  395. PVOID pvUserContext;
  396. } DPNMSG_RETURN_BUFFER, *PDPNMSG_RETURN_BUFFER;
  397. typedef struct _DPNMSG_SEND_COMPLETE {
  398. DWORD dwSize;
  399. DPNHANDLE hAsyncOp;
  400. PVOID pvUserContext;
  401. HRESULT hResultCode;
  402. DWORD dwSendTime;
  403. } DPNMSG_SEND_COMPLETE, *PDPNMSG_SEND_COMPLETE;
  404. typedef struct _DPNMSG_SERVER_INFO {
  405. DWORD dwSize;
  406. DPNID dpnidServer;
  407. PVOID pvPlayerContext;
  408. } DPNMSG_SERVER_INFO, *PDPNMSG_SERVER_INFO;
  409. typedef struct _DPNMSG_TERMINATE_SESSION {
  410. DWORD dwSize;
  411. HRESULT hResultCode;
  412. PVOID pvTerminateData;
  413. DWORD dwTerminateDataSize;
  414. } DPNMSG_TERMINATE_SESSION, *PDPNMSG_TERMINATE_SESSION;
  415. /*****************************************************************************
  416. * Predeclare the interfaces
  417. */
  418. DEFINE_GUID(CLSID_DirectPlay8Peer, 0x286f484d,0x375e,0x4458,0xa2,0x72,0xb1,0x38,0xe2,0xf8,0xa,0x6a);
  419. DEFINE_GUID(CLSID_DirectPlay8Client, 0x743f1dc6,0x5aba,0x429f,0x8b,0xdf,0xc5,0x4d,0x3,0x25,0x3d,0xc2);
  420. DEFINE_GUID(CLSID_DirectPlay8Server, 0xda825e1b,0x6830,0x43d7,0x83,0x5d,0xb,0x5a,0xd8,0x29,0x56,0xa2);
  421. DEFINE_GUID(IID_IDirectPlay8Peer, 0x5102dacf,0x241b,0x11d3,0xae,0xa7,0x0,0x60,0x97,0xb0,0x14,0x11);
  422. typedef struct IDirectPlay8Peer IDirectPlay8Peer, *PDIRECTPLAY8PEER;
  423. DEFINE_GUID(IID_IDirectPlay8Client, 0x5102dacd,0x241b,0x11d3,0xae,0xa7,0x0,0x60,0x97,0xb0,0x14,0x11);
  424. typedef struct IDirectPlay8Client IDirectPlay8Client, *PDIRECTPLAY8CLIENT;
  425. DEFINE_GUID(IID_IDirectPlay8Server, 0x5102dace,0x241b,0x11d3,0xae,0xa7,0x0,0x60,0x97,0xb0,0x14,0x11);
  426. typedef struct IDirectPlay8Server IDirectPlay8Server, *PDIRECTPLAY8SERVER;
  427. DEFINE_GUID(CLSID_DP8SP_IPX, 0x53934290,0x628d,0x11d2,0xae,0xf,0x0,0x60,0x97,0xb0,0x14,0x11);
  428. DEFINE_GUID(CLSID_DP8SP_TCPIP, 0xebfe7ba0,0x628d,0x11d2,0xae,0xf,0x0,0x60,0x97,0xb0,0x14,0x11);
  429. DEFINE_GUID(CLSID_DP8SP_SERIAL, 0x743b5d60,0x628d,0x11d2,0xae,0xf,0x0,0x60,0x97,0xb0,0x14,0x11);
  430. DEFINE_GUID(CLSID_DP8SP_MODEM, 0x6d4a3650,0x628d,0x11d2,0xae,0xf,0x0,0x60,0x97,0xb0,0x14,0x11);
  431. typedef struct IDirectPlay8LobbiedApplication *PIDirectPlay8LobbiedApplication, DNLOBBIEDAPPLICATION;
  432. /*****************************************************************************
  433. * IDirectPlay8Client interface
  434. */
  435. #define INTERFACE IDirectPlay8Client
  436. DECLARE_INTERFACE_(IDirectPlay8Client,IUnknown)
  437. {
  438. /*** IUnknown methods ***/
  439. STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
  440. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  441. STDMETHOD_(ULONG,Release)(THIS) PURE;
  442. /*** IDirectPlay8Client methods ***/
  443. STDMETHOD(Initialize)(THIS_ PVOID CONST pvUserContext, CONST PFNDPNMESSAGEHANDLER pfn, CONST DWORD dwFlags) PURE;
  444. 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;
  445. 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;
  446. STDMETHOD(CancelAsyncOperation)(THIS_ CONST DPNHANDLE hAsyncHandle, CONST DWORD dwFlags) PURE;
  447. 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;
  448. 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;
  449. STDMETHOD(GetSendQueueInfo)(THIS_ DWORD * CONST pdwNumMsgs, DWORD * CONST pdwNumBytes, CONST DWORD dwFlags) PURE;
  450. STDMETHOD(GetApplicationDesc)(THIS_ DPN_APPLICATION_DESC * CONST pAppDescBuffer, DWORD * CONST pcbDataSize, CONST DWORD dwFlags) PURE;
  451. STDMETHOD(SetClientInfo)(THIS_ CONST DPN_PLAYER_INFO * CONST pdpnPlayerInfo, PVOID CONST pvAsyncContext, DPNHANDLE * CONST phAsyncHandle, CONST DWORD dwFlags) PURE;
  452. STDMETHOD(GetServerInfo)(THIS_ DPN_PLAYER_INFO * CONST pdpnPlayerInfo, DWORD * CONST pdwSize, CONST DWORD dwFlags) PURE;
  453. STDMETHOD(GetServerAddress)(THIS_ IDirectPlay8Address ** CONST pAddress, CONST DWORD dwFlags) PURE;
  454. STDMETHOD(Close)(THIS_ CONST DWORD dwFlags) PURE;
  455. STDMETHOD(ReturnBuffer)(THIS_ CONST DPNHANDLE hBufferHandle, CONST DWORD dwFlags) PURE;
  456. STDMETHOD(GetCaps)(THIS_ DPN_CAPS * CONST pdpCaps, CONST DWORD dwFlags) PURE;
  457. STDMETHOD(SetCaps)(THIS_ CONST DPN_CAPS * CONST pdpCaps, CONST DWORD dwFlags) PURE;
  458. STDMETHOD(SetSPCaps)(THIS_ CONST GUID * CONST pguidSP, CONST DPN_SP_CAPS * CONST pdpspCaps, CONST DWORD dwFlags ) PURE;
  459. STDMETHOD(GetSPCaps)(THIS_ CONST GUID * CONST pguidSP, DPN_SP_CAPS * CONST pdpspCaps, CONST DWORD dwFlags) PURE;
  460. STDMETHOD(GetConnectionInfo)(THIS_ DPN_CONNECTION_INFO * CONST pdpConnectionInfo, CONST DWORD dwFlags) PURE;
  461. STDMETHOD(RegisterLobby)(THIS_ CONST DPNHANDLE dpnHandle, struct IDirectPlay8LobbiedApplication * CONST pIDP8LobbiedApplication, CONST DWORD dwFlags) PURE;
  462. };
  463. #undef INTERFACE
  464. #if !defined(__cplusplus) || defined(CINTERFACE)
  465. /*** IUnknown methods ***/
  466. #define IDirectPlay8Client_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  467. #define IDirectPlay8Client_AddRef(p) (p)->lpVtbl->AddRef(p)
  468. #define IDirectPlay8Client_Release(p) (p)->lpVtbl->Release(p)
  469. /*** IDirectPlay8Client methods ***/
  470. #define IDirectPlay8Client_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c)
  471. #define IDirectPlay8Client_EnumServiceProviders(p,a,b,c,d,e,f) (p)->lpVtbl->EnumServiceProviders(p,a,b,c,d,e,f)
  472. #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)
  473. #define IDirectPlay8Client_CancelAsyncOperation(p,a,b) (p)->lpVtbl->CancelAsyncOperation(p,a,b)
  474. #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)
  475. #define IDirectPlay8Client_Send(p,a,b,c,d,e,f) (p)->lpVtbl->Send(p,a,b,c,d,e,f)
  476. #define IDirectPlay8Client_GetSendQueueInfo(p,a,b,c) (p)->lpVtbl->GetSendQueueInfo(p,a,b,c)
  477. #define IDirectPlay8Client_GetApplicationDesc(p,a,b,c) (p)->lpVtbl->GetApplicationDesc(p,a,b,c)
  478. #define IDirectPlay8Client_SetClientInfo(p,a,b,c,d) (p)->lpVtbl->SetClientInfo(p,a,b,c,d)
  479. #define IDirectPlay8Client_GetServerInfo(p,a,b,c) (p)->lpVtbl->GetServerInfo(p,a,b,c)
  480. #define IDirectPlay8Client_GetServerAddress(p,a,b) (p)->lpVtbl->GetServerAddress(p,a,b)
  481. #define IDirectPlay8Client_Close(p,a) (p)->lpVtbl->Close(p,a)
  482. #define IDirectPlay8Client_ReturnBuffer(p,a,b) (p)->lpVtbl->ReturnBuffer(p,a,b)
  483. #define IDirectPlay8Client_GetCaps(p,a,b) (p)->lpVtbl->GetCaps(p,a,b)
  484. #define IDirectPlay8Client_SetCaps(p,a,b) (p)->lpVtbl->SetCaps(p,a,b)
  485. #define IDirectPlay8Client_SetSPCaps(p,a,b,c) (p)->lpVtbl->SetSPCaps(p,a,b,c)
  486. #define IDirectPlay8Client_GetSPCaps(p,a,b,c) (p)->lpVtbl->GetSPCaps(p,a,b,c)
  487. #define IDirectPlay8Client_GetConnectionInfo(p,a,b) (p)->lpVtbl->GetConnectionInfo(p,a,b)
  488. #define IDirectPlay8Client_RegisterLobby(p,a,b,c) (p)->lpVtbl->RegisterLobby(p,a,b,c)
  489. #else
  490. /*** IUnknown methods ***/
  491. #define IDirectPlay8Client_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  492. #define IDirectPlay8Client_AddRef(p) (p)->AddRef()
  493. #define IDirectPlay8Client_Release(p) (p)->Release()
  494. /*** IDirectPlay8Client methods ***/
  495. #define IDirectPlay8Client_Initialize(p,a,b,c) (p)->Initialize(a,b,c)
  496. #define IDirectPlay8Client_EnumServiceProviders(p,a,b,c,d,e,f) (p)->EnumServiceProviders(a,b,c,d,e,f)
  497. #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)
  498. #define IDirectPlay8Client_CancelAsyncOperation(p,a,b) (p)->CancelAsyncOperation(a,b)
  499. #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)
  500. #define IDirectPlay8Client_Send(p,a,b,c,d,e,f) (p)->Send(a,b,c,d,e,f)
  501. #define IDirectPlay8Client_GetSendQueueInfo(p,a,b,c) (p)->GetSendQueueInfo(a,b,c)
  502. #define IDirectPlay8Client_GetApplicationDesc(p,a,b,c) (p)->GetApplicationDesc(a,b,c)
  503. #define IDirectPlay8Client_SetClientInfo(p,a,b,c,d) (p)->SetClientInfo(a,b,c,d)
  504. #define IDirectPlay8Client_GetServerInfo(p,a,b,c) (p)->GetServerInfo(a,b,c)
  505. #define IDirectPlay8Client_GetServerAddress(p,a,b) (p)->GetServerAddress(a,b)
  506. #define IDirectPlay8Client_Close(p,a) (p)->Close(a)
  507. #define IDirectPlay8Client_ReturnBuffer(p,a,b) (p)->ReturnBuffer(a,b)
  508. #define IDirectPlay8Client_GetCaps(p,a,b) (p)->GetCaps(a,b)
  509. #define IDirectPlay8Client_SetCaps(p,a,b) (p)->SetCaps(a,b)
  510. #define IDirectPlay8Client_SetSPCaps(p,a,b,c) (p)->SetSPCaps(a,b,c)
  511. #define IDirectPlay8Client_GetSPCaps(p,a,b,c) (p)->GetSPCaps(a,b,c)
  512. #define IDirectPlay8Client_GetConnectionInfo(p,a,b) (p)->GetConnectionInfo(a,b)
  513. #define IDirectPlay8Client_RegisterLobby(p,a,b,c) (p)->RegisterLobby(a,b,c)
  514. #endif
  515. /*****************************************************************************
  516. * IDirectPlay8Server interface
  517. */
  518. #define INTERFACE IDirectPlay8Server
  519. DECLARE_INTERFACE_(IDirectPlay8Server,IUnknown)
  520. {
  521. /*** IUnknown methods ***/
  522. STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
  523. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  524. STDMETHOD_(ULONG,Release)(THIS) PURE;
  525. /*** IDirectPlay8Server methods ***/
  526. STDMETHOD(Initialize)(THIS_ PVOID CONST pvUserContext, CONST PFNDPNMESSAGEHANDLER pfn, CONST DWORD dwFlags) PURE;
  527. 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;
  528. STDMETHOD(CancelAsyncOperation)(THIS_ CONST DPNHANDLE hAsyncHandle, CONST DWORD dwFlags) PURE;
  529. STDMETHOD(GetSendQueueInfo)(THIS_ CONST DPNID dpnid, DWORD * CONST pdwNumMsgs, DWORD * CONST pdwNumBytes, CONST DWORD dwFlags) PURE;
  530. STDMETHOD(GetApplicationDesc)(THIS_ DPN_APPLICATION_DESC * CONST pAppDescBuffer, DWORD * CONST pcbDataSize, CONST DWORD dwFlags) PURE;
  531. STDMETHOD(SetServerInfo)(THIS_ CONST DPN_PLAYER_INFO * CONST pdpnPlayerInfo, PVOID CONST pvAsyncContext, DPNHANDLE * CONST phAsyncHandle, CONST DWORD dwFlags) PURE;
  532. STDMETHOD(GetClientInfo)(THIS_ CONST DPNID dpnid, DPN_PLAYER_INFO * CONST pdpnPlayerInfo, DWORD * CONST pdwSize, CONST DWORD dwFlags) PURE;
  533. STDMETHOD(GetClientAddress)(THIS_ CONST DPNID dpnid, IDirectPlay8Address ** CONST pAddress, CONST DWORD dwFlags) PURE;
  534. STDMETHOD(GetLocalHostAddresses)(THIS_ IDirectPlay8Address ** CONST prgpAddress, DWORD * CONST pcAddress, CONST DWORD dwFlags) PURE;
  535. STDMETHOD(SetApplicationDesc)(THIS_ CONST DPN_APPLICATION_DESC * CONST pad, CONST DWORD dwFlags) PURE;
  536. 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;
  537. 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;
  538. STDMETHOD(CreateGroup)(THIS_ CONST DPN_GROUP_INFO * CONST pdpnGroupInfo, void * CONST pvGroupContext, void * CONST pvAsyncContext, DPNHANDLE * CONST phAsyncHandle, CONST DWORD dwFlags) PURE;
  539. STDMETHOD(DestroyGroup)(THIS_ CONST DPNID idGroup, PVOID CONST pvAsyncContext, DPNHANDLE * CONST phAsyncHandle, CONST DWORD dwFlags) PURE;
  540. STDMETHOD(AddPlayerToGroup)(THIS_ CONST DPNID idGroup, CONST DPNID idClient, PVOID CONST pvAsyncContext, DPNHANDLE * CONST phAsyncHandle, CONST DWORD dwFlags) PURE;
  541. STDMETHOD(RemovePlayerFromGroup)(THIS_ CONST DPNID idGroup, CONST DPNID idClient, PVOID CONST pvAsyncContext, DPNHANDLE * CONST phAsyncHandle, CONST DWORD dwFlags) PURE;
  542. STDMETHOD(SetGroupInfo)(THIS_ CONST DPNID dpnid, DPN_GROUP_INFO * CONST pdpnGroupInfo, PVOID CONST pvAsyncContext, DPNHANDLE * CONST phAsyncHandle, CONST DWORD dwFlags) PURE;
  543. STDMETHOD(GetGroupInfo)(THIS_ CONST DPNID dpnid, DPN_GROUP_INFO * CONST pdpnGroupInfo, DWORD * CONST pdwSize, CONST DWORD dwFlags) PURE;
  544. STDMETHOD(EnumPlayersAndGroups)(THIS_ DPNID * CONST prgdpnid, DWORD * CONST pcdpnid, CONST DWORD dwFlags) PURE;
  545. STDMETHOD(EnumGroupMembers)(THIS_ CONST DPNID dpnid, DPNID * CONST prgdpnid, DWORD * CONST pcdpnid, CONST DWORD dwFlags) PURE;
  546. STDMETHOD(Close)(THIS_ CONST DWORD dwFlags) PURE;
  547. STDMETHOD(DestroyClient)(THIS_ CONST DPNID dpnidClient, CONST void * CONST pvDestroyData, CONST DWORD dwDestroyDataSize, CONST DWORD dwFlags) PURE;
  548. STDMETHOD(ReturnBuffer)(THIS_ CONST DPNHANDLE hBufferHandle, CONST DWORD dwFlags) PURE;
  549. STDMETHOD(GetPlayerContext)(THIS_ CONST DPNID dpnid, PVOID * CONST ppvPlayerContext, CONST DWORD dwFlags) PURE;
  550. STDMETHOD(GetGroupContext)(THIS_ CONST DPNID dpnid, PVOID * CONST ppvGroupContext, CONST DWORD dwFlags) PURE;
  551. STDMETHOD(GetCaps)(THIS_ DPN_CAPS * CONST pdpCaps, CONST DWORD dwFlags) PURE;
  552. STDMETHOD(SetCaps)(THIS_ CONST DPN_CAPS * CONST pdpCaps, CONST DWORD dwFlags) PURE;
  553. STDMETHOD(SetSPCaps)(THIS_ CONST GUID * CONST pguidSP, CONST DPN_SP_CAPS * CONST pdpspCaps, CONST DWORD dwFlags ) PURE;
  554. STDMETHOD(GetSPCaps)(THIS_ CONST GUID * CONST pguidSP, DPN_SP_CAPS * CONST pdpspCaps, CONST DWORD dwFlags) PURE;
  555. STDMETHOD(GetConnectionInfo)(THIS_ CONST DPNID dpnid, DPN_CONNECTION_INFO * CONST pdpConnectionInfo, CONST DWORD dwFlags) PURE;
  556. STDMETHOD(RegisterLobby)(THIS_ CONST DPNHANDLE dpnHandle, struct IDirectPlay8LobbiedApplication * CONST pIDP8LobbiedApplication, CONST DWORD dwFlags) PURE;
  557. };
  558. #undef INTERFACE
  559. #if !defined(__cplusplus) || defined(CINTERFACE)
  560. /*** IUnknown methods ***/
  561. #define IDirectPlay8Server_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  562. #define IDirectPlay8Server_AddRef(p) (p)->lpVtbl->AddRef(p)
  563. #define IDirectPlay8Server_Release(p) (p)->lpVtbl->Release(p)
  564. /*** IDirectPlay8Server methods ***/
  565. #define IDirectPlay8Server_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c)
  566. #define IDirectPlay8Server_EnumServiceProviders(p,a,b,c,d,e,f) (p)->lpVtbl->EnumServiceProviders(p,a,b,c,d,e,f)
  567. #define IDirectPlay8Server_CancelAsyncOperation(p,a,b) (p)->lpVtbl->CancelAsyncOperation(p,a,b)
  568. #define IDirectPlay8Server_GetSendQueueInfo(p,a,b,c,d) (p)->lpVtbl->GetSendQueueInfo(p,a,b,c,d)
  569. #define IDirectPlay8Server_GetApplicationDesc(p,a,b,c) (p)->lpVtbl->GetApplicationDesc(p,a,b,c)
  570. #define IDirectPlay8Server_SetServerInfo(p,a,b,c,d) (p)->lpVtbl->SetServerInfo(p,a,b,c,d)
  571. #define IDirectPlay8Server_GetClientInfo(p,a,b,c,d) (p)->lpVtbl->GetClientInfo(p,a,b,c,d)
  572. #define IDirectPlay8Server_GetClientAddress(p,a,b,c) (p)->lpVtbl->GetClientAddress(p,a,b,c)
  573. #define IDirectPlay8Server_GetLocalHostAddresses(p,a,b,c) (p)->lpVtbl->GetLocalHostAddresses(p,a,b,c)
  574. #define IDirectPlay8Server_SetApplicationDesc(p,a,b) (p)->lpVtbl->SetApplicationDesc(p,a,b)
  575. #define IDirectPlay8Server_Host(p,a,b,c,d,e,f,g) (p)->lpVtbl->Host(p,a,b,c,d,e,f,g)
  576. #define IDirectPlay8Server_SendTo(p,a,b,c,d,e,f,g) (p)->lpVtbl->SendTo(p,a,b,c,d,e,f,g)
  577. #define IDirectPlay8Server_CreateGroup(p,a,b,c,d,e) (p)->lpVtbl->CreateGroup(p,a,b,c,d,e)
  578. #define IDirectPlay8Server_DestroyGroup(p,a,b,c,d) (p)->lpVtbl->DestroyGroup(p,a,b,c,d)
  579. #define IDirectPlay8Server_AddPlayerToGroup(p,a,b,c,d,e) (p)->lpVtbl->AddPlayerToGroup(p,a,b,c,d,e)
  580. #define IDirectPlay8Server_RemovePlayerFromGroup(p,a,b,c,d,e) (p)->lpVtbl->RemovePlayerFromGroup(p,a,b,c,d,e)
  581. #define IDirectPlay8Server_SetGroupInfo(p,a,b,c,d,e) (p)->lpVtbl->SetGroupInfo(p,a,b,c,d,e)
  582. #define IDirectPlay8Server_GetGroupInfo(p,a,b,c,d) (p)->lpVtbl->GetGroupInfo(p,a,b,c,d)
  583. #define IDirectPlay8Server_EnumPlayersAndGroups(p,a,b,c) (p)->lpVtbl->EnumPlayersAndGroups(p,a,b,c)
  584. #define IDirectPlay8Server_EnumGroupMembers(p,a,b,c,d) (p)->lpVtbl->EnumGroupMembers(p,a,b,c,d)
  585. #define IDirectPlay8Server_Close(p,a) (p)->lpVtbl->Close(p,a)
  586. #define IDirectPlay8Server_DestroyClient(p,a,b,c,d) (p)->lpVtbl->DestroyClient(p,a,b,c,d)
  587. #define IDirectPlay8Server_ReturnBuffer(p,a,b) (p)->lpVtbl->ReturnBuffer(p,a,b)
  588. #define IDirectPlay8Server_GetPlayerContext(p,a,b,c) (p)->lpVtbl->GetPlayerContext(p,a,b,c)
  589. #define IDirectPlay8Server_GetGroupContext(p,a,b,c) (p)->lpVtbl->GetGroupContext(p,a,b,c)
  590. #define IDirectPlay8Server_GetCaps(p,a,b) (p)->lpVtbl->GetCaps(p,a,b)
  591. #define IDirectPlay8Server_SetCaps(p,a,b) (p)->lpVtbl->SetCaps(p,a,b)
  592. #define IDirectPlay8Server_SetSPCaps(p,a,b,c) (p)->lpVtbl->SetSPCaps(p,a,b,c)
  593. #define IDirectPlay8Server_GetSPCaps(p,a,b,c) (p)->lpVtbl->GetSPCaps(p,a,b,c)
  594. #define IDirectPlay8Server_GetConnectionInfo(p,a,b,c) (p)->lpVtbl->GetConnectionInfo(p,a,b,c)
  595. #define IDirectPlay8Server_RegisterLobby(p,a,b,c) (p)->lpVtbl->RegisterLobby(p,a,b,c)
  596. #else
  597. /*** IUnknown methods ***/
  598. #define IDirectPlay8Server_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  599. #define IDirectPlay8Server_AddRef(p) (p)->AddRef()
  600. #define IDirectPlay8Server_Release(p) (p)->Release()
  601. /*** IDirectPlay8Server methods ***/
  602. #define IDirectPlay8Server_Initialize(p,a,b,c) (p)->Initialize(a,b,c)
  603. #define IDirectPlay8Server_EnumServiceProviders(p,a,b,c,d,e,f) (p)->EnumServiceProviders(a,b,c,d,e,f)
  604. #define IDirectPlay8Server_CancelAsyncOperation(p,a,b) (p)->CancelAsyncOperation(a,b)
  605. #define IDirectPlay8Server_GetSendQueueInfo(p,a,b,c,d) (p)->GetSendQueueInfo(a,b,c,d)
  606. #define IDirectPlay8Server_GetApplicationDesc(p,a,b,c) (p)->GetApplicationDesc(a,b,c)
  607. #define IDirectPlay8Server_SetServerInfo(p,a,b,c,d) (p)->SetServerInfo(a,b,c,d)
  608. #define IDirectPlay8Server_GetClientInfo(p,a,b,c,d) (p)->GetClientInfo(a,b,c,d)
  609. #define IDirectPlay8Server_GetClientAddress(p,a,b,c) (p)->GetClientAddress(a,b,c)
  610. #define IDirectPlay8Server_GetLocalHostAddresses(p,a,b,c) (p)->GetLocalHostAddresses(a,b,c)
  611. #define IDirectPlay8Server_SetApplicationDesc(p,a,b) (p)->SetApplicationDesc(a,b)
  612. #define IDirectPlay8Server_Host(p,a,b,c,d,e,f,g) (p)->Host(a,b,c,d,e,f,g)
  613. #define IDirectPlay8Server_SendTo(p,a,b,c,d,e,f,g) (p)->SendTo(a,b,c,d,e,f,g)
  614. #define IDirectPlay8Server_CreateGroup(p,a,b,c,d,e) (p)->CreateGroup(a,b,c,d,e)
  615. #define IDirectPlay8Server_DestroyGroup(p,a,b,c,d) (p)->DestroyGroup(a,b,c,d)
  616. #define IDirectPlay8Server_AddPlayerToGroup(p,a,b,c,d,e) (p)->AddPlayerToGroup(a,b,c,d,e)
  617. #define IDirectPlay8Server_RemovePlayerFromGroup(p,a,b,c,d,e) (p)->RemovePlayerFromGroup(a,b,c,d,e)
  618. #define IDirectPlay8Server_SetGroupInfo(p,a,b,c,d,e) (p)->SetGroupInfo(a,b,c,d,e)
  619. #define IDirectPlay8Server_GetGroupInfo(p,a,b,c,d) (p)->GetGroupInfo(a,b,c,d)
  620. #define IDirectPlay8Server_EnumPlayersAndGroups(p,a,b,c) (p)->EnumPlayersAndGroups(a,b,c)
  621. #define IDirectPlay8Server_EnumGroupMembers(p,a,b,c,d) (p)->EnumGroupMembers(a,b,c,d)
  622. #define IDirectPlay8Server_Close(p,a) (p)->Close(a)
  623. #define IDirectPlay8Server_DestroyClient(p,a,b,c,d) (p)->DestroyClient(a,b,c,d)
  624. #define IDirectPlay8Server_ReturnBuffer(p,a,b) (p)->ReturnBuffer(a,b)
  625. #define IDirectPlay8Server_GetPlayerContext(p,a,b,c) (p)->GetPlayerContext(a,b,c)
  626. #define IDirectPlay8Server_GetGroupContext(p,a,b,c) (p)->GetGroupContext(a,b,c)
  627. #define IDirectPlay8Server_GetCaps(p,a,b) (p)->GetCaps(a,b)
  628. #define IDirectPlay8Server_SetCaps(p,a,b) (p)->SetCaps(a,b)
  629. #define IDirectPlay8Server_SetSPCaps(p,a,b,c) (p)->SetSPCaps(a,b,c)
  630. #define IDirectPlay8Server_GetSPCaps(p,a,b,c) (p)->GetSPCaps(a,b,c)
  631. #define IDirectPlay8Server_GetConnectionInfo(p,a,b,c) (p)->GetConnectionInfo(a,b,c)
  632. #define IDirectPlay8Server_RegisterLobby(p,a,b,c) (p)->RegisterLobby(a,b,c)
  633. #endif
  634. /*****************************************************************************
  635. * IDirectPlay8Peer interface
  636. */
  637. #define INTERFACE IDirectPlay8Peer
  638. DECLARE_INTERFACE_(IDirectPlay8Peer,IUnknown)
  639. {
  640. /*** IUnknown methods ***/
  641. STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
  642. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  643. STDMETHOD_(ULONG,Release)(THIS) PURE;
  644. /*** IDirectPlay8Peer methods ***/
  645. STDMETHOD(Initialize)(THIS_ PVOID CONST pvUserContext, CONST PFNDPNMESSAGEHANDLER pfn, CONST DWORD dwFlags) PURE;
  646. 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;
  647. STDMETHOD(CancelAsyncOperation)(THIS_ CONST DPNHANDLE hAsyncHandle, CONST DWORD dwFlags) PURE;
  648. 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;
  649. 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;
  650. STDMETHOD(GetSendQueueInfo)(THIS_ CONST DPNID dpnid, DWORD* CONST pdwNumMsgs, DWORD* CONST pdwNumBytes, CONST DWORD dwFlags) PURE;
  651. 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;
  652. STDMETHOD(GetApplicationDesc)(THIS_ DPN_APPLICATION_DESC* CONST pAppDescBuffer, DWORD* CONST pcbDataSize, CONST DWORD dwFlags) PURE;
  653. STDMETHOD(SetApplicationDesc)(THIS_ CONST DPN_APPLICATION_DESC* CONST pad, CONST DWORD dwFlags) PURE;
  654. STDMETHOD(CreateGroup)(THIS_ CONST DPN_GROUP_INFO* CONST pdpnGroupInfo, void* CONST pvGroupContext, void* CONST pvAsyncContext, DPNHANDLE* CONST phAsyncHandle, CONST DWORD dwFlags) PURE;
  655. STDMETHOD(DestroyGroup)(THIS_ CONST DPNID idGroup, PVOID CONST pvAsyncContext, DPNHANDLE* CONST phAsyncHandle, CONST DWORD dwFlags) PURE;
  656. STDMETHOD(AddPlayerToGroup)(THIS_ CONST DPNID idGroup, CONST DPNID idClient, PVOID CONST pvAsyncContext, DPNHANDLE* CONST phAsyncHandle, CONST DWORD dwFlags) PURE;
  657. STDMETHOD(RemovePlayerFromGroup)(THIS_ CONST DPNID idGroup, CONST DPNID idClient, PVOID CONST pvAsyncContext, DPNHANDLE* CONST phAsyncHandle, CONST DWORD dwFlags) PURE;
  658. STDMETHOD(SetGroupInfo)(THIS_ CONST DPNID dpnid, DPN_GROUP_INFO* CONST pdpnGroupInfo,PVOID CONST pvAsyncContext, DPNHANDLE* CONST phAsyncHandle, CONST DWORD dwFlags) PURE;
  659. STDMETHOD(GetGroupInfo)(THIS_ CONST DPNID dpnid, DPN_GROUP_INFO* CONST pdpnGroupInfo, DWORD* CONST pdwSize, CONST DWORD dwFlags) PURE;
  660. STDMETHOD(EnumPlayersAndGroups)(THIS_ DPNID* CONST prgdpnid, DWORD* CONST pcdpnid, CONST DWORD dwFlags) PURE;
  661. STDMETHOD(EnumGroupMembers)(THIS_ CONST DPNID dpnid, DPNID* CONST prgdpnid, DWORD* CONST pcdpnid, CONST DWORD dwFlags) PURE;
  662. STDMETHOD(SetPeerInfo)(THIS_ CONST DPN_PLAYER_INFO* CONST pdpnPlayerInfo,PVOID CONST pvAsyncContext, DPNHANDLE* CONST phAsyncHandle, CONST DWORD dwFlags) PURE;
  663. STDMETHOD(GetPeerInfo)(THIS_ CONST DPNID dpnid, DPN_PLAYER_INFO* CONST pdpnPlayerInfo, DWORD* CONST pdwSize, CONST DWORD dwFlags) PURE;
  664. STDMETHOD(GetPeerAddress)(THIS_ CONST DPNID dpnid, IDirectPlay8Address** CONST pAddress, CONST DWORD dwFlags) PURE;
  665. STDMETHOD(GetLocalHostAddresses)(THIS_ IDirectPlay8Address** CONST prgpAddress, DWORD* CONST pcAddress, CONST DWORD dwFlags) PURE;
  666. STDMETHOD(Close)(THIS_ CONST DWORD dwFlags) PURE;
  667. 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;
  668. STDMETHOD(DestroyPeer)(THIS_ CONST DPNID dpnidClient, CONST void* CONST pvDestroyData, CONST DWORD dwDestroyDataSize, CONST DWORD dwFlags) PURE;
  669. STDMETHOD(ReturnBuffer)(THIS_ CONST DPNHANDLE hBufferHandle, CONST DWORD dwFlags) PURE;
  670. STDMETHOD(GetPlayerContext)(THIS_ CONST DPNID dpnid,PVOID* CONST ppvPlayerContext, CONST DWORD dwFlags) PURE;
  671. STDMETHOD(GetGroupContext)(THIS_ CONST DPNID dpnid,PVOID* CONST ppvGroupContext, CONST DWORD dwFlags) PURE;
  672. STDMETHOD(GetCaps)(THIS_ DPN_CAPS* CONST pdpCaps, CONST DWORD dwFlags) PURE;
  673. STDMETHOD(SetCaps)(THIS_ CONST DPN_CAPS* CONST pdpCaps, CONST DWORD dwFlags) PURE;
  674. STDMETHOD(SetSPCaps)(THIS_ CONST GUID* CONST pguidSP, CONST DPN_SP_CAPS* CONST pdpspCaps, CONST DWORD dwFlags ) PURE;
  675. STDMETHOD(GetSPCaps)(THIS_ CONST GUID* CONST pguidSP, DPN_SP_CAPS* CONST pdpspCaps, CONST DWORD dwFlags) PURE;
  676. STDMETHOD(GetConnectionInfo)(THIS_ CONST DPNID dpnid, DPN_CONNECTION_INFO* CONST pdpConnectionInfo, CONST DWORD dwFlags) PURE;
  677. STDMETHOD(RegisterLobby)(THIS_ CONST DPNHANDLE dpnHandle, struct IDirectPlay8LobbiedApplication* CONST pIDP8LobbiedApplication, CONST DWORD dwFlags) PURE;
  678. STDMETHOD(TerminateSession)(THIS_ void* CONST pvTerminateData, CONST DWORD dwTerminateDataSize, CONST DWORD dwFlags) PURE;
  679. };
  680. #undef INTERFACE
  681. #if !defined(__cplusplus) || defined(CINTERFACE)
  682. /*** IUnknown methods ***/
  683. #define IDirectPlay8Peer_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  684. #define IDirectPlay8Peer_AddRef(p) (p)->lpVtbl->AddRef(p)
  685. #define IDirectPlay8Peer_Release(p) (p)->lpVtbl->Release(p)
  686. /*** IDirectPlay8Peer methods ***/
  687. #define IDirectPlay8Peer_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c)
  688. #define IDirectPlay8Peer_EnumServiceProviders(p,a,b,c,d,e,f) (p)->lpVtbl->EnumServiceProviders(p,a,b,c,d,e,f)
  689. #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)
  690. #define IDirectPlay8Peer_CancelAsyncOperation(p,a,b) (p)->lpVtbl->CancelAsyncOperation(p,a,b)
  691. #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)
  692. #define IDirectPlay8Peer_SendTo(p,a,b,c,d,e,f,g) (p)->lpVtbl->SendTo(p,a,b,c,d,e,f,g)
  693. #define IDirectPlay8Peer_GetSendQueueInfo(p,a,b,c,d) (p)->lpVtbl->GetSendQueueInfo(p,a,b,c,d)
  694. #define IDirectPlay8Peer_Host(p,a,b,c,d,e,f,g) (p)->lpVtbl->Host(p,a,b,c,d,e,f,g)
  695. #define IDirectPlay8Peer_GetApplicationDesc(p,a,b,c) (p)->lpVtbl->GetApplicationDesc(p,a,b,c)
  696. #define IDirectPlay8Peer_SetApplicationDesc(p,a,b) (p)->lpVtbl->SetApplicationDesc(p,a,b)
  697. #define IDirectPlay8Peer_CreateGroup(p,a,b,c,d,e) (p)->lpVtbl->CreateGroup(p,a,b,c,d,e)
  698. #define IDirectPlay8Peer_DestroyGroup(p,a,b,c,d) (p)->lpVtbl->DestroyGroup(p,a,b,c,d)
  699. #define IDirectPlay8Peer_AddPlayerToGroup(p,a,b,c,d,e) (p)->lpVtbl->AddPlayerToGroup(p,a,b,c,d,e)
  700. #define IDirectPlay8Peer_RemovePlayerFromGroup(p,a,b,c,d,e) (p)->lpVtbl->RemovePlayerFromGroup(p,a,b,c,d,e)
  701. #define IDirectPlay8Peer_SetGroupInfo(p,a,b,c,d,e) (p)->lpVtbl->SetGroupInfo(p,a,b,c,d,e)
  702. #define IDirectPlay8Peer_GetGroupInfo(p,a,b,c,d) (p)->lpVtbl->GetGroupInfo(p,a,b,c,d)
  703. #define IDirectPlay8Peer_EnumPlayersAndGroups(p,a,b,c) (p)->lpVtbl->EnumPlayersAndGroups(p,a,b,c)
  704. #define IDirectPlay8Peer_EnumGroupMembers(p,a,b,c,d) (p)->lpVtbl->EnumGroupMembers(p,a,b,c,d)
  705. #define IDirectPlay8Peer_SetPeerInfo(p,a,b,c,d) (p)->lpVtbl->SetPeerInfo(p,a,b,c,d)
  706. #define IDirectPlay8Peer_GetPeerInfo(p,a,b,c,d) (p)->lpVtbl->GetPeerInfo(p,a,b,c,d)
  707. #define IDirectPlay8Peer_GetPeerAddress(p,a,b,c) (p)->lpVtbl->GetPeerAddress(p,a,b,c)
  708. #define IDirectPlay8Peer_GetLocalHostAddresses(p,a,b,c) (p)->lpVtbl->GetLocalHostAddresses(p,a,b,c)
  709. #define IDirectPlay8Peer_Close(p,a) (p)->lpVtbl->Close(p,a)
  710. #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)
  711. #define IDirectPlay8Peer_DestroyPeer(p,a,b,c,d) (p)->lpVtbl->DestroyPeer(p,a,b,c,d)
  712. #define IDirectPlay8Peer_ReturnBuffer(p,a,b) (p)->lpVtbl->ReturnBuffer(p,a,b)
  713. #define IDirectPlay8Peer_GetPlayerContext(p,a,b,c) (p)->lpVtbl->GetPlayerContext(p,a,b,c)
  714. #define IDirectPlay8Peer_GetGroupContext(p,a,b,c) (p)->lpVtbl->GetGroupContext(p,a,b,c)
  715. #define IDirectPlay8Peer_GetCaps(p,a,b) (p)->lpVtbl->GetCaps(p,a,b)
  716. #define IDirectPlay8Peer_SetCaps(p,a,b) (p)->lpVtbl->SetCaps(p,a,b)
  717. #define IDirectPlay8Peer_SetSPCaps(p,a,b,c) (p)->lpVtbl->SetSPCaps(p,a,b,c)
  718. #define IDirectPlay8Peer_GetSPCaps(p,a,b,c) (p)->lpVtbl->GetSPCaps(p,a,b,c)
  719. #define IDirectPlay8Peer_GetConnectionInfo(p,a,b,c) (p)->lpVtbl->GetConnectionInfo(p,a,b,c)
  720. #define IDirectPlay8Peer_RegisterLobby(p,a,b,c) (p)->lpVtbl->RegisterLobby(p,a,b,c)
  721. #define IDirectPlay8Peer_TerminateSession(p,a,b,c) (p)->lpVtbl->TerminateSession(p,a,b,c)
  722. #else
  723. /*** IUnknown methods ***/
  724. #define IDirectPlay8Peer_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  725. #define IDirectPlay8Peer_AddRef(p) (p)->AddRef()
  726. #define IDirectPlay8Peer_Release(p) (p)->Release()
  727. /*** IDirectPlay8Peer methods ***/
  728. #define IDirectPlay8Peer_Initialize(p,a,b,c) (p)->Initialize(a,b,c)
  729. #define IDirectPlay8Peer_EnumServiceProviders(p,a,b,c,d,e,f) (p)->EnumServiceProviders(a,b,c,d,e,f)
  730. #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)
  731. #define IDirectPlay8Peer_CancelAsyncOperation(p,a,b) (p)->CancelAsyncOperation(a,b)
  732. #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)
  733. #define IDirectPlay8Peer_SendTo(p,a,b,c,d,e,f,g) (p)->SendTo(a,b,c,d,e,f,g)
  734. #define IDirectPlay8Peer_GetSendQueueInfo(p,a,b,c,d) (p)->GetSendQueueInfo(a,b,c,d)
  735. #define IDirectPlay8Peer_Host(p,a,b,c,d,e,f,g) (p)->Host(a,b,c,d,e,f,g)
  736. #define IDirectPlay8Peer_GetApplicationDesc(p,a,b,c) (p)->GetApplicationDesc(a,b,c)
  737. #define IDirectPlay8Peer_SetApplicationDesc(p,a,b) (p)->SetApplicationDesc(a,b)
  738. #define IDirectPlay8Peer_CreateGroup(p,a,b,c,d,e) (p)->CreateGroup(a,b,c,d,e)
  739. #define IDirectPlay8Peer_DestroyGroup(p,a,b,c,d) (p)->DestroyGroup(a,b,c,d)
  740. #define IDirectPlay8Peer_AddPlayerToGroup(p,a,b,c,d,e) (p)->AddPlayerToGroup(a,b,c,d,e)
  741. #define IDirectPlay8Peer_RemovePlayerFromGroup(p,a,b,c,d,e) (p)->RemovePlayerFromGroup(a,b,c,d,e)
  742. #define IDirectPlay8Peer_SetGroupInfo(p,a,b,c,d,e) (p)->SetGroupInfo(a,b,c,d,e)
  743. #define IDirectPlay8Peer_GetGroupInfo(p,a,b,c,d) (p)->GetGroupInfo(a,b,c,d)
  744. #define IDirectPlay8Peer_EnumPlayersAndGroups(p,a,b,c) (p)->EnumPlayersAndGroups(a,b,c)
  745. #define IDirectPlay8Peer_EnumGroupMembers(p,a,b,c,d) (p)->EnumGroupMembers(a,b,c,d)
  746. #define IDirectPlay8Peer_SetPeerInfo(p,a,b,c,d) (p)->SetPeerInfo(a,b,c,d)
  747. #define IDirectPlay8Peer_GetPeerInfo(p,a,b,c,d) (p)->GetPeerInfo(a,b,c,d)
  748. #define IDirectPlay8Peer_GetPeerAddress(p,a,b,c) (p)->GetPeerAddress(a,b,c)
  749. #define IDirectPlay8Peer_GetLocalHostAddresses(p,a,b,c) (p)->GetLocalHostAddresses(a,b,c)
  750. #define IDirectPlay8Peer_Close(p,a) (p)->Close(a)
  751. #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)
  752. #define IDirectPlay8Peer_DestroyPeer(p,a,b,c,d) (p)->DestroyPeer(a,b,c,d)
  753. #define IDirectPlay8Peer_ReturnBuffer(p,a,b) (p)->ReturnBuffer(a,b)
  754. #define IDirectPlay8Peer_GetPlayerContext(p,a,b,c) (p)->GetPlayerContext(a,b,c)
  755. #define IDirectPlay8Peer_GetGroupContext(p,a,b,c) (p)->GetGroupContext(a,b,c)
  756. #define IDirectPlay8Peer_GetCaps(p,a,b) (p)->GetCaps(a,b)
  757. #define IDirectPlay8Peer_SetCaps(p,a,b) (p)->SetCaps(a,b)
  758. #define IDirectPlay8Peer_SetSPCaps(p,a,b,c) (p)->SetSPCaps(a,b,c)
  759. #define IDirectPlay8Peer_GetSPCaps(p,a,b,c) (p)->GetSPCaps(a,b,c)
  760. #define IDirectPlay8Peer_GetConnectionInfo(p,a,b,c) (p)->GetConnectionInfo(a,b,c)
  761. #define IDirectPlay8Peer_RegisterLobby(p,a,b,c) (p)->RegisterLobby(a,b,c)
  762. #define IDirectPlay8Peer_TerminateSession(p,a,b,c) (p)->TerminateSession(a,b,c)
  763. #endif
  764. #ifdef __cplusplus
  765. }
  766. #endif
  767. #endif