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.

352 lines
4.8 KiB

  1. /*++
  2. Copyright (c) 1998, Microsoft Corporation
  3. Module Name:
  4. sharing.h
  5. Abstract:
  6. This module contains declarations for the API routines which support
  7. connection sharing.
  8. Author:
  9. Abolade Gbadegesin (aboladeg) 22-Apr-1998
  10. Revision History:
  11. --*/
  12. #ifndef _RASSHARE_SHARING_H_
  13. #define _RASSHARE_SHARING_H_
  14. //
  15. // MACRO DECLARATIONS
  16. //
  17. #define Dimension(x) (sizeof(x) / sizeof(x[0]))
  18. //
  19. // MPRAPI.DLL import prototypes
  20. //
  21. typedef DWORD
  22. (APIENTRY* PMPRCONFIGBUFFERFREE)(
  23. LPVOID
  24. );
  25. typedef DWORD
  26. (APIENTRY* PMPRCONFIGSERVERCONNECT)(
  27. LPWSTR,
  28. PHANDLE
  29. );
  30. typedef VOID
  31. (APIENTRY* PMPRCONFIGSERVERDISCONNECT)(
  32. HANDLE
  33. );
  34. typedef DWORD
  35. (APIENTRY* PMPRCONFIGTRANSPORTGETHANDLE)(
  36. HANDLE,
  37. DWORD,
  38. PHANDLE
  39. );
  40. typedef DWORD
  41. (APIENTRY* PMPRCONFIGTRANSPORTGETINFO)(
  42. HANDLE,
  43. HANDLE,
  44. LPBYTE*,
  45. LPDWORD,
  46. LPBYTE*,
  47. LPDWORD,
  48. LPWSTR*
  49. );
  50. typedef DWORD
  51. (APIENTRY* PMPRINFOBLOCKFIND)(
  52. LPVOID,
  53. DWORD,
  54. LPDWORD,
  55. LPDWORD,
  56. LPBYTE*
  57. );
  58. //
  59. // IPHLPAPI.DLL import prototypes
  60. //
  61. typedef DWORD
  62. (APIENTRY* PALLOCATEANDGETIPADDRTABLEFROMSTACK)(
  63. PMIB_IPADDRTABLE*,
  64. BOOL,
  65. HANDLE,
  66. DWORD
  67. );
  68. typedef DWORD
  69. (APIENTRY* PGETINTERFACEINFO)(
  70. PIP_INTERFACE_INFO,
  71. PULONG
  72. );
  73. typedef DWORD
  74. (APIENTRY* PSETADAPTERIPADDRESS)(
  75. PCHAR,
  76. BOOL,
  77. ULONG,
  78. ULONG,
  79. ULONG
  80. );
  81. //
  82. // OLE32.DLL import prototypes and instances
  83. //
  84. typedef HRESULT
  85. (STDAPICALLTYPE* PCOINITIALIZEEX)(
  86. LPVOID,
  87. DWORD
  88. );
  89. extern PCOINITIALIZEEX g_pCoInitializeEx;
  90. typedef VOID
  91. (STDAPICALLTYPE* PCOUNINITIALIZE)(
  92. VOID
  93. );
  94. extern PCOUNINITIALIZE g_pCoUninitialize;
  95. typedef HRESULT
  96. (STDAPICALLTYPE* PCOCREATEINSTANCE)(
  97. REFCLSID,
  98. LPUNKNOWN,
  99. DWORD,
  100. REFIID,
  101. LPVOID FAR*
  102. );
  103. extern PCOCREATEINSTANCE g_pCoCreateInstance;
  104. typedef HRESULT
  105. (STDAPICALLTYPE* PCOSETPROXYBLANKET)(
  106. IUnknown*,
  107. DWORD,
  108. DWORD,
  109. OLECHAR*,
  110. DWORD,
  111. DWORD,
  112. RPC_AUTH_IDENTITY_HANDLE,
  113. DWORD
  114. );
  115. extern PCOSETPROXYBLANKET g_pCoSetProxyBlanket;
  116. typedef VOID
  117. (STDAPICALLTYPE* PCOTASKMEMFREE)(
  118. LPVOID
  119. );
  120. extern PCOTASKMEMFREE g_pCoTaskMemFree;
  121. //
  122. // GLOBAL DATA DECLARATIONS
  123. //
  124. extern const WCHAR c_szSharedAccessParametersKey[];
  125. //
  126. // FUNCTION DECLARATIONS (in alphabetical order)
  127. //
  128. VOID
  129. CsControlService(
  130. ULONG ControlCode
  131. );
  132. BOOL
  133. CsDllMain(
  134. ULONG Reason
  135. );
  136. #if 0
  137. ULONG
  138. CsFirewallConnection(
  139. LPRASSHARECONN Connection,
  140. BOOLEAN Enable
  141. );
  142. #endif
  143. ULONG
  144. CsInitializeModule(
  145. VOID
  146. );
  147. #if 0
  148. BOOLEAN
  149. CsIsRoutingProtocolInstalled(
  150. ULONG ProtocolId
  151. );
  152. ULONG
  153. CsIsFirewalledConnection(
  154. LPRASSHARECONN Connection,
  155. PBOOLEAN Firewalled
  156. );
  157. #endif
  158. ULONG
  159. CsIsSharedConnection(
  160. LPRASSHARECONN Connection,
  161. PBOOLEAN Shared
  162. );
  163. #if 0
  164. ULONG
  165. CsMapGuidToAdapterIndex(
  166. PWCHAR Guid,
  167. PGETINTERFACEINFO GetInterfaceInfo
  168. );
  169. #endif
  170. NTSTATUS
  171. CsOpenKey(
  172. PHANDLE Key,
  173. ACCESS_MASK DesiredAccess,
  174. PCWSTR Name
  175. );
  176. #if 0
  177. ULONG
  178. CsQueryFirewallConnections(
  179. LPRASSHARECONN ConnectionArray,
  180. ULONG *ConnectionCount
  181. );
  182. ULONG
  183. CsQueryLanConnTable(
  184. LPRASSHARECONN ExcludeConnection,
  185. NETCON_PROPERTIES** LanConnTable,
  186. LPDWORD LanConnCount
  187. );
  188. #endif
  189. ULONG
  190. CsQuerySharedConnection(
  191. LPRASSHARECONN Connection
  192. );
  193. #if 0
  194. ULONG
  195. CsQuerySharedPrivateLan(
  196. GUID* LanGuid
  197. );
  198. ULONG
  199. CsQuerySharedPrivateLanAddress(
  200. PULONG Address
  201. );
  202. VOID
  203. CsQueryScopeInformation(
  204. IN OUT PHANDLE Key,
  205. PULONG Address,
  206. PULONG Mask
  207. );
  208. #endif
  209. NTSTATUS
  210. CsQueryValueKey(
  211. HANDLE Key,
  212. const WCHAR ValueName[],
  213. PKEY_VALUE_PARTIAL_INFORMATION* Information
  214. );
  215. #if 0
  216. ULONG
  217. CsRenameSharedConnection(
  218. LPRASSHARECONN NewConnection
  219. );
  220. ULONG
  221. CsSetupSharedPrivateLan(
  222. REFGUID LanGuid,
  223. BOOLEAN EnableSharing
  224. );
  225. ULONG
  226. CsSetSharedPrivateLan(
  227. REFGUID LanGuid
  228. );
  229. ULONG
  230. CsShareConnection(
  231. LPRASSHARECONN Connection
  232. );
  233. #endif
  234. VOID
  235. CsShutdownModule(
  236. VOID
  237. );
  238. #if 0
  239. ULONG
  240. CsStartService(
  241. VOID
  242. );
  243. VOID
  244. CsStopService(
  245. VOID
  246. );
  247. ULONG
  248. CsUnshareConnection(
  249. BOOLEAN RemovePrivateLan,
  250. PBOOLEAN Shared
  251. );
  252. VOID
  253. RasIdFromSharedConnection(
  254. IN LPRASSHARECONN pConn,
  255. IN LPWSTR pszId,
  256. IN INT cchMax
  257. );
  258. WCHAR*
  259. StrDupW(
  260. LPCWSTR psz
  261. );
  262. VOID
  263. TestBackupAddress(
  264. PWCHAR Guid
  265. );
  266. VOID
  267. TestRestoreAddress(
  268. PWCHAR Guid
  269. );
  270. VOID CsRefreshNetConnections(
  271. VOID
  272. );
  273. #endif
  274. #endif // _RASSHARE_SHARING_H_