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.

706 lines
18 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. ;begin_internal
  87. //
  88. // Do NOT add new WNNC_NET_ constants without co-ordinating with PSS
  89. // (HeatherH/ToddC) and jschwart (NT bug #2396)
  90. //
  91. ;end_internal
  92. #define WNNC_CRED_MANAGER 0xFFFF0000
  93. //
  94. // Network Resources.
  95. //
  96. #define RESOURCE_CONNECTED 0x00000001
  97. #define RESOURCE_GLOBALNET 0x00000002
  98. #define RESOURCE_REMEMBERED 0x00000003
  99. ;begin_winver_400
  100. #define RESOURCE_RECENT 0x00000004
  101. #define RESOURCE_CONTEXT 0x00000005
  102. ;end_winver_400
  103. ;begin_internal
  104. ;begin_winver_500
  105. #define RESOURCE_SHAREABLE 0x00000006
  106. ;end_winver_500
  107. ;end_internal
  108. #define RESOURCETYPE_ANY 0x00000000
  109. #define RESOURCETYPE_DISK 0x00000001
  110. #define RESOURCETYPE_PRINT 0x00000002
  111. ;begin_winver_400
  112. #define RESOURCETYPE_RESERVED 0x00000008
  113. ;end_winver_400
  114. #define RESOURCETYPE_UNKNOWN 0xFFFFFFFF
  115. #define RESOURCEUSAGE_CONNECTABLE 0x00000001
  116. #define RESOURCEUSAGE_CONTAINER 0x00000002
  117. ;begin_winver_400
  118. #define RESOURCEUSAGE_NOLOCALDEVICE 0x00000004
  119. #define RESOURCEUSAGE_SIBLING 0x00000008
  120. #define RESOURCEUSAGE_ATTACHED 0x00000010
  121. #define RESOURCEUSAGE_ALL (RESOURCEUSAGE_CONNECTABLE | RESOURCEUSAGE_CONTAINER | RESOURCEUSAGE_ATTACHED)
  122. ;end_winver_400
  123. #define RESOURCEUSAGE_RESERVED 0x80000000
  124. #define RESOURCEDISPLAYTYPE_GENERIC 0x00000000
  125. #define RESOURCEDISPLAYTYPE_DOMAIN 0x00000001
  126. #define RESOURCEDISPLAYTYPE_SERVER 0x00000002
  127. #define RESOURCEDISPLAYTYPE_SHARE 0x00000003
  128. #define RESOURCEDISPLAYTYPE_FILE 0x00000004
  129. #define RESOURCEDISPLAYTYPE_GROUP 0x00000005
  130. ;begin_winver_400
  131. #define RESOURCEDISPLAYTYPE_NETWORK 0x00000006
  132. #define RESOURCEDISPLAYTYPE_ROOT 0x00000007
  133. #define RESOURCEDISPLAYTYPE_SHAREADMIN 0x00000008
  134. #define RESOURCEDISPLAYTYPE_DIRECTORY 0x00000009
  135. ;end_winver_400
  136. #define RESOURCEDISPLAYTYPE_TREE 0x0000000A
  137. ;begin_winver_400
  138. #define RESOURCEDISPLAYTYPE_NDSCONTAINER 0x0000000B
  139. ;end_winver_400
  140. typedef struct _NETRESOURCE% {
  141. DWORD dwScope;
  142. DWORD dwType;
  143. DWORD dwDisplayType;
  144. DWORD dwUsage;
  145. LPTSTR% lpLocalName;
  146. LPTSTR% lpRemoteName;
  147. LPTSTR% lpComment ;
  148. LPTSTR% lpProvider;
  149. }NETRESOURCE%, *LPNETRESOURCE%;
  150. //
  151. // Network Connections.
  152. //
  153. #define NETPROPERTY_PERSISTENT 1
  154. #define CONNECT_UPDATE_PROFILE 0x00000001
  155. #define CONNECT_UPDATE_RECENT 0x00000002
  156. #define CONNECT_TEMPORARY 0x00000004
  157. #define CONNECT_INTERACTIVE 0x00000008
  158. #define CONNECT_PROMPT 0x00000010
  159. #define CONNECT_NEED_DRIVE 0x00000020
  160. ;begin_winver_400
  161. #define CONNECT_REFCOUNT 0x00000040
  162. #define CONNECT_REDIRECT 0x00000080
  163. #define CONNECT_LOCALDRIVE 0x00000100
  164. #define CONNECT_CURRENT_MEDIA 0x00000200
  165. #define CONNECT_DEFERRED 0x00000400
  166. #define CONNECT_RESERVED 0xFF000000
  167. ;end_winver_400
  168. ;begin_winver_500
  169. #define CONNECT_COMMANDLINE 0x00000800
  170. #define CONNECT_CMD_SAVECRED 0x00001000
  171. ;end_winver_500
  172. DWORD APIENTRY
  173. WNetAddConnection%(
  174. IN LPCTSTR% lpRemoteName,
  175. IN LPCTSTR% lpPassword,
  176. IN LPCTSTR% lpLocalName
  177. );
  178. DWORD APIENTRY
  179. WNetAddConnection2%(
  180. IN LPNETRESOURCE% lpNetResource,
  181. IN LPCTSTR% lpPassword,
  182. IN LPCTSTR% lpUserName,
  183. IN DWORD dwFlags
  184. );
  185. DWORD APIENTRY
  186. WNetAddConnection3%(
  187. IN HWND hwndOwner,
  188. IN LPNETRESOURCE% lpNetResource,
  189. IN LPCTSTR% lpPassword,
  190. IN LPCTSTR% lpUserName,
  191. IN DWORD dwFlags
  192. );
  193. DWORD APIENTRY
  194. WNetCancelConnection%(
  195. IN LPCTSTR% lpName,
  196. IN BOOL fForce
  197. );
  198. DWORD APIENTRY
  199. WNetCancelConnection2%(
  200. IN LPCTSTR% lpName,
  201. IN DWORD dwFlags,
  202. IN BOOL fForce
  203. );
  204. DWORD APIENTRY
  205. WNetGetConnection%(
  206. IN LPCTSTR% lpLocalName,
  207. OUT LPTSTR% lpRemoteName,
  208. IN OUT LPDWORD lpnLength
  209. );
  210. ;begin_internal
  211. //
  212. // Structures and infolevels for WNetGetConnection3
  213. //
  214. #define WNGC_INFOLEVEL_DISCONNECTED 1
  215. typedef struct _WNGC_CONNECTION_STATE {
  216. DWORD dwState;
  217. } WNGC_CONNECTION_STATE, *LPWNGC_CONNECTION_STATE;
  218. // Values of the dwState field of WNGC_CONNECTION_STATE
  219. // for info level WNGC_INFOLEVEL_DISCONNECTED
  220. #define WNGC_CONNECTED 0x00000000
  221. #define WNGC_DISCONNECTED 0x00000001
  222. DWORD APIENTRY
  223. WNetGetConnection3%(
  224. IN LPCTSTR% lpLocalName,
  225. IN LPCTSTR% lpProviderName,
  226. IN DWORD dwInfoLevel,
  227. OUT LPVOID lpBuffer,
  228. IN OUT LPDWORD lpcbBuffer
  229. );
  230. DWORD APIENTRY
  231. WNetRestoreConnection%(
  232. IN HWND hwndParent,
  233. IN LPCTSTR% lpDevice
  234. );
  235. // WNetRestoreConnection2 flags
  236. #define WNRC_NOUI 0x00000001
  237. DWORD APIENTRY
  238. WNetRestoreConnection2%(
  239. IN HWND hwndParent,
  240. IN LPCTSTR% lpDevice,
  241. IN DWORD dwFlags,
  242. OUT BOOL* pfReconnectFailed
  243. );
  244. ;end_internal
  245. ;begin_winver_400
  246. DWORD APIENTRY
  247. WNetUseConnection%(
  248. IN HWND hwndOwner,
  249. IN LPNETRESOURCE% lpNetResource,
  250. IN LPCTSTR% lpPassword,
  251. IN LPCTSTR% lpUserID,
  252. IN DWORD dwFlags,
  253. OUT LPTSTR% lpAccessName,
  254. IN OUT LPDWORD lpBufferSize,
  255. OUT LPDWORD lpResult
  256. );
  257. ;end_winver_400
  258. ;begin_internal
  259. DWORD APIENTRY
  260. WNetSetConnection%(
  261. IN LPCTSTR% lpName,
  262. IN DWORD dwProperties,
  263. IN LPVOID pvValues
  264. );
  265. ;end_internal
  266. //
  267. // Network Connection Dialogs.
  268. //
  269. DWORD APIENTRY
  270. WNetConnectionDialog(
  271. IN HWND hwnd,
  272. IN DWORD dwType
  273. );
  274. DWORD APIENTRY
  275. WNetDisconnectDialog(
  276. IN HWND hwnd,
  277. IN DWORD dwType
  278. );
  279. ;begin_winver_400
  280. typedef struct _CONNECTDLGSTRUCT%{
  281. DWORD cbStructure; /* size of this structure in bytes */
  282. HWND hwndOwner; /* owner window for the dialog */
  283. LPNETRESOURCE% lpConnRes;/* Requested Resource info */
  284. DWORD dwFlags; /* flags (see below) */
  285. DWORD dwDevNum; /* number of devices connected to */
  286. } CONNECTDLGSTRUCT%, FAR *LPCONNECTDLGSTRUCT%;
  287. #define CONNDLG_RO_PATH 0x00000001 /* Resource path should be read-only */
  288. #define CONNDLG_CONN_POINT 0x00000002 /* Netware -style movable connection point enabled */
  289. #define CONNDLG_USE_MRU 0x00000004 /* Use MRU combobox */
  290. #define CONNDLG_HIDE_BOX 0x00000008 /* Hide persistent connect checkbox */
  291. /*
  292. * NOTE: Set at most ONE of the below flags. If neither flag is set,
  293. * then the persistence is set to whatever the user chose during
  294. * a previous connection
  295. */
  296. #define CONNDLG_PERSIST 0x00000010 /* Force persistent connection */
  297. #define CONNDLG_NOT_PERSIST 0x00000020 /* Force connection NOT persistent */
  298. DWORD APIENTRY
  299. WNetConnectionDialog1%(
  300. IN OUT LPCONNECTDLGSTRUCT% lpConnDlgStruct
  301. );
  302. typedef struct _DISCDLGSTRUCT%{
  303. DWORD cbStructure; /* size of this structure in bytes */
  304. HWND hwndOwner; /* owner window for the dialog */
  305. LPTSTR% lpLocalName; /* local device name */
  306. LPTSTR% lpRemoteName; /* network resource name */
  307. DWORD dwFlags; /* flags */
  308. } DISCDLGSTRUCT%, FAR *LPDISCDLGSTRUCT%;
  309. #define DISC_UPDATE_PROFILE 0x00000001
  310. #define DISC_NO_FORCE 0x00000040
  311. DWORD APIENTRY
  312. WNetDisconnectDialog1%(
  313. IN LPDISCDLGSTRUCT% lpConnDlgStruct
  314. );
  315. ;end_winver_400
  316. //
  317. // Network Browsing.
  318. //
  319. DWORD APIENTRY
  320. WNetOpenEnum%(
  321. IN DWORD dwScope,
  322. IN DWORD dwType,
  323. IN DWORD dwUsage,
  324. IN LPNETRESOURCE% lpNetResource,
  325. OUT LPHANDLE lphEnum
  326. );
  327. DWORD APIENTRY
  328. WNetEnumResource%(
  329. IN HANDLE hEnum,
  330. IN OUT LPDWORD lpcCount,
  331. OUT LPVOID lpBuffer,
  332. IN OUT LPDWORD lpBufferSize
  333. );
  334. DWORD APIENTRY
  335. WNetCloseEnum(
  336. IN HANDLE hEnum
  337. );
  338. ;begin_winver_400
  339. DWORD APIENTRY
  340. WNetGetResourceParent%(
  341. IN LPNETRESOURCE% lpNetResource,
  342. OUT LPVOID lpBuffer,
  343. IN OUT LPDWORD lpcbBuffer
  344. );
  345. DWORD APIENTRY
  346. WNetGetResourceInformation%(
  347. IN LPNETRESOURCE% lpNetResource,
  348. OUT LPVOID lpBuffer,
  349. IN OUT LPDWORD lpcbBuffer,
  350. OUT LPTSTR% *lplpSystem
  351. );
  352. ;end_winver_400
  353. //
  354. // Universal Naming.
  355. //
  356. #define UNIVERSAL_NAME_INFO_LEVEL 0x00000001
  357. #define REMOTE_NAME_INFO_LEVEL 0x00000002
  358. typedef struct _UNIVERSAL_NAME_INFO% {
  359. LPTSTR% lpUniversalName;
  360. }UNIVERSAL_NAME_INFO%, *LPUNIVERSAL_NAME_INFO%;
  361. typedef struct _REMOTE_NAME_INFO% {
  362. LPTSTR% lpUniversalName;
  363. LPTSTR% lpConnectionName;
  364. LPTSTR% lpRemainingPath;
  365. }REMOTE_NAME_INFO%, *LPREMOTE_NAME_INFO%;
  366. DWORD APIENTRY
  367. WNetGetUniversalName%(
  368. IN LPCTSTR% lpLocalPath,
  369. IN DWORD dwInfoLevel,
  370. OUT LPVOID lpBuffer,
  371. IN OUT LPDWORD lpBufferSize
  372. );
  373. //
  374. // Authentication and Logon/Logoff.
  375. //
  376. DWORD APIENTRY
  377. WNetGetUser%(
  378. IN LPCTSTR% lpName,
  379. OUT LPTSTR% lpUserName,
  380. IN OUT LPDWORD lpnLength
  381. );
  382. ;begin_internal
  383. #if defined(_WIN32_WINDOWS)
  384. DWORD APIENTRY
  385. WNetLogon%(
  386. IN LPCTSTR% lpProvider,
  387. IN HWND hwndOwner
  388. );
  389. DWORD APIENTRY
  390. WNetLogoff%(
  391. IN LPCTSTR% lpProvider,
  392. IN HWND hwndOwner
  393. );
  394. DWORD APIENTRY
  395. WNetVerifyPassword%(
  396. IN LPCTSTR% lpszPassword,
  397. OUT BOOL FAR *pfMatch
  398. );
  399. #endif // _WIN32_WINDOWS
  400. ;end_internal
  401. ;begin_internal
  402. DWORD APIENTRY
  403. WNetGetHomeDirectory%(
  404. IN LPCTSTR% lpProviderName,
  405. OUT LPTSTR% lpDirectory,
  406. IN OUT LPDWORD lpBufferSize
  407. );
  408. ;end_internal
  409. //
  410. // Other.
  411. //
  412. ;begin_winver_400
  413. #define WNFMT_MULTILINE 0x01
  414. #define WNFMT_ABBREVIATED 0x02
  415. #define WNFMT_INENUM 0x10
  416. #define WNFMT_CONNECTION 0x20
  417. ;end_winver_400
  418. ;begin_internal
  419. DWORD APIENTRY
  420. WNetFormatNetworkName%(
  421. IN LPCTSTR% lpProvider,
  422. IN LPCTSTR% lpRemoteName,
  423. OUT LPTSTR% lpFormattedName,
  424. IN OUT LPDWORD lpnLength,
  425. IN DWORD dwFlags,
  426. IN DWORD dwAveCharPerLine
  427. );
  428. DWORD APIENTRY
  429. WNetGetProviderType%(
  430. IN LPCTSTR% lpProvider,
  431. OUT LPDWORD lpdwNetType
  432. );
  433. ;end_internal
  434. ;begin_winver_400
  435. DWORD APIENTRY
  436. WNetGetProviderName%(
  437. IN DWORD dwNetType,
  438. OUT LPTSTR% lpProviderName,
  439. IN OUT LPDWORD lpBufferSize
  440. );
  441. typedef struct _NETINFOSTRUCT{
  442. DWORD cbStructure;
  443. DWORD dwProviderVersion;
  444. DWORD dwStatus;
  445. DWORD dwCharacteristics;
  446. ULONG_PTR dwHandle;
  447. WORD wNetType;
  448. DWORD dwPrinters;
  449. DWORD dwDrives;
  450. } NETINFOSTRUCT, FAR *LPNETINFOSTRUCT;
  451. #define NETINFO_DLL16 0x00000001 /* Provider running as 16 bit Winnet Driver */
  452. #define NETINFO_DISKRED 0x00000004 /* Provider requires disk redirections to connect */
  453. #define NETINFO_PRINTERRED 0x00000008 /* Provider requires printer redirections to connect */
  454. DWORD APIENTRY
  455. WNetGetNetworkInformation%(
  456. IN LPCTSTR% lpProvider,
  457. OUT LPNETINFOSTRUCT lpNetInfoStruct
  458. );
  459. //
  460. // User Profiles.
  461. //
  462. typedef UINT (FAR PASCAL *PFNGETPROFILEPATH%) (
  463. LPCTSTR% pszUsername,
  464. LPTSTR% pszBuffer,
  465. UINT cbBuffer
  466. );
  467. typedef UINT (FAR PASCAL *PFNRECONCILEPROFILE%) (
  468. LPCTSTR% pszCentralFile,
  469. LPCTSTR% pszLocalFile,
  470. DWORD dwFlags
  471. );
  472. #define RP_LOGON 0x01 /* if set, do for logon, else for logoff */
  473. #define RP_INIFILE 0x02 /* if set, reconcile .INI file, else reg. hive */
  474. //
  475. // Policies.
  476. //
  477. typedef BOOL (FAR PASCAL *PFNPROCESSPOLICIES%) (
  478. HWND hwnd,
  479. LPCTSTR% pszPath,
  480. LPCTSTR% pszUsername,
  481. LPCTSTR% pszComputerName,
  482. DWORD dwFlags
  483. );
  484. #define PP_DISPLAYERRORS 0x01 /* if set, display error messages, else fail silently if error */
  485. ;end_winver_400
  486. //
  487. // Error handling.
  488. //
  489. DWORD APIENTRY
  490. WNetGetLastError%(
  491. OUT LPDWORD lpError,
  492. OUT LPTSTR% lpErrorBuf,
  493. IN DWORD nErrorBufSize,
  494. OUT LPTSTR% lpNameBuf,
  495. IN DWORD nNameBufSize
  496. );
  497. //
  498. // STATUS CODES
  499. //
  500. // General
  501. #define WN_SUCCESS NO_ERROR
  502. #define WN_NO_ERROR NO_ERROR
  503. #define WN_NOT_SUPPORTED ERROR_NOT_SUPPORTED
  504. #define WN_CANCEL ERROR_CANCELLED
  505. #define WN_RETRY ERROR_RETRY
  506. #define WN_NET_ERROR ERROR_UNEXP_NET_ERR
  507. #define WN_MORE_DATA ERROR_MORE_DATA
  508. #define WN_BAD_POINTER ERROR_INVALID_ADDRESS
  509. #define WN_BAD_VALUE ERROR_INVALID_PARAMETER
  510. #define WN_BAD_USER ERROR_BAD_USERNAME
  511. #define WN_BAD_PASSWORD ERROR_INVALID_PASSWORD
  512. #define WN_ACCESS_DENIED ERROR_ACCESS_DENIED
  513. #define WN_FUNCTION_BUSY ERROR_BUSY
  514. #define WN_WINDOWS_ERROR ERROR_UNEXP_NET_ERR
  515. #define WN_OUT_OF_MEMORY ERROR_NOT_ENOUGH_MEMORY
  516. #define WN_NO_NETWORK ERROR_NO_NETWORK
  517. #define WN_EXTENDED_ERROR ERROR_EXTENDED_ERROR
  518. #define WN_BAD_LEVEL ERROR_INVALID_LEVEL
  519. #define WN_BAD_HANDLE ERROR_INVALID_HANDLE
  520. ;begin_winver_400
  521. #define WN_NOT_INITIALIZING ERROR_ALREADY_INITIALIZED
  522. #define WN_NO_MORE_DEVICES ERROR_NO_MORE_DEVICES
  523. ;end_winver_400
  524. // Connection
  525. #define WN_NOT_CONNECTED ERROR_NOT_CONNECTED
  526. #define WN_OPEN_FILES ERROR_OPEN_FILES
  527. #define WN_DEVICE_IN_USE ERROR_DEVICE_IN_USE
  528. #define WN_BAD_NETNAME ERROR_BAD_NET_NAME
  529. #define WN_BAD_LOCALNAME ERROR_BAD_DEVICE
  530. #define WN_ALREADY_CONNECTED ERROR_ALREADY_ASSIGNED
  531. #define WN_DEVICE_ERROR ERROR_GEN_FAILURE
  532. #define WN_CONNECTION_CLOSED ERROR_CONNECTION_UNAVAIL
  533. #define WN_NO_NET_OR_BAD_PATH ERROR_NO_NET_OR_BAD_PATH
  534. #define WN_BAD_PROVIDER ERROR_BAD_PROVIDER
  535. #define WN_CANNOT_OPEN_PROFILE ERROR_CANNOT_OPEN_PROFILE
  536. #define WN_BAD_PROFILE ERROR_BAD_PROFILE
  537. #define WN_BAD_DEV_TYPE ERROR_BAD_DEV_TYPE
  538. #define WN_DEVICE_ALREADY_REMEMBERED ERROR_DEVICE_ALREADY_REMEMBERED
  539. #define WN_CONNECTED_OTHER_PASSWORD ERROR_CONNECTED_OTHER_PASSWORD
  540. ;begin_winver_501
  541. #define WN_CONNECTED_OTHER_PASSWORD_DEFAULT ERROR_CONNECTED_OTHER_PASSWORD_DEFAULT
  542. ;end_winver_501
  543. // Enumeration
  544. #define WN_NO_MORE_ENTRIES ERROR_NO_MORE_ITEMS
  545. #define WN_NOT_CONTAINER ERROR_NOT_CONTAINER
  546. ;begin_winver_400
  547. // Authentication
  548. #define WN_NOT_AUTHENTICATED ERROR_NOT_AUTHENTICATED
  549. #define WN_NOT_LOGGED_ON ERROR_NOT_LOGGED_ON
  550. #define WN_NOT_VALIDATED ERROR_NO_LOGON_SERVERS
  551. ;end_winver_400
  552. //
  553. // For Shell
  554. //
  555. ;begin_winver_400
  556. typedef struct _NETCONNECTINFOSTRUCT{
  557. DWORD cbStructure;
  558. DWORD dwFlags;
  559. DWORD dwSpeed;
  560. DWORD dwDelay;
  561. DWORD dwOptDataSize;
  562. } NETCONNECTINFOSTRUCT, *LPNETCONNECTINFOSTRUCT;
  563. #define WNCON_FORNETCARD 0x00000001
  564. #define WNCON_NOTROUTED 0x00000002
  565. #define WNCON_SLOWLINK 0x00000004
  566. #define WNCON_DYNAMIC 0x00000008
  567. DWORD APIENTRY
  568. MultinetGetConnectionPerformance%(
  569. IN LPNETRESOURCE% lpNetResource,
  570. OUT LPNETCONNECTINFOSTRUCT lpNetConnectInfoStruct
  571. );
  572. ;end_winver_400
  573. ;begin_internal
  574. DWORD APIENTRY
  575. WNetInitialize(
  576. void
  577. );
  578. DWORD APIENTRY
  579. MultinetGetErrorText%(
  580. OUT LPTSTR% lpErrorTextBuf,
  581. IN OUT LPDWORD lpnErrorBufSize,
  582. OUT LPTSTR% lpProviderNameBuf,
  583. IN OUT LPDWORD lpnNameBufSize
  584. );
  585. ;end_internal
  586. #ifdef __cplusplus ;both
  587. } ;both
  588. #endif ;both
  589. #endif // _WINNETP_ ;internal_NT
  590. #endif // _WINNETWK_