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.

240 lines
5.5 KiB

  1. #ifndef _WINNETP_
  2. #define _WINNETP_
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. //
  7. // DON'T use 0x00280000 since some people may be
  8. // accidentally trying to use it for RDR2SAMPLE
  9. //
  10. //
  11. // Do NOT add new WNNC_NET_ constants without co-ordinating with PSS
  12. // (HeatherH/ToddC) and jschwart (NT bug #2396)
  13. //
  14. #if(WINVER >= 0x0500)
  15. #define RESOURCE_SHAREABLE 0x00000006
  16. #endif /* WINVER >= 0x0500 */
  17. //
  18. // Structures and infolevels for WNetGetConnection3
  19. //
  20. #define WNGC_INFOLEVEL_DISCONNECTED 1
  21. typedef struct _WNGC_CONNECTION_STATE {
  22. DWORD dwState;
  23. } WNGC_CONNECTION_STATE, *LPWNGC_CONNECTION_STATE;
  24. // Values of the dwState field of WNGC_CONNECTION_STATE
  25. // for info level WNGC_INFOLEVEL_DISCONNECTED
  26. #define WNGC_CONNECTED 0x00000000
  27. #define WNGC_DISCONNECTED 0x00000001
  28. DWORD APIENTRY
  29. WNetGetConnection3A(
  30. IN LPCSTR lpLocalName,
  31. IN LPCSTR lpProviderName,
  32. IN DWORD dwInfoLevel,
  33. OUT LPVOID lpBuffer,
  34. IN OUT LPDWORD lpcbBuffer
  35. );
  36. DWORD APIENTRY
  37. WNetGetConnection3W(
  38. IN LPCWSTR lpLocalName,
  39. IN LPCWSTR lpProviderName,
  40. IN DWORD dwInfoLevel,
  41. OUT LPVOID lpBuffer,
  42. IN OUT LPDWORD lpcbBuffer
  43. );
  44. #ifdef UNICODE
  45. #define WNetGetConnection3 WNetGetConnection3W
  46. #else
  47. #define WNetGetConnection3 WNetGetConnection3A
  48. #endif // !UNICODE
  49. //
  50. // WNetRestoreConnectionW is published externally as per the
  51. // consent decree since shlwapi.dll calls it. The SDK entry
  52. // contains a disclaimer that this API is subject to change.
  53. //
  54. // WNetRestoreConnection2 flags
  55. #define WNRC_NOUI 0x00000001
  56. DWORD APIENTRY
  57. WNetRestoreConnection2A(
  58. IN HWND hwndParent,
  59. IN LPCSTR lpDevice,
  60. IN DWORD dwFlags,
  61. OUT BOOL* pfReconnectFailed
  62. );
  63. DWORD APIENTRY
  64. WNetRestoreConnection2W(
  65. IN HWND hwndParent,
  66. IN LPCWSTR lpDevice,
  67. IN DWORD dwFlags,
  68. OUT BOOL* pfReconnectFailed
  69. );
  70. #ifdef UNICODE
  71. #define WNetRestoreConnection2 WNetRestoreConnection2W
  72. #else
  73. #define WNetRestoreConnection2 WNetRestoreConnection2A
  74. #endif // !UNICODE
  75. DWORD APIENTRY
  76. WNetSetConnectionA(
  77. IN LPCSTR lpName,
  78. IN DWORD dwProperties,
  79. IN LPVOID pvValues
  80. );
  81. DWORD APIENTRY
  82. WNetSetConnectionW(
  83. IN LPCWSTR lpName,
  84. IN DWORD dwProperties,
  85. IN LPVOID pvValues
  86. );
  87. #ifdef UNICODE
  88. #define WNetSetConnection WNetSetConnectionW
  89. #else
  90. #define WNetSetConnection WNetSetConnectionA
  91. #endif // !UNICODE
  92. #if defined(_WIN32_WINDOWS)
  93. DWORD APIENTRY
  94. WNetLogonA(
  95. IN LPCSTR lpProvider,
  96. IN HWND hwndOwner
  97. );
  98. DWORD APIENTRY
  99. WNetLogonW(
  100. IN LPCWSTR lpProvider,
  101. IN HWND hwndOwner
  102. );
  103. #ifdef UNICODE
  104. #define WNetLogon WNetLogonW
  105. #else
  106. #define WNetLogon WNetLogonA
  107. #endif // !UNICODE
  108. DWORD APIENTRY
  109. WNetLogoffA(
  110. IN LPCSTR lpProvider,
  111. IN HWND hwndOwner
  112. );
  113. DWORD APIENTRY
  114. WNetLogoffW(
  115. IN LPCWSTR lpProvider,
  116. IN HWND hwndOwner
  117. );
  118. #ifdef UNICODE
  119. #define WNetLogoff WNetLogoffW
  120. #else
  121. #define WNetLogoff WNetLogoffA
  122. #endif // !UNICODE
  123. DWORD APIENTRY
  124. WNetVerifyPasswordA(
  125. IN LPCSTR lpszPassword,
  126. OUT BOOL FAR *pfMatch
  127. );
  128. DWORD APIENTRY
  129. WNetVerifyPasswordW(
  130. IN LPCWSTR lpszPassword,
  131. OUT BOOL FAR *pfMatch
  132. );
  133. #ifdef UNICODE
  134. #define WNetVerifyPassword WNetVerifyPasswordW
  135. #else
  136. #define WNetVerifyPassword WNetVerifyPasswordA
  137. #endif // !UNICODE
  138. #endif // _WIN32_WINDOWS
  139. DWORD APIENTRY
  140. WNetGetHomeDirectoryA(
  141. IN LPCSTR lpProviderName,
  142. OUT LPSTR lpDirectory,
  143. IN OUT LPDWORD lpBufferSize
  144. );
  145. DWORD APIENTRY
  146. WNetGetHomeDirectoryW(
  147. IN LPCWSTR lpProviderName,
  148. OUT LPWSTR lpDirectory,
  149. IN OUT LPDWORD lpBufferSize
  150. );
  151. #ifdef UNICODE
  152. #define WNetGetHomeDirectory WNetGetHomeDirectoryW
  153. #else
  154. #define WNetGetHomeDirectory WNetGetHomeDirectoryA
  155. #endif // !UNICODE
  156. DWORD APIENTRY
  157. WNetFormatNetworkNameA(
  158. IN LPCSTR lpProvider,
  159. IN LPCSTR lpRemoteName,
  160. OUT LPSTR lpFormattedName,
  161. IN OUT LPDWORD lpnLength,
  162. IN DWORD dwFlags,
  163. IN DWORD dwAveCharPerLine
  164. );
  165. DWORD APIENTRY
  166. WNetFormatNetworkNameW(
  167. IN LPCWSTR lpProvider,
  168. IN LPCWSTR lpRemoteName,
  169. OUT LPWSTR lpFormattedName,
  170. IN OUT LPDWORD lpnLength,
  171. IN DWORD dwFlags,
  172. IN DWORD dwAveCharPerLine
  173. );
  174. #ifdef UNICODE
  175. #define WNetFormatNetworkName WNetFormatNetworkNameW
  176. #else
  177. #define WNetFormatNetworkName WNetFormatNetworkNameA
  178. #endif // !UNICODE
  179. DWORD APIENTRY
  180. WNetGetProviderTypeA(
  181. IN LPCSTR lpProvider,
  182. OUT LPDWORD lpdwNetType
  183. );
  184. DWORD APIENTRY
  185. WNetGetProviderTypeW(
  186. IN LPCWSTR lpProvider,
  187. OUT LPDWORD lpdwNetType
  188. );
  189. #ifdef UNICODE
  190. #define WNetGetProviderType WNetGetProviderTypeW
  191. #else
  192. #define WNetGetProviderType WNetGetProviderTypeA
  193. #endif // !UNICODE
  194. DWORD APIENTRY
  195. WNetInitialize(
  196. void
  197. );
  198. DWORD APIENTRY
  199. MultinetGetErrorTextA(
  200. OUT LPSTR lpErrorTextBuf,
  201. IN OUT LPDWORD lpnErrorBufSize,
  202. OUT LPSTR lpProviderNameBuf,
  203. IN OUT LPDWORD lpnNameBufSize
  204. );
  205. DWORD APIENTRY
  206. MultinetGetErrorTextW(
  207. OUT LPWSTR lpErrorTextBuf,
  208. IN OUT LPDWORD lpnErrorBufSize,
  209. OUT LPWSTR lpProviderNameBuf,
  210. IN OUT LPDWORD lpnNameBufSize
  211. );
  212. #ifdef UNICODE
  213. #define MultinetGetErrorText MultinetGetErrorTextW
  214. #else
  215. #define MultinetGetErrorText MultinetGetErrorTextA
  216. #endif // !UNICODE
  217. #ifdef __cplusplus
  218. }
  219. #endif
  220. #endif // _WINNETP_