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

758 lines
28 KiB

  1. /*==========================================================================;
  2. *
  3. * Copyright (C) 1998-2002 Microsoft Corporation. All Rights Reserved.
  4. *
  5. * File: DPSP8.h
  6. * Content: Service provider include file
  7. //@@BEGIN_MSINTERNAL
  8. * History:
  9. * Date By Reason
  10. * ============
  11. * 10/12/98 jwo created
  12. * 03/22/2000 jtk Changed interface names
  13. * 05/16/2000 jtk Derived from DNSP.h
  14. * 07/17/2001 vanceo MSINTERNAL cleanup so header can be released
  15. * 10/08/2001 vanceo Add multicast support
  16. //@@END_MSINTERNAL
  17. ***************************************************************************/
  18. #ifndef __DIRECTPLAY_SERVICE_PROVIDER_8__
  19. #define __DIRECTPLAY_SERVICE_PROVIDER_8__
  20. #ifdef _XBOX
  21. //@@BEGIN_MSINTERNAL
  22. #ifdef XBOX_ON_DESKTOP
  23. #include <ole2.h> // for DECLARE_INTERFACE_ and HRESULT
  24. #endif // XBOX_ON_DESKTOP
  25. //@@END_MSINTERNAL
  26. #undef DECLARE_INTERFACE_
  27. #define DECLARE_INTERFACE_(iface, baseiface) DECLARE_INTERFACE(iface)
  28. #else // ! _XBOX
  29. #include <ole2.h> // for DECLARE_INTERFACE_ and HRESULT
  30. #endif // ! _XBOX
  31. #ifdef __cplusplus
  32. extern "C" {
  33. #endif
  34. /****************************************************************************
  35. *
  36. * DirectPlay8 Interface IIDs
  37. *
  38. ****************************************************************************/
  39. //
  40. // GUIDS used by DP8ServiceProvider objects
  41. //
  42. // {85F1A470-61D5-11D2-AE0F-006097B01411}
  43. DEFINE_GUID(IID_IDP8ServiceProvider, 0x85f1a470, 0x61d5, 0x11d2, 0xae, 0xf, 0x0, 0x60, 0x97, 0xb0, 0x14, 0x11);
  44. // {85F1A472-61D5-11D2-AE0F-006097B01411}
  45. DEFINE_GUID(IID_IDP8SPCallback, 0x85f1a472, 0x61d5, 0x11d2, 0xae, 0xf, 0x0, 0x60, 0x97, 0xb0, 0x14, 0x11);
  46. /****************************************************************************
  47. *
  48. * DirectPlay8 Interface Pointer definitions
  49. *
  50. ****************************************************************************/
  51. typedef struct IDP8SPCallback IDP8SPCallback;
  52. typedef struct IDP8ServiceProvider IDP8ServiceProvider;
  53. //**************************************************************************
  54. // Constant definitions
  55. //**************************************************************************
  56. //
  57. // Registry key under HKLM where the service provider info lives
  58. //
  59. #define DPN_REG_LOCAL_SP_ROOT L"Software\\Microsoft\\DirectPlay8"
  60. #define DPN_REG_LOCAL_SP_SUB L"\\Service Providers"
  61. #define DPN_REG_LOCAL_SP_SUBKEY DPN_REG_LOCAL_SP_ROOT DPN_REG_LOCAL_SP_SUB
  62. //
  63. // Registry values used by DirectPlay
  64. //
  65. #define DPN_REG_KEYNAME_FRIENDLY_NAME L"Friendly Name"
  66. #define DPN_REG_KEYNAME_GUID L"GUID"
  67. //
  68. // Enumerated values for service provider events
  69. //
  70. typedef enum _SP_EVENT_TYPE
  71. {
  72. SPEV_UNKNOWN = 0,
  73. SPEV_DATA,
  74. SPEV_CONNECT,
  75. SPEV_DISCONNECT,
  76. SPEV_ENUMQUERY,
  77. SPEV_QUERYRESPONSE,
  78. SPEV_LISTENSTATUS,
  79. SPEV_LISTENADDRESSINFO,
  80. SPEV_ENUMADDRESSINFO,
  81. SPEV_CONNECTADDRESSINFO,
  82. SPEV_DATA_UNCONNECTED,
  83. //@@BEGIN_MSINTERNAL
  84. #ifndef DPNBUILD_NOMULTICAST
  85. //@@END_MSINTERNAL
  86. SPEV_DATA_UNKNOWNSENDER,
  87. //@@BEGIN_MSINTERNAL
  88. #endif // ! DPNBUILD_NOMULTICAST
  89. //@@END_MSINTERNAL
  90. } SP_EVENT_TYPE;
  91. /* Flags */
  92. //@@BEGIN_MSINTERNAL
  93. #ifndef DPNBUILD_NOSPUI
  94. //@@END_MSINTERNAL
  95. #define DPNSPF_OKTOQUERY 0x00000002 // OK for SP to ask the user for clarification on addresses
  96. //@@BEGIN_MSINTERNAL
  97. #endif // ! DPNBUILD_NOSPUI
  98. //@@END_MSINTERNAL
  99. #define DPNSPF_NOBROADCASTFALLBACK 0x00000010 // don't allow SP to fallback to broadcast with insufficient information
  100. // (only if the SP supports broadcast)
  101. #define DPNSPF_BINDLISTENTOGATEWAY 0x00000020 // when performing a 'listen' attempt create a mapping between the local
  102. // 'port' to the same 'port' on the network 'gateway'.
  103. //@@BEGIN_MSINTERNAL
  104. #ifndef DPNBUILD_ONLYONEADAPTER
  105. //@@END_MSINTERNAL
  106. #define DPNSPF_ADDITIONALMULTIPLEXADAPTERS 0x00000040 // there will be more adapters for this connect operation
  107. //@@BEGIN_MSINTERNAL
  108. #endif // ! DPNBUILD_ONLYONEADAPTER
  109. #ifndef DPNBUILD_NOMULTICAST
  110. //@@END_MSINTERNAL
  111. #define DPNSPF_LISTEN_MULTICAST 0x00000080 // the listen is a multicast listen operation
  112. #define DPNSPF_LISTEN_ALLOWUNKNOWNSENDERS 0x00000100 // allow and indicate data from an unknown multicast sender
  113. #define DPNSPF_CONNECT_MULTICAST_SEND 0x00000200 // the connect is a multicast send operation
  114. #define DPNSPF_CONNECT_MULTICAST_RECEIVE 0x00000400 // the connect is a multicast receive operation
  115. //@@BEGIN_MSINTERNAL
  116. #endif // ! DPNBUILD_NOMULTICAST
  117. //@@END_MSINTERNAL
  118. #define DPNSPF_SESSIONDATA 0x00000800 // the operation has session data available
  119. #define DPNSPF_LISTEN_DISALLOWENUMS 0x00001000 // don't pass enums up from listens
  120. //
  121. // flags for getting address information
  122. //
  123. typedef enum
  124. {
  125. SP_GET_ADDRESS_INFO_LOCAL_ADAPTER = 0x00000001, // local adapter address
  126. SP_GET_ADDRESS_INFO_LISTEN_HOST_ADDRESSES, // local adapter address (in 'host' form to be passed to connect/enum)
  127. SP_GET_ADDRESS_INFO_LOCAL_HOST_PUBLIC_ADDRESS, // local adapter address as mapped on the 'gateway' (in 'host' form for connect/enum)
  128. SP_GET_ADDRESS_INFO_REMOTE_HOST, // address of other end of an endpoint (in 'host' form to be passed to connect/enum)
  129. //@@BEGIN_MSINTERNAL
  130. #ifndef DPNBUILD_NOMULTICAST
  131. //@@END_MSINTERNAL
  132. SP_GET_ADDRESS_INFO_MULTICAST_GROUP, // group address for multicast listen endpoint (in 'host' form to be passed to connect)
  133. //@@BEGIN_MSINTERNAL
  134. #endif // ! DPNBUILD_NOMULTICAST
  135. //@@END_MSINTERNAL
  136. } SP_GET_ADDRESS_INFO_FLAGS;
  137. //
  138. // SP updates
  139. //
  140. typedef enum
  141. {
  142. SP_UPDATE_HOST_MIGRATE,
  143. SP_UPDATE_ALLOW_ENUMS,
  144. SP_UPDATE_DISALLOW_ENUMS
  145. } SP_UPDATE_TYPE;
  146. //
  147. // Flags passed to Initialize method in dwFlags param of SPINITIALIZEDATA
  148. //
  149. typedef enum
  150. {
  151. SP_SESSION_TYPE_SERVER=0x01,
  152. SP_SESSION_TYPE_CLIENT=0x02,
  153. SP_SESSION_TYPE_PEER=0x04
  154. } SP_INITIALIZE_FLAGS;
  155. //**************************************************************************
  156. // Structure definitions
  157. //**************************************************************************
  158. //
  159. // data received from the SP
  160. //
  161. typedef struct _SPRECEIVEDBUFFER
  162. {
  163. struct _SPRECEIVEDBUFFER *pNext; // link to next item in list
  164. DWORD dwProtocolData; // reserved for protocol
  165. PVOID pServiceProviderDescriptor; // reserved for protocol
  166. BUFFERDESC BufferDesc; // received buffer description
  167. } SPRECEIVEDBUFFER, *PSPRECEIVEDBUFFER;
  168. //
  169. // connect indication
  170. //
  171. typedef struct _SPIE_CONNECT
  172. {
  173. HANDLE hEndpoint; // handle of the new endpoint
  174. void *pEndpointContext; // user context associated with this endpoint
  175. void *pCommandContext; // user context for associated command
  176. } SPIE_CONNECT, *PSPIE_CONNECT;
  177. //
  178. // disconnect indication
  179. //
  180. typedef struct _SPIE_DISCONNECT
  181. {
  182. HANDLE hEndpoint; // handle of endpoint being disconnected
  183. void *pEndpointContext; // user context associated with this endpoint
  184. } SPIE_DISCONNECT, *PSPIE_DISCONNECT;
  185. //
  186. // user data indication
  187. //
  188. typedef struct _SPIE_DATA
  189. {
  190. HANDLE hEndpoint; // EP from which this data was received
  191. void *pEndpointContext; // user context associated with this endpoint
  192. SPRECEIVEDBUFFER *pReceivedData; // pointer to received data
  193. } SPIE_DATA, *PSPIE_DATA;
  194. //
  195. // enum data indication
  196. //
  197. typedef struct _SPIE_QUERY
  198. {
  199. IDirectPlay8Address *pAddressSender; // address from which the query came (may be NULL)
  200. IDirectPlay8Address *pAddressDevice; // address of device on which query was received
  201. SPRECEIVEDBUFFER *pReceivedData; // pointer to received data
  202. void *pUserContext; // user context passed into listen command
  203. } SPIE_QUERY, *PSPIE_QUERY;
  204. //
  205. // enum response data indication
  206. //
  207. typedef struct _SPIE_QUERYRESPONSE
  208. {
  209. IDirectPlay8Address *pAddressSender; // address from which the query came (may be NULL)
  210. IDirectPlay8Address *pAddressDevice; // address of device on which query response was received
  211. SPRECEIVEDBUFFER *pReceivedData; // pointer to received data
  212. DWORD dwRoundTripTime; // round trip time for enum (milliseconds)
  213. void *pUserContext; // user context passed into enum command
  214. } SPIE_QUERYRESPONSE, *PSPIE_QUERYRESPONSE;
  215. //
  216. // event sent to indicate status of 'listen' on an adapter
  217. //
  218. typedef struct _SPIE_LISTENSTATUS
  219. {
  220. GUID ListenAdapter; // adapter GUID
  221. HRESULT hResult; // result of listen
  222. HANDLE hCommand; // handle of associated command
  223. void *pUserContext; // user context passed into command
  224. HANDLE hEndpoint; // handle of endpoint associated with this listen
  225. } SPIE_LISTENSTATUS, *PSPIE_LISTENSTATUS;
  226. //
  227. // event sent to indicate address info for 'listen' on an adapter
  228. //
  229. typedef struct _SPIE_LISTENADDRESSINFO
  230. {
  231. IDirectPlay8Address *pDeviceAddress; // device address used to complete this command
  232. HRESULT hCommandStatus; // command status
  233. void *pCommandContext; // command context
  234. } SPIE_LISTENADDRESSINFO, *PSPIE_LISTENADDRESSINFO;
  235. //
  236. // event sent to indicate address info for 'enum' on an adapter
  237. //
  238. typedef struct _SPIE_ENUMADDRESSINFO
  239. {
  240. IDirectPlay8Address *pHostAddress; // host address used to complete this command
  241. IDirectPlay8Address *pDeviceAddress; // device address used to complete this command
  242. HRESULT hCommandStatus; // command status
  243. void *pCommandContext; // command context
  244. } SPIE_ENUMADDRESSINFO, *PSPIE_ENUMADDRESSINFO;
  245. //
  246. // event sent to indicate status of 'connect' on an adapter
  247. //
  248. typedef struct _SPIE_CONNECTADDRESSINFO
  249. {
  250. IDirectPlay8Address *pHostAddress; // host address used to complete this command
  251. IDirectPlay8Address *pDeviceAddress; // device address used to complete this command
  252. HRESULT hCommandStatus; // command status
  253. void *pCommandContext; // command context
  254. } SPIE_CONNECTADDRESSINFO, *PSPIE_CONNECTADDRESSINFO;
  255. //
  256. // user data indication where sender does not have a valid connection
  257. //
  258. typedef struct _SPIE_DATA_UNCONNECTED
  259. {
  260. void *pvListenCommandContext; // user context for associated command
  261. SPRECEIVEDBUFFER *pReceivedData; // pointer to received data
  262. DWORD dwSenderAddressHash; // hashed address of sender of data
  263. PVOID pvReplyBuffer; // buffer the user can fill with a reply
  264. DWORD dwReplyBufferSize; // size of the buffer user can fill with a reply, and place for user to return size used if replying
  265. } SPIE_DATA_UNCONNECTED, *PSPIE_DATA_UNCONNECTED;
  266. //@@BEGIN_MSINTERNAL
  267. #ifndef DPNBUILD_NOMULTICAST
  268. //@@END_MSINTERNAL
  269. //
  270. // user multicast data indication where sender is unknown
  271. //
  272. typedef struct _SPIE_DATA_UNKNOWNSENDER
  273. {
  274. IDirectPlay8Address *pSenderAddress; // address of sender of data
  275. void *pvListenCommandContext; // user context for associated command
  276. SPRECEIVEDBUFFER *pReceivedData; // pointer to received data
  277. } SPIE_DATA_UNKNOWNSENDER, *PSPIE_DATA_UNKNOWNSENDER;
  278. //@@BEGIN_MSINTERNAL
  279. #endif // ! DPNBUILD_NOMULTICAST
  280. //@@END_MSINTERNAL
  281. typedef struct _SPINITIALIZEDATA
  282. {
  283. IDP8SPCallback *pIDP; // pointer to callback interface
  284. DWORD dwFlags; // flags
  285. } SPINITIALIZEDATA, *PSPINITIALIZEDATA;
  286. typedef struct _SPGETCAPSDATA
  287. {
  288. DWORD dwSize; // size of this structure
  289. HANDLE hEndpoint; // Handle of endpoint to check. If this parameter
  290. // is NULL, the best-case capabilities of the SP are
  291. // returned.
  292. DWORD dwUserFrameSize; // Maximum data payload allowed in an outgoing
  293. // message from this SP. It is the SP's responsibility
  294. // to account for any extra header information it's
  295. // going to attach when sending a message, and for any
  296. // underlying protocol overhead (IP packet headers).
  297. DWORD dwEnumFrameSize; // maximum payload for an enum query (NOT ENUM RESPONSE!)
  298. DWORD dwLocalLinkSpeed; // speed of link in bits per second
  299. DWORD dwIOThreadCount; // count of threads in operation by this SP
  300. DWORD dwDefaultEnumRetryCount; // default retry count
  301. DWORD dwDefaultEnumRetryInterval; // default retry interval
  302. DWORD dwDefaultEnumTimeout; // default timeout
  303. DWORD dwFlags; // SP flags
  304. DWORD dwBuffersPerThread; // buffers per thread
  305. DWORD dwSystemBufferSize; // system buffer size
  306. } SPGETCAPSDATA, *PSPGETCAPSDATA;
  307. typedef struct _SPSETCAPSDATA
  308. {
  309. DWORD dwSize; // size of this structure
  310. DWORD dwIOThreadCount; // number of threads in operation by this SP
  311. DWORD dwBuffersPerThread; // buffers per thread
  312. DWORD dwSystemBufferSize; // system buffer size
  313. } SPSETCAPSDATA, *PSPSETCAPSDATA;
  314. typedef struct _SPGETADDRESSINFODATA
  315. {
  316. HANDLE hEndpoint; // handle of endpoint to check
  317. IDirectPlay8Address *pAddress; // returned pointer to output address
  318. SP_GET_ADDRESS_INFO_FLAGS Flags; // flags
  319. } SPGETADDRESSINFODATA, *PSPGETADDRESSINFODATA;
  320. typedef struct _SPENUMQUERYDATA
  321. {
  322. IDirectPlay8Address *pAddressHost; // address to which to send
  323. IDirectPlay8Address *pAddressDeviceInfo; // device to enumerate on
  324. BUFFERDESC *pBuffers; // pointer to buffers to send
  325. DWORD dwBufferCount; // count of buffers to send
  326. DWORD dwTimeout; // how long to wait for replies (0 means default)
  327. DWORD dwRetryCount; // how many times to send it (0 means default)
  328. DWORD dwRetryInterval; // how long to wait between retries (0 means default)
  329. DWORD dwFlags; // enum query flags
  330. void *pvContext; // caller's toy, returned in the completion indication
  331. HANDLE hCommand; // Returned
  332. DWORD dwCommandDescriptor; // Returned
  333. // Added for DX9, ignored unless DPNSPF_SESSIONDATA flag used
  334. void *pvSessionData; // pointer to session data
  335. DWORD dwSessionDataSize; // size of session data
  336. } SPENUMQUERYDATA, *PSPENUMQUERYDATA;
  337. typedef struct _SPENUMRESPONDDATA
  338. {
  339. SPIE_QUERY *pQuery; // pointer to the query indication to which you're responding
  340. BUFFERDESC *pBuffers; // pointer to reply buffers to send
  341. DWORD dwBufferCount; // count of reply buffers to send
  342. DWORD dwFlags; // enum respond flags, must be zero
  343. void *pvContext; // caller's toy, returned in the completion indication
  344. HANDLE hCommand; // Returned
  345. DWORD dwCommandDescriptor; // Returned
  346. } SPENUMRESPONDDATA, *PSPENUMRESPONDDATA;
  347. typedef struct _SPCONNECTDATA
  348. {
  349. IDirectPlay8Address *pAddressHost; // address to which to connect
  350. IDirectPlay8Address *pAddressDeviceInfo; // address with which to connect
  351. DWORD dwReserved; // unused, must be zero
  352. DWORD dwFlags; // connect flags
  353. void *pvContext; // caller's toy, returned in the completion indication
  354. HANDLE hCommand; // Returned
  355. DWORD dwCommandDescriptor; // Returned
  356. // Added for DX9, ignored unless DPNSPF_SESSIONDATA flag used
  357. void *pvSessionData; // pointer to session data
  358. DWORD dwSessionDataSize; // size of session data
  359. } SPCONNECTDATA, *PSPCONNECTDATA;
  360. typedef struct _SPDISCONNECTDATA
  361. {
  362. HANDLE hEndpoint; // handle to the endpoint to disconnect
  363. DWORD dwFlags; // disconnect flags, must be zero
  364. void *pvContext; // caller's toy, returned in the completion indication
  365. HANDLE hCommand; // Returned
  366. DWORD dwCommandDescriptor; // Returned
  367. } SPDISCONNECTDATA, *PSPDISCONNECTDATA;
  368. typedef struct _SPLISTENDATA
  369. {
  370. IDirectPlay8Address *pAddressDeviceInfo; // address to listen on
  371. DWORD dwFlags; // listen flags
  372. void *pvContext; // caller's toy, returned in the completion indication
  373. HANDLE hCommand; // Returned
  374. DWORD dwCommandDescriptor; // Returned
  375. // Added for DX9, ignored unless DPNSPF_SESSIONDATA flag used
  376. void *pvSessionData; // pointer to session data
  377. DWORD dwSessionDataSize; // size of session data
  378. } SPLISTENDATA, *PSPLISTENDATA;
  379. typedef struct _SPSENDDATA
  380. {
  381. HANDLE hEndpoint; // handle of endpoint on which to send the data
  382. BUFFERDESC *pBuffers; // data to send
  383. DWORD dwBufferCount; // count of buffers to send
  384. DWORD dwFlags; // send flags
  385. void *pvContext; // caller's toy, returned in the completion indication
  386. HANDLE hCommand; // Returned
  387. DWORD dwCommandDescriptor; // Returned
  388. } SPSENDDATA, *PSPSENDDATA;
  389. typedef struct _SPUPDATEDATA
  390. {
  391. SP_UPDATE_TYPE UpdateType; // identifier describing update type
  392. HANDLE hEndpoint; // handle to endpoint being updated
  393. } SPUPDATEDATA, *PSPUPDATEDATA;
  394. typedef struct _SPENUMMULTICASTSCOPESDATA SPENUMMULTICASTSCOPESDATA, *PSPENUMMULTICASTSCOPESDATA;
  395. typedef struct _SPSHAREENDPOINTINFODATA SPSHAREENDPOINTINFODATA, *PSPSHAREENDPOINTINFODATA;
  396. typedef struct _SPGETENDPOINTBYADDRESSDATA SPGETENDPOINTBYADDRESSDATA, *PSPGETENDPOINTBYADDRESSDATA;
  397. //@@BEGIN_MSINTERNAL
  398. #ifndef DPNBUILD_NOMULTICAST
  399. //@@END_MSINTERNAL
  400. typedef struct _DPN_MULTICAST_SCOPE_INFO DPN_MULTICAST_SCOPE_INFO, *PDPN_MULTICAST_SCOPE_INFO;
  401. struct _SPENUMMULTICASTSCOPESDATA
  402. {
  403. const GUID *pguidAdapter; // pointer to GUID of adapter on which to enumerate scopes
  404. DPN_MULTICAST_SCOPE_INFO *pScopeData; // buffer in which to store scopes returned
  405. DWORD dwScopeDataSize; // size of buffer in bytes, size required/written returned
  406. DWORD dwScopeCount; // number of scopes returned
  407. DWORD dwFlags; // flags, must be zero
  408. };
  409. struct _SPSHAREENDPOINTINFODATA
  410. {
  411. IDP8ServiceProvider *pDP8ServiceProvider; // existing service provider whose endpoint data should be shared
  412. DWORD dwFlags; // flags, must be zero
  413. };
  414. struct _SPGETENDPOINTBYADDRESSDATA
  415. {
  416. IDirectPlay8Address *pAddressHost; // address of remote host
  417. IDirectPlay8Address *pAddressDeviceInfo; // address of device with which endpoint is connected
  418. DWORD dwFlags; // flags, must be zero
  419. HANDLE hEndpoint; // handle to endpoint returned
  420. PVOID pvEndpointContext; // user's endpoint context returned
  421. };
  422. //@@BEGIN_MSINTERNAL
  423. #endif // ! DPNBUILD_NOMULTICAST
  424. //@@END_MSINTERNAL
  425. typedef struct _SPISAPPLICATIONSUPPORTEDDATA SPISAPPLICATIONSUPPORTEDDATA, *PSPISAPPLICATIONSUPPORTEDDATA;
  426. //@@BEGIN_MSINTERNAL
  427. #ifndef DPNBUILD_LIBINTERFACE
  428. //@@END_MSINTERNAL
  429. struct _SPISAPPLICATIONSUPPORTEDDATA
  430. {
  431. const GUID *pApplicationGuid; // pointer to GUID of application to check
  432. DWORD dwFlags; // flags, must be zero
  433. };
  434. //@@BEGIN_MSINTERNAL
  435. #endif // ! DPNBUILD_LIBINTERFACE
  436. //@@END_MSINTERNAL
  437. typedef struct _SPENUMADAPTERSDATA SPENUMADAPTERSDATA, *PSPENUMADAPTERSDATA;
  438. //@@BEGIN_MSINTERNAL
  439. #ifndef DPNBUILD_ONLYONEADAPTER
  440. //@@END_MSINTERNAL
  441. struct _SPENUMADAPTERSDATA
  442. {
  443. DPN_SERVICE_PROVIDER_INFO *pAdapterData; // buffer in which to store adapters returned
  444. DWORD dwAdapterDataSize; // size of buffer in bytes, size required/written returned
  445. DWORD dwAdapterCount; // number of adapters returned
  446. DWORD dwFlags; // flags, must be zero
  447. };
  448. //@@BEGIN_MSINTERNAL
  449. #endif // ! DPNBUILD_ONLYONEADAPTER
  450. //@@END_MSINTERNAL
  451. typedef struct _SPPROXYENUMQUERYDATA SPPROXYENUMQUERYDATA, *PSPPROXYENUMQUERYDATA;
  452. //@@BEGIN_MSINTERNAL
  453. #ifndef DPNBUILD_SINGLEPROCESS
  454. //@@END_MSINTERNAL
  455. struct _SPPROXYENUMQUERYDATA
  456. {
  457. DWORD dwFlags; // flags, must be zero
  458. SPIE_QUERY *pIncomingQueryData; // pointer to incoming enum query to be proxied
  459. IDirectPlay8Address *pDestinationAdapter; // pointer to address of destination adapter
  460. };
  461. //@@BEGIN_MSINTERNAL
  462. #endif // ! DPNBUILD_SINGLEPROCESS
  463. //@@END_MSINTERNAL
  464. //**************************************************************************
  465. // Variable definitions
  466. //**************************************************************************
  467. //**************************************************************************
  468. // Function prototypes
  469. //**************************************************************************
  470. //**************************************************************************
  471. // Function definitions
  472. //**************************************************************************
  473. /***************************************************************************
  474. * IDP8SPCallback interface
  475. ***************************************************************************/
  476. #undef INTERFACE
  477. #define INTERFACE IDP8SPCallback
  478. DECLARE_INTERFACE_( IDP8SPCallback, IUnknown )
  479. {
  480. /*** IUnknown methods ***/
  481. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  482. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  483. STDMETHOD_(ULONG,Release) (THIS) PURE;
  484. /*** IDP8SPCallback methods ***/
  485. STDMETHOD(IndicateEvent) (THIS_ SP_EVENT_TYPE,LPVOID) PURE;
  486. STDMETHOD(CommandComplete) (THIS_ HANDLE,HRESULT,LPVOID) PURE;
  487. };
  488. /***************************************************************************
  489. * IDP8SPCallback interface macros
  490. ***************************************************************************/
  491. #if !defined(__cplusplus) || defined(CINTERFACE)
  492. #define IDP8SPCallback_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  493. #define IDP8SPCallback_AddRef(p) (p)->lpVtbl->AddRef(p)
  494. #define IDP8SPCallback_Release(p) (p)->lpVtbl->Release(p)
  495. #define IDP8SPCallback_IndicateEvent(p,a,b) (p)->lpVtbl->IndicateEvent(p,a,b)
  496. #define IDP8SPCallback_CommandComplete(p,a,b,c) (p)->lpVtbl->CommandComplete(p,a,b,c)
  497. #else /* C++ */
  498. #define IDP8SPCallback_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  499. #define IDP8SPCallback_AddRef(p) (p)->AddRef()
  500. #define IDP8SPCallback_Release(p) (p)->Release()
  501. #define IDP8SPCallback_IndicateEvent(p,a,b) (p)->IndicateEvent(a,b)
  502. #define IDP8SPCallback_CommandComplete(p,a,b,c) (p)->CommandComplete(a,b,c)
  503. #endif
  504. /***************************************************************************
  505. * IDP8ServiceProvider interface
  506. ***************************************************************************/
  507. #undef INTERFACE
  508. #define INTERFACE IDP8ServiceProvider
  509. DECLARE_INTERFACE_( IDP8ServiceProvider, IUnknown )
  510. {
  511. /*** IUnknown methods ***/
  512. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  513. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  514. STDMETHOD_(ULONG,Release) (THIS) PURE;
  515. /*** IDP8ServiceProvider methods ***/
  516. STDMETHOD(Initialize) (THIS_ PSPINITIALIZEDATA) PURE;
  517. STDMETHOD(Close) (THIS) PURE;
  518. STDMETHOD(Connect) (THIS_ PSPCONNECTDATA) PURE;
  519. STDMETHOD(Disconnect) (THIS_ PSPDISCONNECTDATA) PURE;
  520. STDMETHOD(Listen) (THIS_ PSPLISTENDATA) PURE;
  521. STDMETHOD(SendData) (THIS_ PSPSENDDATA) PURE;
  522. STDMETHOD(EnumQuery) (THIS_ PSPENUMQUERYDATA) PURE;
  523. STDMETHOD(EnumRespond) (THIS_ PSPENUMRESPONDDATA) PURE;
  524. STDMETHOD(CancelCommand) (THIS_ HANDLE, DWORD) PURE;
  525. STDMETHOD(EnumMulticastScopes) (THIS_ PSPENUMMULTICASTSCOPESDATA) PURE;
  526. STDMETHOD(ShareEndpointInfo) (THIS_ PSPSHAREENDPOINTINFODATA) PURE;
  527. STDMETHOD(GetEndpointByAddress) (THIS_ PSPGETENDPOINTBYADDRESSDATA) PURE;
  528. STDMETHOD(Update) (THIS_ PSPUPDATEDATA) PURE;
  529. STDMETHOD(GetCaps) (THIS_ PSPGETCAPSDATA) PURE;
  530. STDMETHOD(SetCaps) (THIS_ PSPSETCAPSDATA) PURE;
  531. STDMETHOD(ReturnReceiveBuffers) (THIS_ PSPRECEIVEDBUFFER) PURE;
  532. STDMETHOD(GetAddressInfo) (THIS_ PSPGETADDRESSINFODATA) PURE;
  533. STDMETHOD(IsApplicationSupported) (THIS_ PSPISAPPLICATIONSUPPORTEDDATA) PURE;
  534. STDMETHOD(EnumAdapters) (THIS_ PSPENUMADAPTERSDATA) PURE;
  535. STDMETHOD(ProxyEnumQuery) (THIS_ PSPPROXYENUMQUERYDATA) PURE;
  536. };
  537. /***************************************************************************
  538. * IDP8ServiceProvider interface macros
  539. ***************************************************************************/
  540. #if !defined(__cplusplus) || defined(CINTERFACE)
  541. #define IDP8ServiceProvider_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  542. #define IDP8ServiceProvider_AddRef(p) (p)->lpVtbl->AddRef(p)
  543. #define IDP8ServiceProvider_Release(p) (p)->lpVtbl->Release(p)
  544. #define IDP8ServiceProvider_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
  545. #define IDP8ServiceProvider_Close(p) (p)->lpVtbl->Close(p)
  546. #define IDP8ServiceProvider_Connect(p,a) (p)->lpVtbl->Connect(p,a)
  547. #define IDP8ServiceProvider_Disconnect(p,a) (p)->lpVtbl->Disconnect(p,a)
  548. #define IDP8ServiceProvider_Listen(p,a) (p)->lpVtbl->Listen(p,a)
  549. #define IDP8ServiceProvider_SendData(p,a) (p)->lpVtbl->SendData(p,a)
  550. #define IDP8ServiceProvider_EnumQuery(p,a) (p)->lpVtbl->EnumQuery(p,a)
  551. #define IDP8ServiceProvider_EnumRespond(p,a) (p)->lpVtbl->EnumRespond(p,a)
  552. #define IDP8ServiceProvider_CancelCommand(p,a,b) (p)->lpVtbl->CancelCommand(p,a,b)
  553. //@@BEGIN_MSINTERNAL
  554. #ifndef DPNBUILD_NOMULTICAST
  555. //@@END_MSINTERNAL
  556. #define IDP8ServiceProvider_EnumMulticastScopes(p,a) (p)->lpVtbl->EnumMulticastScopes(p,a)
  557. #define IDP8ServiceProvider_ShareEndpointInfo(p,a) (p)->lpVtbl->ShareEndpointInfo(p,a)
  558. #define IDP8ServiceProvider_GetEndpointByAddress(p,a) (p)->lpVtbl->GetEndpointByAddress(p,a)
  559. //@@BEGIN_MSINTERNAL
  560. #endif // ! DPNBUILD_NOMULTICAST
  561. //@@END_MSINTERNAL
  562. #define IDP8ServiceProvider_Update(p,a) (p)->lpVtbl->Update(p,a)
  563. #define IDP8ServiceProvider_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a)
  564. #define IDP8ServiceProvider_SetCaps(p,a) (p)->lpVtbl->SetCaps(p,a)
  565. #define IDP8ServiceProvider_ReturnReceiveBuffers(p,a) (p)->lpVtbl->ReturnReceiveBuffers(p,a)
  566. #define IDP8ServiceProvider_GetAddressInfo(p,a) (p)->lpVtbl->GetAddressInfo(p,a)
  567. //@@BEGIN_MSINTERNAL
  568. #ifndef DPNBUILD_LIBINTERFACE
  569. //@@END_MSINTERNAL
  570. #define IDP8ServiceProvider_IsApplicationSupported(p,a) (p)->lpVtbl->IsApplicationSupported(p,a)
  571. //@@BEGIN_MSINTERNAL
  572. #endif // ! DPNBUILD_LIBINTERFACE
  573. #ifndef DPNBUILD_ONLYONEADAPTER
  574. //@@END_MSINTERNAL
  575. #define IDP8ServiceProvider_EnumAdapters(p,a) (p)->lpVtbl->EnumAdapters(p,a)
  576. //@@BEGIN_MSINTERNAL
  577. #endif // ! DPNBUILD_ONLYONEADAPTER
  578. #ifndef DPNBUILD_SINGLEPROCESS
  579. //@@END_MSINTERNAL
  580. #define IDP8ServiceProvider_ProxyEnumQuery(p,a) (p)->lpVtbl->ProxyEnumQuery(p,a)
  581. //@@BEGIN_MSINTERNAL
  582. #endif // ! DPNBUILD_SINGLEPROCESS
  583. //@@END_MSINTERNAL
  584. #else /* C++ */
  585. #define IDP8ServiceProvider_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  586. #define IDP8ServiceProvider_AddRef(p) (p)->AddRef()
  587. #define IDP8ServiceProvider_Release(p) (p)->Release()
  588. #define IDP8ServiceProvider_Initialize(p,a) (p)->Initialize(a)
  589. #define IDP8ServiceProvider_Close(p) (p)->Close()
  590. #define IDP8ServiceProvider_Connect(p,a) (p)->Connect(a)
  591. #define IDP8ServiceProvider_Disconnect(p,a) (p)->Disconnect(a)
  592. #define IDP8ServiceProvider_Listen(p,a) (p)->Listen(a)
  593. #define IDP8ServiceProvider_SendData(p,a) (p)->SendData(a)
  594. #define IDP8ServiceProvider_EnumQuery(p,a) (p)->EnumQuery(a)
  595. #define IDP8ServiceProvider_EnumRespond(p,a) (p)->EnumRespond(a)
  596. #define IDP8ServiceProvider_CancelCommand(p,a,b) (p)->CancelCommand(a,b)
  597. //@@BEGIN_MSINTERNAL
  598. #ifndef DPNBUILD_NOMULTICAST
  599. //@@END_MSINTERNAL
  600. #define IDP8ServiceProvider_EnumMulticastScopes(p,a) (p)->EnumMulticastScopes(a)
  601. #define IDP8ServiceProvider_ShareEndpointInfo(p,a) (p)->ShareEndpointInfo(a)
  602. #define IDP8ServiceProvider_GetEndpointByAddress(p,a) (p)->GetEndpointByAddress(p,a)
  603. //@@BEGIN_MSINTERNAL
  604. #endif // ! DPNBUILD_NOMULTICAST
  605. //@@END_MSINTERNAL
  606. #define IDP8ServiceProvider_Update(p,a) (p)->Update(a)
  607. #define IDP8ServiceProvider_GetCaps(p,a) (p)->GetCaps(a)
  608. #define IDP8ServiceProvider_SetCaps(p,a) (p)->SetCaps(a)
  609. #define IDP8ServiceProvider_ReturnReceiveBuffers(p,a) (p)->ReturnReceiveBuffers(a)
  610. #define IDP8ServiceProvider_GetAddressInfo(p,a) (p)->GetAddressInfo(a)
  611. //@@BEGIN_MSINTERNAL
  612. #ifndef DPNBUILD_LIBINTERFACE
  613. //@@END_MSINTERNAL
  614. #define IDP8ServiceProvider_IsApplicationSupported(p,a) (p)->IsApplicationSupported(a)
  615. //@@BEGIN_MSINTERNAL
  616. #endif // ! DPNBUILD_LIBINTERFACE
  617. #ifndef DPNBUILD_ONLYONEADAPTER
  618. //@@END_MSINTERNAL
  619. #define IDP8ServiceProvider_EnumAdapters(p,a) (p)->EnumAdapters(a)
  620. //@@BEGIN_MSINTERNAL
  621. #endif // ! DPNBUILD_ONLYONEADAPTER
  622. #ifndef DPNBUILD_SINGLEPROCESS
  623. //@@END_MSINTERNAL
  624. #define IDP8ServiceProvider_ProxyEnumQuery(p,a) (p)->ProxyEnumQuery(a)
  625. //@@BEGIN_MSINTERNAL
  626. #endif // ! DPNBUILD_SINGLEPROCESS
  627. //@@END_MSINTERNAL
  628. #endif // C++
  629. #ifdef __cplusplus
  630. };
  631. #endif
  632. #endif // __DIRECTPLAY_SERVICE_PROVIDER_8__