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.

628 lines
22 KiB

  1. /*==========================================================================
  2. *
  3. * Copyright (C) 1999-2002 Microsoft Corporation. All Rights Reserved.
  4. *
  5. * File: dncore.h
  6. * Content: DIRECT NET CORE HEADER FILE
  7. *@@BEGIN_MSINTERNAL
  8. * History:
  9. * Date By Reason
  10. * ==== == ======
  11. * 07/21/99 mjn Created
  12. * 10/08/99 jtk Moved COM interfaces into separate files
  13. * 11/09/99 mjn Moved Worker Thread constants/structures to separate file
  14. * 12/23/99 mjn Hand all NameTable update sends from Host to worker thread
  15. * 12/23/99 mjn Added host migration structures and functions
  16. * 12/28/99 mjn Added DNCompleteOutstandingOperations
  17. * 12/28/99 mjn Added NameTable version to Host migration message
  18. * 12/28/99 mjn Moved Async Op stuff to Async.h
  19. * 01/03/00 mjn Added DNPrepareToDeletePlayer
  20. * 01/04/00 mjn Added code to allow outstanding ops to complete at host migration
  21. * 01/06/00 mjn Moved NameTable stuff to NameTable.h
  22. * 01/07/00 mjn Moved Misc Functions to DNMisc.h
  23. * 01/08/00 mjn Added DN_INTERNAL_MESSAGE_CONNECT_FAILED
  24. * 01/08/00 mjn Removed unused connection info
  25. * 01/09/00 mjn Added Application Description routines
  26. * Changed SEND/ACK NAMETABLE to SEND/ACK CONNECT INFO
  27. * 01/10/00 mjn Added DNSendUpdateAppDescMessage and DN_UserUpdateAppDesc
  28. * 01/11/00 mjn Use CPackedBuffers instead of DN_ENUM_BUFFER_INFOs
  29. * Moved Application Description stuff to AppDesc.h
  30. * Moved Connect/Disconnect stuff to Connect.h
  31. * 01/13/00 mjn Added CFixedPools for CRefCountBuffers
  32. * 01/14/00 mjn Removed pvUserContext from DN_NAMETABLE_ENTRY_INFO
  33. * 01/14/00 mjn Moved Message stuff to Message.h
  34. * 01/15/00 mjn Replaced DN_COUNT_BUFFER with CRefCountBuffer
  35. * 01/16/00 mjn Modified User message handler definition
  36. * Moved User call back stuff to User.h
  37. * 01/17/00 mjn Added DN_MSG_INTERNAL_VOICE_SEND and DN_MSG_INTERNAL_BUFFER_IN_USE
  38. * 01/18/00 mjn Moved NameTable info structures to NameTable.h
  39. * 01/19/00 mjn Added structures for NameTable Operation List
  40. * 01/20/00 mjn Moved internal messages to Message.h
  41. * 01/21/00 mjn Removed DNAcknowledgeHostRequest
  42. * 01/23/00 mjn Added DN_MSG_INTERNAL_HOST_DESTROY_PLAYER
  43. * 01/24/00 mjn Implemented NameTable operation list clean up
  44. * 01/25/00 mjn Changed Host Migration to multi-step affair
  45. * 01/26/00 mjn Implemented NameTable re-sync at host migration
  46. * 01/27/00 mjn Reordered DN_MSG_INTERNAL's
  47. * 01/31/00 mjn Added Internal FPM's for RefCountBuffers
  48. * 02/09/00 mjn Implemented DNSEND_COMPLETEONPROCESS
  49. * 03/23/00 mjn Implemented RegisterLobby()
  50. * 04/04/00 mjn Added DN_MSG_INTERNAL_TERMINATE_SESSION
  51. * 04/09/00 mjn Added support for CAsyncOp
  52. * 04/11/00 mjn Moved DN_INTERNAL_MESSAGE_HEADER from Async.h
  53. * 04/11/00 mjn Added DIRECTNETOBJECT bilink for CAsyncOps
  54. * 04/23/00 mjn Replaced DN_MSG_INTERNAL_SEND_PROCESSED with DN_MSG_INTERNAL_REQ_PROCESS_COMPLETION
  55. * mjn Replaced DN_MSG_INTERNAL_SEND_PROCESSED_COMPLETE with DN_MSG_INTERNAL_PROCESS_COMPLETION
  56. * 04/26/00 mjn Removed DN_ASYNC_OP and related functions
  57. * 04/28/00 mjn Code clean up - removed comments and unused consts/structs/funcs
  58. * 05/23/00 mjn Added DN_MSG_INTERNAL_INSTRUCTED_CONNECT_FAILED
  59. * 07/05/00 mjn Removed references to DN_MSG_INTERNAL_ENUM_WITH_APPLICATION_GUID,DN_MSG_INTERNAL_ENUM,DN_MSG_INTERNAL_ENUM_RESPONSE
  60. * 07/07/00 mjn Added pNewHost as host migration target to DirectNetObject
  61. * 07/09/00 rmt Bug #38323 - RegisterLobby needs a DPNHANDLE parameter.
  62. * 07/12/00 mjn Moved internal messages back to Message.h
  63. * 07/17/00 mjn Add signature to DirectNetObject
  64. * 07/28/00 mjn Added m_bilinkConnections to DirectNetObject
  65. * 07/30/00 mjn Added CPendingDeletion
  66. * 07/31/00 mjn Added CQueuedMsg
  67. * 08/05/00 mjn Added m_bilinkActiveList and csActiveList
  68. * 08/06/00 mjn Added CWorkerJob
  69. * 08/09/00 mjn Added csConnectionList and m_bilinkIndicated
  70. * 08/11/00 mjn Added DN_OBJECT_FLAG_HOST_MIGRATING_2 flag (!)
  71. * 08/23/00 mjn Added DN_OBJECT_FLAG_DPNSVR_REGISTERED
  72. * 08/23/00 mjn Added CNameTableOp
  73. * 09/04/00 mjn Added CApplicationDesc
  74. * 09/13/00 rmt Bug #44625 - DPVOICE: Multihomed machines are not always enumerable (Added DN_OBJECT_FLAG_LOCALHOST flag).
  75. * 02/05/01 mjn Removed unused debug members from DIRECTNETOBJECT
  76. * mjn Added CCallbackThread
  77. * 03/30/01 mjn Changes to prevent multiple loading/unloading of SP's
  78. * mjn Added pConnectSP,dwMaxFrameSize
  79. * mjn Removed blSPCapsList
  80. * 04/04/01 mjn Re-ordered DirectNetObject fields
  81. * mjn Revised minor version number for DirectX8.1
  82. * mjn Added voice and lobby sigs
  83. * 04/05/01 mjn Added DPNID parameter to DNProcessHostMigration3()
  84. * 04/13/01 mjn Added m_bilinkRequestList
  85. * 05/17/01 mjn Added dwRunningOpCount,hRunningOpEvent,dwWaitingThreadID to track threads performing NameTable operations
  86. * 10/08/01 vanceo Added multicast support
  87. *@@END_MSINTERNAL
  88. *
  89. ***************************************************************************/
  90. #ifndef __DNCORE_H__
  91. #define __DNCORE_H__
  92. #include "AppDesc.h"
  93. #include "HandleTable.h"
  94. #include "NameTable.h"
  95. //**********************************************************************
  96. // Constant definitions
  97. //**********************************************************************
  98. //
  99. // Core version history
  100. //
  101. // 0.1 DirectX 8.0
  102. // 0.2 DirectX 8.1
  103. // 0.3 PocketPC
  104. // 0.4
  105. // 0.5 Windows Server 2003
  106. // 0.6 DirectX 9.0
  107. //
  108. #define DN_VERSION_MAJOR 0x0000
  109. #define DN_VERSION_MINOR 0x0005
  110. #define DN_VERSION_CURRENT ((DN_VERSION_MAJOR << 16) | DN_VERSION_MINOR)
  111. #define DN_OBJECT_FLAG_INITIALIZED 0x80000000
  112. #ifndef DPNBUILD_NOLOBBY
  113. #define DN_OBJECT_FLAG_LOBBY_AWARE 0x40000000
  114. #endif // ! DPNBUILD_NOLOBBY
  115. #define DN_OBJECT_FLAG_DPNSVR_REGISTERED 0x20000000
  116. #define DN_OBJECT_FLAG_LOCALHOST 0x10000000
  117. #define DN_OBJECT_FLAG_DISALLOW_ENUMS 0x04000000
  118. #define DN_OBJECT_FLAG_LISTENING 0x02000000
  119. #define DN_OBJECT_FLAG_ENUMERATING 0x01000000
  120. #define DN_OBJECT_FLAG_HOST_CONNECTED 0x00400000 // the original host will never have this flag set
  121. #define DN_OBJECT_FLAG_CONNECTING 0x00200000
  122. #define DN_OBJECT_FLAG_CONNECTED 0x00100000
  123. #define DN_OBJECT_FLAG_DISCONNECTING 0x00040000
  124. #define DN_OBJECT_FLAG_CLOSING_IMMEDIATE 0x00020000
  125. #define DN_OBJECT_FLAG_CLOSING 0x00010000
  126. #define DN_OBJECT_FLAG_HOST_MIGRATING_WAIT 0x00004000 // Wait for running operations to finish
  127. #define DN_OBJECT_FLAG_HOST_MIGRATING_2 0x00002000
  128. #define DN_OBJECT_FLAG_HOST_MIGRATING 0x00001000
  129. #ifndef DPNBUILD_NOPARAMVAL
  130. #define DN_OBJECT_FLAG_PARAMVALIDATION 0x00000010
  131. #endif // !DPNBUILD_NOPARAMVAL
  132. #ifndef DPNBUILD_NOMULTICAST
  133. #define DN_OBJECT_FLAG_MULTICAST 0x00000008
  134. #endif // ! DPNBUILD_NOMULTICAST
  135. #define DN_OBJECT_FLAG_PEER 0x00000004
  136. #define DN_OBJECT_FLAG_CLIENT 0x00000002
  137. #ifndef DPNBUILD_NOSERVER
  138. #define DN_OBJECT_FLAG_SERVER 0x00000001
  139. #endif // ! DPNBUILD_NOSERVER
  140. #define DN_GUID_STR_LEN 38 // {XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}
  141. #define DN_FLAG_STR_LEN 5 // FALSE (or TRUE or YES or NO)
  142. #if ((defined(DPNBUILD_ONLYONESP)) && (defined(DPNBUILD_ONLYONEADAPTER)))
  143. #define MAX_HOST_ADDRESSES 1
  144. #else // ! DPNBUILD_ONLYONESP or ! DPNBUILD_ONLYONEADAPTER
  145. #define MAX_HOST_ADDRESSES 8
  146. #endif // ! DPNBUILD_ONLYONESP or ! DPNBUILD_ONLYONEADAPTER
  147. #undef DPF_SUBCOMP
  148. #define DPF_SUBCOMP DN_SUBCOMP_CORE // Used by Debug Logging to determine sub-component
  149. //**********************************************************************
  150. // Macro definitions
  151. //**********************************************************************
  152. #ifndef DPNBUILD_NOPARAMVAL
  153. #define TRY _try
  154. #define EXCEPT(a) _except( a )
  155. #endif // !DPNBUILD_NOPARAMVAL
  156. //**********************************************************************
  157. // Global definitions
  158. //**********************************************************************
  159. extern DN_PROTOCOL_INTERFACE_VTBL g_ProtocolVTBL;
  160. #ifndef DPNBUILD_LIBINTERFACE
  161. extern LONG g_lCoreObjectCount;
  162. #endif // ! DPNBUILD_LIBINTERFACE
  163. //**********************************************************************
  164. // Structure definitions
  165. //**********************************************************************
  166. typedef struct IDirectPlay8Address IDirectPlay8Address; // DPNAddr.h
  167. typedef struct IDirectPlay8LobbiedApplication IDirectPlay8LobbiedApplication;
  168. typedef struct IDirectPlayVoiceNotify *PDIRECTPLAYVOICENOTIFY;
  169. class CAsyncOp;
  170. class CServiceProvider;
  171. class CSyncEvent;
  172. #ifndef DPNBUILD_NOVOICE
  173. //
  174. // Voice Additions
  175. //
  176. // this is the number of clients of IDirectPlayVoice in this process
  177. // this is actually a ridiculously large number of client slots.
  178. //
  179. #define MAX_VOICE_CLIENTS 32
  180. #endif // !DPNBUILD_NOVOICE
  181. typedef struct _DIRECTNETOBJECT
  182. {
  183. #ifdef DPNBUILD_LIBINTERFACE
  184. //
  185. // For lib interface builds, the interface Vtbl and refcount are embedded in the object itself.
  186. //
  187. LPVOID lpVtbl; // must be first entry in structure
  188. LONG lRefCount;
  189. #endif // DPNBUILD_LIBINTERFACE
  190. BYTE Sig[4]; // Signature
  191. //
  192. // DirectNet object flags
  193. // Protected by csDirectNetObject
  194. //
  195. DWORD volatile dwFlags;
  196. //
  197. // User information
  198. // Protected by csDirectNetObject
  199. //
  200. PVOID pvUserContext;
  201. PFNDPNMESSAGEHANDLER pfnDnUserMessageHandler;
  202. //
  203. // Shutdown info
  204. // Protected by csDirectNetObject
  205. //
  206. DWORD volatile dwLockCount; // Count to prevent closing
  207. DNHANDLE hLockEvent; // Set when dwLockCount=0
  208. //
  209. // Protocol information
  210. // Protected by csDirectNetObject
  211. //
  212. LONG volatile lProtocolRefCount; // Protocol usage
  213. CSyncEvent *hProtocolShutdownEvent;// No outstanding protocol operations
  214. HANDLE pdnProtocolData;
  215. //
  216. // Listen information
  217. // Protected by csDirectNetObject
  218. //
  219. CAsyncOp *pListenParent; // LISTEN async op
  220. DWORD dwMaxFrameSize; // Max frame size (cached for enum payload size checks)
  221. //
  222. // Connect information
  223. // Protected by csDirectNetObject
  224. //
  225. CAsyncOp *pConnectParent; // CONNECT async op
  226. PVOID pvConnectData; // Connect data
  227. DWORD dwConnectDataSize;
  228. CServiceProvider *pConnectSP; // SP used to connect (cached for future connects)
  229. IDirectPlay8Address *pIDP8ADevice; // SP Local Device
  230. IDirectPlay8Address *pConnectAddress; // Connect Address (cached) for clients
  231. //
  232. // Host migration information
  233. // Protected by csDirectNetObject
  234. //
  235. CNameTableEntry *pNewHost; // Host migration target
  236. DWORD volatile dwRunningOpCount; // Running operation count (wait for them during host migration)
  237. DNHANDLE hRunningOpEvent; // Running operation event (set when running ops finish)
  238. DWORD volatile dwWaitingThreadID; // Last thread to wait for outstanding running operations
  239. //
  240. // Outstanding callback threads (use csCallbackThreads)
  241. // Protected by csCallbackThreads
  242. //
  243. CBilink m_bilinkCallbackThreads;
  244. #ifdef DBG
  245. //
  246. // Outstanding CAsyncOps
  247. // Protected by csAsyncOperations
  248. //
  249. CBilink m_bilinkAsyncOps;
  250. #endif // DBG
  251. //
  252. // Outstanding CConnections
  253. // Protected by csConnectionList
  254. //
  255. CBilink m_bilinkConnections;
  256. CBilink m_bilinkIndicated; // Indicated connections
  257. //
  258. // Active CAsyncOps (w/ protocol handles, no requests)
  259. // Protected by csActiveList
  260. //
  261. CBilink m_bilinkActiveList;
  262. //
  263. // Request CAsyncOps (no active CAsyncOps)
  264. // Protected by csActiveList
  265. //
  266. CBilink m_bilinkRequestList;
  267. //
  268. // CBilink of NameTable pending deletions
  269. // Protected by csNameTableOpList
  270. //
  271. CBilink m_bilinkPendingDeletions;
  272. //
  273. // Protected by csServiceProviders
  274. //
  275. #ifdef DPNBUILD_ONLYONESP
  276. CServiceProvider * pOnlySP;
  277. #else // ! DPNBUILD_ONLYONESP
  278. CBilink m_bilinkServiceProviders;
  279. #endif // ! DPNBUILD_ONLYONESP
  280. #ifndef DPNBUILD_NONSEQUENTIALWORKERQUEUE
  281. //
  282. // Protected by csWorkerQueue
  283. //
  284. CBilink m_bilinkWorkerJobs;
  285. #endif // ! DPNBUILD_NONSEQUENTIALWORKERQUEUE
  286. IDirectPlay8ThreadPoolWork *pIDPThreadPoolWork; // pointer to thread pool work interface
  287. DWORD dwClosingThreadID; // ID of thread that called Close
  288. #ifndef DPNBUILD_NONSEQUENTIALWORKERQUEUE
  289. LONG volatile lThreadPoolRefCount;
  290. CSyncEvent *ThreadPoolShutDownEvent;
  291. BOOL fProcessingWorkerJobs; // whether a thread is currently processing worker jobs or not
  292. #endif // ! DPNBUILD_NONSEQUENTIALWORKERQUEUE
  293. //
  294. // Application Description
  295. //
  296. CApplicationDesc ApplicationDesc;
  297. //
  298. // Name Table
  299. //
  300. CNameTable NameTable;
  301. //
  302. // Handle Table
  303. //
  304. CHandleTable HandleTable;
  305. //
  306. // Critical Sections
  307. //
  308. #ifndef DPNBUILD_ONLYONETHREAD
  309. DNCRITICAL_SECTION csDirectNetObject; // access control critical section
  310. DNCRITICAL_SECTION csCallbackThreads; // CS to protect callback thread list CBilink
  311. #ifdef DBG
  312. DNCRITICAL_SECTION csAsyncOperations; // CS to protect outstanding async CBilink
  313. #endif // DBG
  314. DNCRITICAL_SECTION csActiveList; // CS to protect active list of AsyncOps
  315. DNCRITICAL_SECTION csConnectionList; // CS to protect Connection list
  316. DNCRITICAL_SECTION csNameTableOpList; // CS to protect NameTable operation list
  317. DNCRITICAL_SECTION csServiceProviders; // CS to protect Service Provider list
  318. #ifndef DPNBUILD_NONSEQUENTIALWORKERQUEUE
  319. DNCRITICAL_SECTION csWorkerQueue; // CS to protect worker thread job queue
  320. #endif // ! DPNBUILD_NONSEQUENTIALWORKERQUEUE
  321. #ifndef DPNBUILD_NOVOICE
  322. DNCRITICAL_SECTION csVoice; // CS to protect voice
  323. #endif // !DPNBUILD_NOVOICE
  324. #endif // !DPNBUILD_ONLYONETHREAD
  325. #ifndef DPNBUILD_NOVOICE
  326. //
  327. // Voice Additions
  328. // Protected by csVoice
  329. //
  330. BYTE VoiceSig[4];
  331. PDIRECTPLAYVOICENOTIFY lpDxVoiceNotifyServer;
  332. PDIRECTPLAYVOICENOTIFY lpDxVoiceNotifyClient;
  333. //
  334. // Send Target Cache for voice targets on DV_SendSpeechEx
  335. // Protected by csVoice
  336. //
  337. DWORD nTargets; // number of used entries in the target list
  338. DWORD nTargetListLen; // max number of target list entries list can hold
  339. PDPNID pTargetList; // ptr to target list array
  340. DWORD nExpandedTargets; // simplified list of targets, removes dup's
  341. DWORD nExpandedTargetListLen; // max number of target list entries list can hold
  342. PDPNID pExpandedTargetList; // ptr to array of simplified list of targets
  343. #endif // !DPNBUILD_NOVOICE
  344. #ifndef DPNBUILD_NOLOBBY
  345. //
  346. // Lobby additions
  347. //
  348. BYTE LobbySig[4];
  349. DPNHANDLE dpnhLobbyConnection; // Lobby Connection to update
  350. IDirectPlay8LobbiedApplication *pIDP8LobbiedApplication;
  351. #endif // ! DPNBUILD_NOLOBBY
  352. #ifndef DPNBUILD_NOMULTICAST
  353. //
  354. // Multicast additions
  355. // Protected by csDirectNetObject
  356. //
  357. CConnection *pMulticastSend; // Multicast send connection
  358. CBilink m_bilinkMulticast; // Multicast receive connections
  359. #endif // ! DPNBUILD_NOMULTICAST
  360. #ifdef DPNBUILD_PREALLOCATEDMEMORYMODEL
  361. BOOL fPoolsPrepopulated; // whether these pools have been prepopulated yet or not
  362. CFixedPool EnumReplyMemoryBlockPool; // pool for enum reply buffers
  363. #endif // DPNBUILD_PREALLOCATEDMEMORYMODEL
  364. } DIRECTNETOBJECT, *PDIRECTNETOBJECT;
  365. //**********************************************************************
  366. // Variable definitions
  367. //**********************************************************************
  368. extern CFixedPool g_RefCountBufferPool;
  369. extern CFixedPool g_SyncEventPool;
  370. extern CFixedPool g_ConnectionPool;
  371. extern CFixedPool g_GroupConnectionPool;
  372. extern CFixedPool g_GroupMemberPool;
  373. extern CFixedPool g_NameTableEntryPool;
  374. extern CFixedPool g_NameTableOpPool;
  375. extern CFixedPool g_AsyncOpPool;
  376. extern CFixedPool g_PendingDeletionPool;
  377. extern CFixedPool g_QueuedMsgPool;
  378. extern CFixedPool g_WorkerJobPool;
  379. extern CFixedPool g_MemoryBlockTinyPool;
  380. extern CFixedPool g_MemoryBlockSmallPool;
  381. extern CFixedPool g_MemoryBlockMediumPool;
  382. extern CFixedPool g_MemoryBlockLargePool;
  383. extern CFixedPool g_MemoryBlockHugePool;
  384. #ifdef DPNBUILD_LIBINTERFACE
  385. extern DWORD g_dwDP8StartupFlags;
  386. #endif // DPNBUILD_LIBINTERFACE
  387. //**********************************************************************
  388. // Function prototypes
  389. //**********************************************************************
  390. BOOL DNGlobalsInit(HANDLE hModule);
  391. VOID DNGlobalsDeInit();
  392. //
  393. // DirectNet Core Message Handler
  394. //
  395. HRESULT DN_CoreMessageHandler(PVOID const pv,
  396. const DWORD dwMsgId,
  397. const HANDLE hEndPt,
  398. PBYTE const pData,
  399. const DWORD dwDataSize,
  400. PVOID const pvUserContext,
  401. const HANDLE hProtocol,
  402. const HRESULT hr);
  403. //
  404. // Protocol Ref Counts
  405. //
  406. void DNProtocolAddRef(DIRECTNETOBJECT *const pdnObject);
  407. void DNProtocolRelease(DIRECTNETOBJECT *const pdnObject);
  408. #ifndef DPNBUILD_NONSEQUENTIALWORKERQUEUE
  409. //
  410. // Thread pool ref counts
  411. //
  412. void DNThreadPoolAddRef(DIRECTNETOBJECT *const pdnObject);
  413. void DNThreadPoolRelease(DIRECTNETOBJECT *const pdnObject);
  414. #endif // DPNBUILD_NONSEQUENTIALWORKERQUEUE
  415. #ifndef DPNBUILD_NOHOSTMIGRATE
  416. //
  417. // DirectNet - Host Migration routines
  418. //
  419. HRESULT DNFindNewHost(DIRECTNETOBJECT *const pdnObject,
  420. DPNID *const pdpnidNewHost);
  421. HRESULT DNPerformHostMigration1(DIRECTNETOBJECT *const pdnObject,
  422. const DPNID dpnidOldHost);
  423. HRESULT DNPerformHostMigration2(DIRECTNETOBJECT *const pdnObject);
  424. HRESULT DNPerformHostMigration3(DIRECTNETOBJECT *const pdnObject,
  425. void *const pMsg);
  426. HRESULT DNProcessHostMigration1(DIRECTNETOBJECT *const pdnObject,
  427. void *const pvMsg);
  428. HRESULT DNProcessHostMigration2(DIRECTNETOBJECT *const pdnObject,
  429. void *const pMsg);
  430. HRESULT DNProcessHostMigration3(DIRECTNETOBJECT *const pdnObject,
  431. const DPNID dpnid);
  432. HRESULT DNCompleteOutstandingOperations(DIRECTNETOBJECT *const pdnObject);
  433. HRESULT DNCheckReceivedAllVersions(DIRECTNETOBJECT *const pdnObject);
  434. HRESULT DNCleanUpNameTable(DIRECTNETOBJECT *const pdnObject);
  435. HRESULT DNSendHostMigrateCompleteMessage(DIRECTNETOBJECT *const pdnObject);
  436. #endif // !DPNBUILD_NOHOSTMIGRATE
  437. //
  438. // DirectNet - Protocol Interface (message handler callback functions)
  439. //
  440. HRESULT DNPIIndicateEnumQuery(void *const pvUserContext,
  441. void *const pvEndPtContext,
  442. const HANDLE hCommand,
  443. void *const pvEnumQueryData,
  444. const DWORD dwEnumQueryDataSize);
  445. HRESULT DNPIIndicateEnumResponse(void *const pvUserContext,
  446. const HANDLE hCommand,
  447. void *const pvCommandContext,
  448. void *const pvEnumResponseData,
  449. const DWORD dwEnumResponseDataSize);
  450. HRESULT DNPIIndicateConnect(void *const pvUserContext,
  451. void *const pvListenContext,
  452. const HANDLE hEndPt,
  453. void **const ppvEndPtContext);
  454. HRESULT DNPIIndicateDisconnect(void *const pvUserContext,
  455. void *const pvEndPtContext);
  456. HRESULT DNPIIndicateConnectionTerminated(void *const pvUserContext,
  457. void *const pvEndPtContext,
  458. const HRESULT hr);
  459. HRESULT DNPIIndicateReceive(void *const pvUserContext,
  460. void *const pvEndPtContext,
  461. void *const pvData,
  462. const DWORD dwDataSize,
  463. const HANDLE hBuffer,
  464. const DWORD dwFlags);
  465. HRESULT DNPICompleteListen(void *const pvUserContext,
  466. void **const ppvCommandContext,
  467. const HRESULT hr,
  468. const HANDLE hCommand);
  469. HRESULT DNPICompleteListenTerminate(void *const pvUserContext,
  470. void *const pvCommandContext,
  471. const HRESULT hr);
  472. HRESULT DNPICompleteEnumQuery(void *const pvUserContext,
  473. void *const pvCommandContext,
  474. const HRESULT hr);
  475. HRESULT DNPICompleteEnumResponse(void *const pvUserContext,
  476. void *const pvCommandContext,
  477. const HRESULT hr);
  478. HRESULT DNPICompleteConnect(void *const pvUserContext,
  479. void *const pvCommandContext,
  480. const HRESULT hr,
  481. const HANDLE hEndPt,
  482. void **const ppvEndPtContext);
  483. HRESULT DNPICompleteDisconnect(void *const pvUserContext,
  484. void *const pvCommandContext,
  485. const HRESULT hr);
  486. HRESULT DNPICompleteSend(void *const pvUserContext,
  487. void *const pvCommandContext,
  488. const HRESULT hr,
  489. DWORD dwFirstFrameRTT,
  490. DWORD dwFirstFrameRetryCount);
  491. HRESULT DNPIAddressInfoConnect(void *const pvUserContext,
  492. void *const pvCommandContext,
  493. const HRESULT hr,
  494. IDirectPlay8Address *const pHostAddress,
  495. IDirectPlay8Address *const pDeviceAddress );
  496. HRESULT DNPIAddressInfoEnum(void *const pvUserContext,
  497. void *const pvCommandContext,
  498. const HRESULT hr,
  499. IDirectPlay8Address *const pHostAddress,
  500. IDirectPlay8Address *const pDeviceAddress );
  501. HRESULT DNPIAddressInfoListen(void *const pvUserContext,
  502. void *const pvCommandContext,
  503. const HRESULT hr,
  504. IDirectPlay8Address *const pDeviceAddress );
  505. #ifndef DPNBUILD_NOMULTICAST
  506. HRESULT DNPIIndicateReceiveUnknownSender(void *const pvUserContext,
  507. void *const pvListenCommandContext,
  508. IDirectPlay8Address *const pSenderAddress,
  509. void *const pvData,
  510. const DWORD dwDataSize,
  511. const HANDLE hBuffer);
  512. HRESULT DNPICompleteMulticastConnect(void *const pvUserContext,
  513. void *const pvCommandContext,
  514. const HRESULT hrProt,
  515. const HANDLE hEndPt,
  516. void **const ppvEndPtContext);
  517. #endif // DPNBUILD_NOMULTICAST
  518. //**********************************************************************
  519. // Class prototypes
  520. //**********************************************************************
  521. #endif // __DNCORE_H__