dplay8.h 59 KB

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