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.

159 lines
6.0 KiB

  1. /*==========================================================================
  2. *
  3. * Copyright (C) 2000 Microsoft Corporation. All Rights Reserved.
  4. *
  5. * File: Connect.h
  6. * Content: DirectNet connect and disconnect routines
  7. *@@BEGIN_MSINTERNAL
  8. * History:
  9. * Date By Reason
  10. * ==== == ======
  11. * 01/11/00 mjn Created
  12. * 01/11/00 mjn Use CPackedBuffers instead of DN_ENUM_BUFFER_INFOs
  13. * 01/17/00 mjn Fixed ConnectToPeer function names
  14. * 01/18/00 mjn Moved Pack/UnpackNameTableInfo to NameTable.cpp
  15. * 01/18/00 mjn Added DNAutoDestructGroups
  16. * 01/22/00 mjn Added DNProcessHostDestroyPlayer
  17. * 03/24/00 mjn Set player context through INDICATE_CONNECT notification
  18. * 04/03/00 mjn Verify DNET version on connect
  19. * 04/12/00 mjn Removed DNAutoDestructGroups - covered in NameTable.DeletePlayer()
  20. * 04/20/00 mjn Added DNGetClearAddress
  21. * 05/23/00 mjn Added DNConnectToPeerFailed()
  22. * 06/14/00 mjn Added DNGetLocalAddress()
  23. * 06/24/00 mjn Added DNHostDropPlayer()
  24. * 07/20/00 mjn Structure changes and new function parameters
  25. * mjn Moved DN_INTERNAL_MESSAGE_PLAYER_CONNECT_INFO and DN_INTERNAL_MESSAGE_INSTRUCTED_CONNECT_FAILED to message.h
  26. * 07/30/00 mjn Renamed DNGetLocalAddress() to DNGetLocalDeviceAddress()
  27. * 07/31/00 mjn Added dwDestroyReason to DNHostDisconnect()
  28. * 10/11/00 mjn DNAbortConnect() takes HRESULT parameters instead of PVOID
  29. * 06/07/01 mjn Added connection parameter to DNConnectToHostFailed()
  30. *@@END_MSINTERNAL
  31. *
  32. ***************************************************************************/
  33. #ifndef __CONNECT_H__
  34. #define __CONNECT_H__
  35. //**********************************************************************
  36. // Constant definitions
  37. //**********************************************************************
  38. //**********************************************************************
  39. // Macro definitions
  40. //**********************************************************************
  41. //**********************************************************************
  42. // Structure definitions
  43. //**********************************************************************
  44. typedef struct {
  45. HRESULT hResultCode;
  46. } DN_RESULT_CONNECT;
  47. //**********************************************************************
  48. // Variable definitions
  49. //**********************************************************************
  50. //**********************************************************************
  51. // Function prototypes
  52. //**********************************************************************
  53. // DirectNet - Connect routines
  54. HRESULT DNHostConnect1(DIRECTNETOBJECT *const pdnObject,
  55. const PVOID pvBuffer,
  56. const DWORD dwBufferSize,
  57. CConnection *const pConnection);
  58. HRESULT DNHostConnect2(DIRECTNETOBJECT *const pdnObject,
  59. CConnection *const pConnection);
  60. HRESULT DNHostVerifyConnect(DIRECTNETOBJECT *const pdnObject,
  61. CConnection *const pConnection,
  62. const DWORD dwFlags,
  63. const DWORD dwDNETVersion,
  64. UNALIGNED WCHAR *const pwszPassword,
  65. GUID *const pguidApplication,
  66. GUID *const pguidInstance,
  67. PVOID const pvConnectData,
  68. const DWORD dwConnectDataSize,
  69. IDirectPlay8Address *const pAddress,
  70. void **const ppvPlayerContext,
  71. void **const ppvReplyBuffer,
  72. DWORD *const pdwReplyBufferSize,
  73. void **const ppvReplyBufferContext);
  74. HRESULT DNHostDropPlayer(DIRECTNETOBJECT *const pdnObject,
  75. const DPNID dpnid,
  76. void *const pvBuffer);
  77. HRESULT DNPrepareConnectInfo(DIRECTNETOBJECT *const pdnObject,
  78. CConnection *const pConnection,
  79. CRefCountBuffer **const ppRefCountBuffer);
  80. HRESULT DNConnectToHost1(DIRECTNETOBJECT *const pdnObject,
  81. CConnection *const pConnection);
  82. HRESULT DNConnectToHost2(DIRECTNETOBJECT *const pdnObject,
  83. const PVOID pvData,
  84. CConnection *const pConnection);
  85. HRESULT DNConnectToHostFailed(DIRECTNETOBJECT *const pdnObject,
  86. PVOID const pvBuffer,
  87. const DWORD dwBufferSize,
  88. CConnection *const pConnection);
  89. HRESULT DNAbortConnect(DIRECTNETOBJECT *const pdnObject,
  90. const HRESULT hrConnect);
  91. HRESULT DNPlayerConnect1(DIRECTNETOBJECT *const pdnObject,
  92. const PVOID pv,
  93. CConnection *const pConnection);
  94. HRESULT DNConnectToPeer1(DIRECTNETOBJECT *const pdnObject,PVOID const pv);
  95. HRESULT DNConnectToPeer2(DIRECTNETOBJECT *const pdnObject,PVOID const pv);
  96. HRESULT DNConnectToPeer3(DIRECTNETOBJECT *const pdnObject,
  97. const DPNID dpnid,
  98. CConnection *const pConnection);
  99. HRESULT DNConnectToPeerFailed(DIRECTNETOBJECT *const pdnObject,
  100. const DPNID dpnid);
  101. HRESULT DNSendConnectInfo(DIRECTNETOBJECT *const pdnObject,
  102. CNameTableEntry *const pNTEntry,
  103. CConnection *const pConnection,
  104. void *const pvReplyBuffer,
  105. const DWORD dwReplyBufferSize);
  106. HRESULT DNReceiveConnectInfo(DIRECTNETOBJECT *const pdnObject,
  107. void *const pvBuffer,
  108. CConnection *const pHostConnection,
  109. DPNID *const pdpnid);
  110. HRESULT DNAbortLocalConnect(DIRECTNETOBJECT *const pdnObject);
  111. // DirectNet - Disconnection routines
  112. HRESULT DNLocalDisconnectNew(DIRECTNETOBJECT *const pdnObject);
  113. HRESULT DNPlayerDisconnectNew(DIRECTNETOBJECT *const pdnObject,
  114. const DPNID dpnidDisconnecting);
  115. HRESULT DNHostDisconnect(DIRECTNETOBJECT *const pdnObject,
  116. const DPNID dpnidDisconnecting,
  117. const DWORD dwDestroyReason);
  118. HRESULT DNInstructedDisconnect(DIRECTNETOBJECT *const pdnObject,
  119. PVOID pv);
  120. HRESULT DNProcessHostDestroyPlayer(DIRECTNETOBJECT *const pdnObject,void *const pv);
  121. HRESULT DNGetClearAddress(DIRECTNETOBJECT *const pdnObject,
  122. const HANDLE hEndPt,
  123. IDirectPlay8Address **const ppAddress,
  124. const BOOL fPartner);
  125. HRESULT DNGetLocalDeviceAddress(DIRECTNETOBJECT *const pdnObject,
  126. const HANDLE hEndPt,
  127. IDirectPlay8Address **const ppAddress);
  128. #endif // __CONNECT_H__