Source code of Windows XP (NT5)
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.

249 lines
5.4 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. DWORD APIENTRY
  50. WNetRestoreConnectionA(
  51. IN HWND hwndParent,
  52. IN LPCSTR lpDevice
  53. );
  54. DWORD APIENTRY
  55. WNetRestoreConnectionW(
  56. IN HWND hwndParent,
  57. IN LPCWSTR lpDevice
  58. );
  59. #ifdef UNICODE
  60. #define WNetRestoreConnection WNetRestoreConnectionW
  61. #else
  62. #define WNetRestoreConnection WNetRestoreConnectionA
  63. #endif // !UNICODE
  64. // WNetRestoreConnection2 flags
  65. #define WNRC_NOUI 0x00000001
  66. DWORD APIENTRY
  67. WNetRestoreConnection2A(
  68. IN HWND hwndParent,
  69. IN LPCSTR lpDevice,
  70. IN DWORD dwFlags,
  71. OUT BOOL* pfReconnectFailed
  72. );
  73. DWORD APIENTRY
  74. WNetRestoreConnection2W(
  75. IN HWND hwndParent,
  76. IN LPCWSTR lpDevice,
  77. IN DWORD dwFlags,
  78. OUT BOOL* pfReconnectFailed
  79. );
  80. #ifdef UNICODE
  81. #define WNetRestoreConnection2 WNetRestoreConnection2W
  82. #else
  83. #define WNetRestoreConnection2 WNetRestoreConnection2A
  84. #endif // !UNICODE
  85. DWORD APIENTRY
  86. WNetSetConnectionA(
  87. IN LPCSTR lpName,
  88. IN DWORD dwProperties,
  89. IN LPVOID pvValues
  90. );
  91. DWORD APIENTRY
  92. WNetSetConnectionW(
  93. IN LPCWSTR lpName,
  94. IN DWORD dwProperties,
  95. IN LPVOID pvValues
  96. );
  97. #ifdef UNICODE
  98. #define WNetSetConnection WNetSetConnectionW
  99. #else
  100. #define WNetSetConnection WNetSetConnectionA
  101. #endif // !UNICODE
  102. #if defined(_WIN32_WINDOWS)
  103. DWORD APIENTRY
  104. WNetLogonA(
  105. IN LPCSTR lpProvider,
  106. IN HWND hwndOwner
  107. );
  108. DWORD APIENTRY
  109. WNetLogonW(
  110. IN LPCWSTR lpProvider,
  111. IN HWND hwndOwner
  112. );
  113. #ifdef UNICODE
  114. #define WNetLogon WNetLogonW
  115. #else
  116. #define WNetLogon WNetLogonA
  117. #endif // !UNICODE
  118. DWORD APIENTRY
  119. WNetLogoffA(
  120. IN LPCSTR lpProvider,
  121. IN HWND hwndOwner
  122. );
  123. DWORD APIENTRY
  124. WNetLogoffW(
  125. IN LPCWSTR lpProvider,
  126. IN HWND hwndOwner
  127. );
  128. #ifdef UNICODE
  129. #define WNetLogoff WNetLogoffW
  130. #else
  131. #define WNetLogoff WNetLogoffA
  132. #endif // !UNICODE
  133. DWORD APIENTRY
  134. WNetVerifyPasswordA(
  135. IN LPCSTR lpszPassword,
  136. OUT BOOL FAR *pfMatch
  137. );
  138. DWORD APIENTRY
  139. WNetVerifyPasswordW(
  140. IN LPCWSTR lpszPassword,
  141. OUT BOOL FAR *pfMatch
  142. );
  143. #ifdef UNICODE
  144. #define WNetVerifyPassword WNetVerifyPasswordW
  145. #else
  146. #define WNetVerifyPassword WNetVerifyPasswordA
  147. #endif // !UNICODE
  148. #endif // _WIN32_WINDOWS
  149. DWORD APIENTRY
  150. WNetGetHomeDirectoryA(
  151. IN LPCSTR lpProviderName,
  152. OUT LPSTR lpDirectory,
  153. IN OUT LPDWORD lpBufferSize
  154. );
  155. DWORD APIENTRY
  156. WNetGetHomeDirectoryW(
  157. IN LPCWSTR lpProviderName,
  158. OUT LPWSTR lpDirectory,
  159. IN OUT LPDWORD lpBufferSize
  160. );
  161. #ifdef UNICODE
  162. #define WNetGetHomeDirectory WNetGetHomeDirectoryW
  163. #else
  164. #define WNetGetHomeDirectory WNetGetHomeDirectoryA
  165. #endif // !UNICODE
  166. DWORD APIENTRY
  167. WNetFormatNetworkNameA(
  168. IN LPCSTR lpProvider,
  169. IN LPCSTR lpRemoteName,
  170. OUT LPSTR lpFormattedName,
  171. IN OUT LPDWORD lpnLength,
  172. IN DWORD dwFlags,
  173. IN DWORD dwAveCharPerLine
  174. );
  175. DWORD APIENTRY
  176. WNetFormatNetworkNameW(
  177. IN LPCWSTR lpProvider,
  178. IN LPCWSTR lpRemoteName,
  179. OUT LPWSTR lpFormattedName,
  180. IN OUT LPDWORD lpnLength,
  181. IN DWORD dwFlags,
  182. IN DWORD dwAveCharPerLine
  183. );
  184. #ifdef UNICODE
  185. #define WNetFormatNetworkName WNetFormatNetworkNameW
  186. #else
  187. #define WNetFormatNetworkName WNetFormatNetworkNameA
  188. #endif // !UNICODE
  189. DWORD APIENTRY
  190. WNetGetProviderTypeA(
  191. IN LPCSTR lpProvider,
  192. OUT LPDWORD lpdwNetType
  193. );
  194. DWORD APIENTRY
  195. WNetGetProviderTypeW(
  196. IN LPCWSTR lpProvider,
  197. OUT LPDWORD lpdwNetType
  198. );
  199. #ifdef UNICODE
  200. #define WNetGetProviderType WNetGetProviderTypeW
  201. #else
  202. #define WNetGetProviderType WNetGetProviderTypeA
  203. #endif // !UNICODE
  204. DWORD APIENTRY
  205. WNetInitialize(
  206. void
  207. );
  208. DWORD APIENTRY
  209. MultinetGetErrorTextA(
  210. OUT LPSTR lpErrorTextBuf,
  211. IN OUT LPDWORD lpnErrorBufSize,
  212. OUT LPSTR lpProviderNameBuf,
  213. IN OUT LPDWORD lpnNameBufSize
  214. );
  215. DWORD APIENTRY
  216. MultinetGetErrorTextW(
  217. OUT LPWSTR lpErrorTextBuf,
  218. IN OUT LPDWORD lpnErrorBufSize,
  219. OUT LPWSTR lpProviderNameBuf,
  220. IN OUT LPDWORD lpnNameBufSize
  221. );
  222. #ifdef UNICODE
  223. #define MultinetGetErrorText MultinetGetErrorTextW
  224. #else
  225. #define MultinetGetErrorText MultinetGetErrorTextA
  226. #endif // !UNICODE
  227. #ifdef __cplusplus
  228. }
  229. #endif
  230. #endif // _WINNETP_