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.

718 lines
19 KiB

  1. /*++
  2. Copyright (c) Microsoft Corporation. All rights reserved.
  3. Module Name:
  4. winnetwk.h
  5. Abstract:
  6. Standard WINNET Header File for WIN32
  7. Environment:
  8. User Mode -Win32
  9. Notes:
  10. optional-notes
  11. --*/
  12. #ifndef _WINNETWK_
  13. #define _WINNETWK_
  14. #ifndef _WINNETP_ ;internal_NT
  15. #define _WINNETP_ ;internal_NT
  16. #ifdef __cplusplus ;both
  17. extern "C" { ;both
  18. #endif ;both
  19. ;begin_internal_chicago
  20. #ifndef _INC_NETMPR_
  21. #include <netmpr.h>
  22. #endif
  23. ;end_internal_chicago
  24. //
  25. // Network types
  26. //
  27. #define WNNC_NET_MSNET 0x00010000
  28. #define WNNC_NET_LANMAN 0x00020000
  29. #define WNNC_NET_NETWARE 0x00030000
  30. #define WNNC_NET_VINES 0x00040000
  31. #define WNNC_NET_10NET 0x00050000
  32. #define WNNC_NET_LOCUS 0x00060000
  33. #define WNNC_NET_SUN_PC_NFS 0x00070000
  34. #define WNNC_NET_LANSTEP 0x00080000
  35. #define WNNC_NET_9TILES 0x00090000
  36. #define WNNC_NET_LANTASTIC 0x000A0000
  37. #define WNNC_NET_AS400 0x000B0000
  38. #define WNNC_NET_FTP_NFS 0x000C0000
  39. #define WNNC_NET_PATHWORKS 0x000D0000
  40. #define WNNC_NET_LIFENET 0x000E0000
  41. #define WNNC_NET_POWERLAN 0x000F0000
  42. #define WNNC_NET_BWNFS 0x00100000
  43. #define WNNC_NET_COGENT 0x00110000
  44. #define WNNC_NET_FARALLON 0x00120000
  45. #define WNNC_NET_APPLETALK 0x00130000
  46. #define WNNC_NET_INTERGRAPH 0x00140000
  47. #define WNNC_NET_SYMFONET 0x00150000
  48. #define WNNC_NET_CLEARCASE 0x00160000
  49. #define WNNC_NET_FRONTIER 0x00170000
  50. #define WNNC_NET_BMC 0x00180000
  51. #define WNNC_NET_DCE 0x00190000
  52. #define WNNC_NET_AVID 0x001A0000
  53. #define WNNC_NET_DOCUSPACE 0x001B0000
  54. #define WNNC_NET_MANGOSOFT 0x001C0000
  55. #define WNNC_NET_SERNET 0x001D0000
  56. #define WNNC_NET_RIVERFRONT1 0X001E0000
  57. #define WNNC_NET_RIVERFRONT2 0x001F0000
  58. #define WNNC_NET_DECORB 0x00200000
  59. #define WNNC_NET_PROTSTOR 0x00210000
  60. #define WNNC_NET_FJ_REDIR 0x00220000
  61. #define WNNC_NET_DISTINCT 0x00230000
  62. #define WNNC_NET_TWINS 0x00240000
  63. #define WNNC_NET_RDR2SAMPLE 0x00250000
  64. #define WNNC_NET_CSC 0x00260000
  65. #define WNNC_NET_3IN1 0x00270000
  66. ;begin_internal
  67. //
  68. // DON'T use 0x00280000 since some people may be
  69. // accidentally trying to use it for RDR2SAMPLE
  70. //
  71. ;end_internal
  72. #define WNNC_NET_EXTENDNET 0x00290000
  73. #define WNNC_NET_STAC 0x002A0000
  74. #define WNNC_NET_FOXBAT 0x002B0000
  75. #define WNNC_NET_YAHOO 0x002C0000
  76. #define WNNC_NET_EXIFS 0x002D0000
  77. #define WNNC_NET_DAV 0x002E0000
  78. #define WNNC_NET_KNOWARE 0x002F0000
  79. #define WNNC_NET_OBJECT_DIRE 0x00300000
  80. #define WNNC_NET_MASFAX 0x00310000
  81. #define WNNC_NET_HOB_NFS 0x00320000
  82. #define WNNC_NET_SHIVA 0x00330000
  83. #define WNNC_NET_IBMAL 0x00340000
  84. #define WNNC_NET_LOCK 0x00350000
  85. #define WNNC_NET_TERMSRV 0x00360000
  86. #define WNNC_NET_SRT 0x00370000
  87. #define WNNC_NET_QUINCY 0x00380000
  88. ;begin_internal
  89. //
  90. // Do NOT add new WNNC_NET_ constants without co-ordinating with PSS
  91. // (HeatherH/ToddC) and jschwart (NT bug #2396)
  92. //
  93. ;end_internal
  94. #define WNNC_CRED_MANAGER 0xFFFF0000
  95. //
  96. // Network Resources.
  97. //
  98. #define RESOURCE_CONNECTED 0x00000001
  99. #define RESOURCE_GLOBALNET 0x00000002
  100. #define RESOURCE_REMEMBERED 0x00000003
  101. ;begin_winver_400
  102. #define RESOURCE_RECENT 0x00000004
  103. #define RESOURCE_CONTEXT 0x00000005
  104. ;end_winver_400
  105. ;begin_internal
  106. ;begin_winver_500
  107. #define RESOURCE_SHAREABLE 0x00000006
  108. ;end_winver_500
  109. ;end_internal
  110. #define RESOURCETYPE_ANY 0x00000000
  111. #define RESOURCETYPE_DISK 0x00000001
  112. #define RESOURCETYPE_PRINT 0x00000002
  113. ;begin_winver_400
  114. #define RESOURCETYPE_RESERVED 0x00000008
  115. ;end_winver_400
  116. #define RESOURCETYPE_UNKNOWN 0xFFFFFFFF
  117. #define RESOURCEUSAGE_CONNECTABLE 0x00000001
  118. #define RESOURCEUSAGE_CONTAINER 0x00000002
  119. ;begin_winver_400
  120. #define RESOURCEUSAGE_NOLOCALDEVICE 0x00000004
  121. #define RESOURCEUSAGE_SIBLING 0x00000008
  122. #define RESOURCEUSAGE_ATTACHED 0x00000010
  123. #define RESOURCEUSAGE_ALL (RESOURCEUSAGE_CONNECTABLE | RESOURCEUSAGE_CONTAINER | RESOURCEUSAGE_ATTACHED)
  124. ;end_winver_400
  125. #define RESOURCEUSAGE_RESERVED 0x80000000
  126. #define RESOURCEDISPLAYTYPE_GENERIC 0x00000000
  127. #define RESOURCEDISPLAYTYPE_DOMAIN 0x00000001
  128. #define RESOURCEDISPLAYTYPE_SERVER 0x00000002
  129. #define RESOURCEDISPLAYTYPE_SHARE 0x00000003
  130. #define RESOURCEDISPLAYTYPE_FILE 0x00000004
  131. #define RESOURCEDISPLAYTYPE_GROUP 0x00000005
  132. ;begin_winver_400
  133. #define RESOURCEDISPLAYTYPE_NETWORK 0x00000006
  134. #define RESOURCEDISPLAYTYPE_ROOT 0x00000007
  135. #define RESOURCEDISPLAYTYPE_SHAREADMIN 0x00000008
  136. #define RESOURCEDISPLAYTYPE_DIRECTORY 0x00000009
  137. ;end_winver_400
  138. #define RESOURCEDISPLAYTYPE_TREE 0x0000000A
  139. ;begin_winver_400
  140. #define RESOURCEDISPLAYTYPE_NDSCONTAINER 0x0000000B
  141. ;end_winver_400
  142. typedef struct _NETRESOURCE% {
  143. DWORD dwScope;
  144. DWORD dwType;
  145. DWORD dwDisplayType;
  146. DWORD dwUsage;
  147. LPTSTR% lpLocalName;
  148. LPTSTR% lpRemoteName;
  149. LPTSTR% lpComment ;
  150. LPTSTR% lpProvider;
  151. }NETRESOURCE%, *LPNETRESOURCE%;
  152. //
  153. // Network Connections.
  154. //
  155. #define NETPROPERTY_PERSISTENT 1
  156. #define CONNECT_UPDATE_PROFILE 0x00000001
  157. #define CONNECT_UPDATE_RECENT 0x00000002
  158. #define CONNECT_TEMPORARY 0x00000004
  159. #define CONNECT_INTERACTIVE 0x00000008
  160. #define CONNECT_PROMPT 0x00000010
  161. #define CONNECT_NEED_DRIVE 0x00000020
  162. ;begin_winver_400
  163. #define CONNECT_REFCOUNT 0x00000040
  164. #define CONNECT_REDIRECT 0x00000080
  165. #define CONNECT_LOCALDRIVE 0x00000100
  166. #define CONNECT_CURRENT_MEDIA 0x00000200
  167. #define CONNECT_DEFERRED 0x00000400
  168. #define CONNECT_RESERVED 0xFF000000
  169. ;end_winver_400
  170. ;begin_winver_500
  171. #define CONNECT_COMMANDLINE 0x00000800
  172. #define CONNECT_CMD_SAVECRED 0x00001000
  173. ;end_winver_500
  174. DWORD APIENTRY
  175. WNetAddConnection%(
  176. IN LPCTSTR% lpRemoteName,
  177. IN LPCTSTR% lpPassword,
  178. IN LPCTSTR% lpLocalName
  179. );
  180. DWORD APIENTRY
  181. WNetAddConnection2%(
  182. IN LPNETRESOURCE% lpNetResource,
  183. IN LPCTSTR% lpPassword,
  184. IN LPCTSTR% lpUserName,
  185. IN DWORD dwFlags
  186. );
  187. DWORD APIENTRY
  188. WNetAddConnection3%(
  189. IN HWND hwndOwner,
  190. IN LPNETRESOURCE% lpNetResource,
  191. IN LPCTSTR% lpPassword,
  192. IN LPCTSTR% lpUserName,
  193. IN DWORD dwFlags
  194. );
  195. DWORD APIENTRY
  196. WNetCancelConnection%(
  197. IN LPCTSTR% lpName,
  198. IN BOOL fForce
  199. );
  200. DWORD APIENTRY
  201. WNetCancelConnection2%(
  202. IN LPCTSTR% lpName,
  203. IN DWORD dwFlags,
  204. IN BOOL fForce
  205. );
  206. DWORD APIENTRY
  207. WNetGetConnection%(
  208. IN LPCTSTR% lpLocalName,
  209. OUT LPTSTR% lpRemoteName,
  210. IN OUT LPDWORD lpnLength
  211. );
  212. ;begin_internal
  213. //
  214. // Structures and infolevels for WNetGetConnection3
  215. //
  216. #define WNGC_INFOLEVEL_DISCONNECTED 1
  217. typedef struct _WNGC_CONNECTION_STATE {
  218. DWORD dwState;
  219. } WNGC_CONNECTION_STATE, *LPWNGC_CONNECTION_STATE;
  220. // Values of the dwState field of WNGC_CONNECTION_STATE
  221. // for info level WNGC_INFOLEVEL_DISCONNECTED
  222. #define WNGC_CONNECTED 0x00000000
  223. #define WNGC_DISCONNECTED 0x00000001
  224. DWORD APIENTRY
  225. WNetGetConnection3%(
  226. IN LPCTSTR% lpLocalName,
  227. IN LPCTSTR% lpProviderName,
  228. IN DWORD dwInfoLevel,
  229. OUT LPVOID lpBuffer,
  230. IN OUT LPDWORD lpcbBuffer
  231. );
  232. //
  233. // WNetRestoreConnectionW is published externally as per the
  234. // consent decree since shlwapi.dll calls it. The SDK entry
  235. // contains a disclaimer that this API is subject to change.
  236. //
  237. ;end_internal
  238. DWORD APIENTRY
  239. WNetRestoreConnection%(
  240. IN HWND hwndParent,
  241. IN LPCTSTR% lpDevice
  242. );
  243. ;begin_internal
  244. // WNetRestoreConnection2 flags
  245. #define WNRC_NOUI 0x00000001
  246. DWORD APIENTRY
  247. WNetRestoreConnection2%(
  248. IN HWND hwndParent,
  249. IN LPCTSTR% lpDevice,
  250. IN DWORD dwFlags,
  251. OUT BOOL* pfReconnectFailed
  252. );
  253. ;end_internal
  254. ;begin_winver_400
  255. DWORD APIENTRY
  256. WNetUseConnection%(
  257. IN HWND hwndOwner,
  258. IN LPNETRESOURCE% lpNetResource,
  259. IN LPCTSTR% lpPassword,
  260. IN LPCTSTR% lpUserID,
  261. IN DWORD dwFlags,
  262. OUT LPTSTR% lpAccessName,
  263. IN OUT LPDWORD lpBufferSize,
  264. OUT LPDWORD lpResult
  265. );
  266. ;end_winver_400
  267. ;begin_internal
  268. DWORD APIENTRY
  269. WNetSetConnection%(
  270. IN LPCTSTR% lpName,
  271. IN DWORD dwProperties,
  272. IN LPVOID pvValues
  273. );
  274. ;end_internal
  275. //
  276. // Network Connection Dialogs.
  277. //
  278. DWORD APIENTRY
  279. WNetConnectionDialog(
  280. IN HWND hwnd,
  281. IN DWORD dwType
  282. );
  283. DWORD APIENTRY
  284. WNetDisconnectDialog(
  285. IN HWND hwnd,
  286. IN DWORD dwType
  287. );
  288. ;begin_winver_400
  289. typedef struct _CONNECTDLGSTRUCT%{
  290. DWORD cbStructure; /* size of this structure in bytes */
  291. HWND hwndOwner; /* owner window for the dialog */
  292. LPNETRESOURCE% lpConnRes;/* Requested Resource info */
  293. DWORD dwFlags; /* flags (see below) */
  294. DWORD dwDevNum; /* number of devices connected to */
  295. } CONNECTDLGSTRUCT%, FAR *LPCONNECTDLGSTRUCT%;
  296. #define CONNDLG_RO_PATH 0x00000001 /* Resource path should be read-only */
  297. #define CONNDLG_CONN_POINT 0x00000002 /* Netware -style movable connection point enabled */
  298. #define CONNDLG_USE_MRU 0x00000004 /* Use MRU combobox */
  299. #define CONNDLG_HIDE_BOX 0x00000008 /* Hide persistent connect checkbox */
  300. /*
  301. * NOTE: Set at most ONE of the below flags. If neither flag is set,
  302. * then the persistence is set to whatever the user chose during
  303. * a previous connection
  304. */
  305. #define CONNDLG_PERSIST 0x00000010 /* Force persistent connection */
  306. #define CONNDLG_NOT_PERSIST 0x00000020 /* Force connection NOT persistent */
  307. DWORD APIENTRY
  308. WNetConnectionDialog1%(
  309. IN OUT LPCONNECTDLGSTRUCT% lpConnDlgStruct
  310. );
  311. typedef struct _DISCDLGSTRUCT%{
  312. DWORD cbStructure; /* size of this structure in bytes */
  313. HWND hwndOwner; /* owner window for the dialog */
  314. LPTSTR% lpLocalName; /* local device name */
  315. LPTSTR% lpRemoteName; /* network resource name */
  316. DWORD dwFlags; /* flags */
  317. } DISCDLGSTRUCT%, FAR *LPDISCDLGSTRUCT%;
  318. #define DISC_UPDATE_PROFILE 0x00000001
  319. #define DISC_NO_FORCE 0x00000040
  320. DWORD APIENTRY
  321. WNetDisconnectDialog1%(
  322. IN LPDISCDLGSTRUCT% lpConnDlgStruct
  323. );
  324. ;end_winver_400
  325. //
  326. // Network Browsing.
  327. //
  328. DWORD APIENTRY
  329. WNetOpenEnum%(
  330. IN DWORD dwScope,
  331. IN DWORD dwType,
  332. IN DWORD dwUsage,
  333. IN LPNETRESOURCE% lpNetResource,
  334. OUT LPHANDLE lphEnum
  335. );
  336. DWORD APIENTRY
  337. WNetEnumResource%(
  338. IN HANDLE hEnum,
  339. IN OUT LPDWORD lpcCount,
  340. OUT LPVOID lpBuffer,
  341. IN OUT LPDWORD lpBufferSize
  342. );
  343. DWORD APIENTRY
  344. WNetCloseEnum(
  345. IN HANDLE hEnum
  346. );
  347. ;begin_winver_400
  348. DWORD APIENTRY
  349. WNetGetResourceParent%(
  350. IN LPNETRESOURCE% lpNetResource,
  351. OUT LPVOID lpBuffer,
  352. IN OUT LPDWORD lpcbBuffer
  353. );
  354. DWORD APIENTRY
  355. WNetGetResourceInformation%(
  356. IN LPNETRESOURCE% lpNetResource,
  357. OUT LPVOID lpBuffer,
  358. IN OUT LPDWORD lpcbBuffer,
  359. OUT LPTSTR% *lplpSystem
  360. );
  361. ;end_winver_400
  362. //
  363. // Universal Naming.
  364. //
  365. #define UNIVERSAL_NAME_INFO_LEVEL 0x00000001
  366. #define REMOTE_NAME_INFO_LEVEL 0x00000002
  367. typedef struct _UNIVERSAL_NAME_INFO% {
  368. LPTSTR% lpUniversalName;
  369. }UNIVERSAL_NAME_INFO%, *LPUNIVERSAL_NAME_INFO%;
  370. typedef struct _REMOTE_NAME_INFO% {
  371. LPTSTR% lpUniversalName;
  372. LPTSTR% lpConnectionName;
  373. LPTSTR% lpRemainingPath;
  374. }REMOTE_NAME_INFO%, *LPREMOTE_NAME_INFO%;
  375. DWORD APIENTRY
  376. WNetGetUniversalName%(
  377. IN LPCTSTR% lpLocalPath,
  378. IN DWORD dwInfoLevel,
  379. OUT LPVOID lpBuffer,
  380. IN OUT LPDWORD lpBufferSize
  381. );
  382. //
  383. // Authentication and Logon/Logoff.
  384. //
  385. DWORD APIENTRY
  386. WNetGetUser%(
  387. IN LPCTSTR% lpName,
  388. OUT LPTSTR% lpUserName,
  389. IN OUT LPDWORD lpnLength
  390. );
  391. ;begin_internal
  392. #if defined(_WIN32_WINDOWS)
  393. DWORD APIENTRY
  394. WNetLogon%(
  395. IN LPCTSTR% lpProvider,
  396. IN HWND hwndOwner
  397. );
  398. DWORD APIENTRY
  399. WNetLogoff%(
  400. IN LPCTSTR% lpProvider,
  401. IN HWND hwndOwner
  402. );
  403. DWORD APIENTRY
  404. WNetVerifyPassword%(
  405. IN LPCTSTR% lpszPassword,
  406. OUT BOOL FAR *pfMatch
  407. );
  408. #endif // _WIN32_WINDOWS
  409. ;end_internal
  410. ;begin_internal
  411. DWORD APIENTRY
  412. WNetGetHomeDirectory%(
  413. IN LPCTSTR% lpProviderName,
  414. OUT LPTSTR% lpDirectory,
  415. IN OUT LPDWORD lpBufferSize
  416. );
  417. ;end_internal
  418. //
  419. // Other.
  420. //
  421. ;begin_winver_400
  422. #define WNFMT_MULTILINE 0x01
  423. #define WNFMT_ABBREVIATED 0x02
  424. #define WNFMT_INENUM 0x10
  425. #define WNFMT_CONNECTION 0x20
  426. ;end_winver_400
  427. ;begin_internal
  428. DWORD APIENTRY
  429. WNetFormatNetworkName%(
  430. IN LPCTSTR% lpProvider,
  431. IN LPCTSTR% lpRemoteName,
  432. OUT LPTSTR% lpFormattedName,
  433. IN OUT LPDWORD lpnLength,
  434. IN DWORD dwFlags,
  435. IN DWORD dwAveCharPerLine
  436. );
  437. DWORD APIENTRY
  438. WNetGetProviderType%(
  439. IN LPCTSTR% lpProvider,
  440. OUT LPDWORD lpdwNetType
  441. );
  442. ;end_internal
  443. ;begin_winver_400
  444. DWORD APIENTRY
  445. WNetGetProviderName%(
  446. IN DWORD dwNetType,
  447. OUT LPTSTR% lpProviderName,
  448. IN OUT LPDWORD lpBufferSize
  449. );
  450. typedef struct _NETINFOSTRUCT{
  451. DWORD cbStructure;
  452. DWORD dwProviderVersion;
  453. DWORD dwStatus;
  454. DWORD dwCharacteristics;
  455. ULONG_PTR dwHandle;
  456. WORD wNetType;
  457. DWORD dwPrinters;
  458. DWORD dwDrives;
  459. } NETINFOSTRUCT, FAR *LPNETINFOSTRUCT;
  460. #define NETINFO_DLL16 0x00000001 /* Provider running as 16 bit Winnet Driver */
  461. #define NETINFO_DISKRED 0x00000004 /* Provider requires disk redirections to connect */
  462. #define NETINFO_PRINTERRED 0x00000008 /* Provider requires printer redirections to connect */
  463. DWORD APIENTRY
  464. WNetGetNetworkInformation%(
  465. IN LPCTSTR% lpProvider,
  466. OUT LPNETINFOSTRUCT lpNetInfoStruct
  467. );
  468. //
  469. // User Profiles.
  470. //
  471. typedef UINT (FAR PASCAL *PFNGETPROFILEPATH%) (
  472. LPCTSTR% pszUsername,
  473. LPTSTR% pszBuffer,
  474. UINT cbBuffer
  475. );
  476. typedef UINT (FAR PASCAL *PFNRECONCILEPROFILE%) (
  477. LPCTSTR% pszCentralFile,
  478. LPCTSTR% pszLocalFile,
  479. DWORD dwFlags
  480. );
  481. #define RP_LOGON 0x01 /* if set, do for logon, else for logoff */
  482. #define RP_INIFILE 0x02 /* if set, reconcile .INI file, else reg. hive */
  483. //
  484. // Policies.
  485. //
  486. typedef BOOL (FAR PASCAL *PFNPROCESSPOLICIES%) (
  487. HWND hwnd,
  488. LPCTSTR% pszPath,
  489. LPCTSTR% pszUsername,
  490. LPCTSTR% pszComputerName,
  491. DWORD dwFlags
  492. );
  493. #define PP_DISPLAYERRORS 0x01 /* if set, display error messages, else fail silently if error */
  494. ;end_winver_400
  495. //
  496. // Error handling.
  497. //
  498. DWORD APIENTRY
  499. WNetGetLastError%(
  500. OUT LPDWORD lpError,
  501. OUT LPTSTR% lpErrorBuf,
  502. IN DWORD nErrorBufSize,
  503. OUT LPTSTR% lpNameBuf,
  504. IN DWORD nNameBufSize
  505. );
  506. //
  507. // STATUS CODES
  508. //
  509. // General
  510. #define WN_SUCCESS NO_ERROR
  511. #define WN_NO_ERROR NO_ERROR
  512. #define WN_NOT_SUPPORTED ERROR_NOT_SUPPORTED
  513. #define WN_CANCEL ERROR_CANCELLED
  514. #define WN_RETRY ERROR_RETRY
  515. #define WN_NET_ERROR ERROR_UNEXP_NET_ERR
  516. #define WN_MORE_DATA ERROR_MORE_DATA
  517. #define WN_BAD_POINTER ERROR_INVALID_ADDRESS
  518. #define WN_BAD_VALUE ERROR_INVALID_PARAMETER
  519. #define WN_BAD_USER ERROR_BAD_USERNAME
  520. #define WN_BAD_PASSWORD ERROR_INVALID_PASSWORD
  521. #define WN_ACCESS_DENIED ERROR_ACCESS_DENIED
  522. #define WN_FUNCTION_BUSY ERROR_BUSY
  523. #define WN_WINDOWS_ERROR ERROR_UNEXP_NET_ERR
  524. #define WN_OUT_OF_MEMORY ERROR_NOT_ENOUGH_MEMORY
  525. #define WN_NO_NETWORK ERROR_NO_NETWORK
  526. #define WN_EXTENDED_ERROR ERROR_EXTENDED_ERROR
  527. #define WN_BAD_LEVEL ERROR_INVALID_LEVEL
  528. #define WN_BAD_HANDLE ERROR_INVALID_HANDLE
  529. ;begin_winver_400
  530. #define WN_NOT_INITIALIZING ERROR_ALREADY_INITIALIZED
  531. #define WN_NO_MORE_DEVICES ERROR_NO_MORE_DEVICES
  532. ;end_winver_400
  533. // Connection
  534. #define WN_NOT_CONNECTED ERROR_NOT_CONNECTED
  535. #define WN_OPEN_FILES ERROR_OPEN_FILES
  536. #define WN_DEVICE_IN_USE ERROR_DEVICE_IN_USE
  537. #define WN_BAD_NETNAME ERROR_BAD_NET_NAME
  538. #define WN_BAD_LOCALNAME ERROR_BAD_DEVICE
  539. #define WN_ALREADY_CONNECTED ERROR_ALREADY_ASSIGNED
  540. #define WN_DEVICE_ERROR ERROR_GEN_FAILURE
  541. #define WN_CONNECTION_CLOSED ERROR_CONNECTION_UNAVAIL
  542. #define WN_NO_NET_OR_BAD_PATH ERROR_NO_NET_OR_BAD_PATH
  543. #define WN_BAD_PROVIDER ERROR_BAD_PROVIDER
  544. #define WN_CANNOT_OPEN_PROFILE ERROR_CANNOT_OPEN_PROFILE
  545. #define WN_BAD_PROFILE ERROR_BAD_PROFILE
  546. #define WN_BAD_DEV_TYPE ERROR_BAD_DEV_TYPE
  547. #define WN_DEVICE_ALREADY_REMEMBERED ERROR_DEVICE_ALREADY_REMEMBERED
  548. #define WN_CONNECTED_OTHER_PASSWORD ERROR_CONNECTED_OTHER_PASSWORD
  549. ;begin_winver_501
  550. #define WN_CONNECTED_OTHER_PASSWORD_DEFAULT ERROR_CONNECTED_OTHER_PASSWORD_DEFAULT
  551. ;end_winver_501
  552. // Enumeration
  553. #define WN_NO_MORE_ENTRIES ERROR_NO_MORE_ITEMS
  554. #define WN_NOT_CONTAINER ERROR_NOT_CONTAINER
  555. ;begin_winver_400
  556. // Authentication
  557. #define WN_NOT_AUTHENTICATED ERROR_NOT_AUTHENTICATED
  558. #define WN_NOT_LOGGED_ON ERROR_NOT_LOGGED_ON
  559. #define WN_NOT_VALIDATED ERROR_NO_LOGON_SERVERS
  560. ;end_winver_400
  561. //
  562. // For Shell
  563. //
  564. ;begin_winver_400
  565. typedef struct _NETCONNECTINFOSTRUCT{
  566. DWORD cbStructure;
  567. DWORD dwFlags;
  568. DWORD dwSpeed;
  569. DWORD dwDelay;
  570. DWORD dwOptDataSize;
  571. } NETCONNECTINFOSTRUCT, *LPNETCONNECTINFOSTRUCT;
  572. #define WNCON_FORNETCARD 0x00000001
  573. #define WNCON_NOTROUTED 0x00000002
  574. #define WNCON_SLOWLINK 0x00000004
  575. #define WNCON_DYNAMIC 0x00000008
  576. DWORD APIENTRY
  577. MultinetGetConnectionPerformance%(
  578. IN LPNETRESOURCE% lpNetResource,
  579. OUT LPNETCONNECTINFOSTRUCT lpNetConnectInfoStruct
  580. );
  581. ;end_winver_400
  582. ;begin_internal
  583. DWORD APIENTRY
  584. WNetInitialize(
  585. void
  586. );
  587. DWORD APIENTRY
  588. MultinetGetErrorText%(
  589. OUT LPTSTR% lpErrorTextBuf,
  590. IN OUT LPDWORD lpnErrorBufSize,
  591. OUT LPTSTR% lpProviderNameBuf,
  592. IN OUT LPDWORD lpnNameBufSize
  593. );
  594. ;end_internal
  595. #ifdef __cplusplus ;both
  596. } ;both
  597. #endif ;both
  598. #endif // _WINNETP_ ;internal_NT
  599. #endif // _WINNETWK_