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.

660 lines
21 KiB

  1. /*--
  2. Copyright (C) Microsoft Corporation, 1999 - 1999
  3. Module Name:
  4. nwtest.h
  5. Abstract:
  6. This module contains definitions, includes and function prototypes needed for
  7. the netware test.
  8. Environment:
  9. User mode.
  10. Revision History:
  11. 4-Aug-1998 (t-rajkup)
  12. --*/
  13. #ifndef HEADER_NWTEST
  14. #define NWTEST
  15. #include <ntregapi.h> //KEY_READ define
  16. #include <nwrnames.h> // NW_SERVER_VALUENAME & NW_PRINT_OPTION_DEFAULT
  17. #include <winreg.h>
  18. // porting to Source Depot - smanda #include <ntddnwfs.h>
  19. // porting to Source Depot - smanda #include <nwutil.h> // TWO_KB
  20. // porting to Source Depot - smanda #include <ndsapi32.h> // HANDLE_TYPE_NCP_SERVER
  21. #include <winuser.h>
  22. // includes for WNet API calls
  23. #include <nspapi.h>
  24. #include <winnetwk.h>
  25. #ifndef ARGUMENT_PRESENT
  26. #define ARGUMENT_PRESENT(ArgumentPointer) (\
  27. (CHAR *)(ArgumentPointer) != (CHAR *)(NULL) )
  28. #endif
  29. #define TREECHAR L'*'
  30. #define NW_MESSAGE_NOT_LOGGED_IN_TREE 1
  31. #define NW_MESSAGE_NOT_LOGGED_IN_SERVER 2
  32. #define NW_MESSAGE_LOGGED_IN_SERVER 3
  33. #define NW_MESSAGE_LOGGED_IN_TREE 4
  34. #define EXTRA_BYTES 256
  35. #define TWO_KB 2048
  36. //
  37. // Flags used for the function NwParseNdsUncPath()
  38. //
  39. #define PARSE_NDS_GET_TREE_NAME 0
  40. #define PARSE_NDS_GET_PATH_NAME 1
  41. #define PARSE_NDS_GET_OBJECT_NAME 2
  42. //
  43. // Commonly reference value for NCP Server name length
  44. //
  45. #define NW_MAX_SERVER_LEN 48
  46. //
  47. // CONN_STATUS structures for the new shell.
  48. //
  49. typedef struct _CONN_STATUS {
  50. DWORD dwTotalLength; // The total length including packed strings.
  51. LPWSTR pszServerName; // The server name.
  52. LPWSTR pszUserName; // The user name.
  53. LPWSTR pszTreeName; // The tree name or NULL for a 2.x or 3.x server.
  54. DWORD nConnNum; // The connection number used on nw srv.
  55. BOOL fNds; // TRUE if NDS, False for Bindery servers
  56. BOOL fPreferred; // TRUE if the connection is a preferred server with no explicit uses.
  57. DWORD dwConnType; // Authentication status of the connection.
  58. } CONN_STATUS, *PCONN_STATUS;
  59. #define NW_CONN_NOT_AUTHENTICATED 0x00000000
  60. #define NW_CONN_BINDERY_LOGIN 0x00000001
  61. #define NW_CONN_NDS_AUTHENTICATED_NO_LICENSE 0x00000002
  62. #define NW_CONN_NDS_AUTHENTICATED_LICENSED 0x00000003
  63. #define NW_CONN_DISCONNECTED 0x00000004
  64. //
  65. // NtDeviceIoControlFile/NtFsControlFile IoControlCode values for this device.
  66. //
  67. // Warning: Remember that the low two bits of the code specify how the
  68. // buffers are passed to the driver!
  69. //
  70. //
  71. // Method = 00 - Buffer both input and output buffers for the request
  72. // Method = 01 - Buffer input, map output buffer to an MDL as an IN buff
  73. // Method = 10 - Buffer input, map output buffer to an MDL as an OUT buff
  74. // Method = 11 - Do not buffer either the input or output
  75. //
  76. #define IOCTL_NWRDR_BASE FILE_DEVICE_NETWORK_FILE_SYSTEM
  77. #define _NWRDR_CONTROL_CODE(request, method, access) \
  78. CTL_CODE(IOCTL_NWRDR_BASE, request, method, access)
  79. #define FSCTL_NWR_START _NWRDR_CONTROL_CODE(200, METHOD_IN_DIRECT, FILE_ANY_ACCESS)
  80. #define FSCTL_NWR_STOP _NWRDR_CONTROL_CODE(201, METHOD_BUFFERED, FILE_ANY_ACCESS)
  81. #define FSCTL_NWR_LOGON _NWRDR_CONTROL_CODE(202, METHOD_BUFFERED, FILE_ANY_ACCESS)
  82. #define FSCTL_NWR_LOGOFF _NWRDR_CONTROL_CODE(203, METHOD_BUFFERED, FILE_ANY_ACCESS)
  83. #define FSCTL_NWR_GET_CONNECTION _NWRDR_CONTROL_CODE(204, METHOD_NEITHER, FILE_ANY_ACCESS)
  84. #define FSCTL_NWR_ENUMERATE_CONNECTIONS _NWRDR_CONTROL_CODE(205, METHOD_NEITHER, FILE_ANY_ACCESS)
  85. #define FSCTL_NWR_DELETE_CONNECTION _NWRDR_CONTROL_CODE(207, METHOD_BUFFERED, FILE_ANY_ACCESS)
  86. #define FSCTL_NWR_BIND_TO_TRANSPORT _NWRDR_CONTROL_CODE(208, METHOD_BUFFERED, FILE_ANY_ACCESS)
  87. #define FSCTL_NWR_CHANGE_PASS _NWRDR_CONTROL_CODE(209, METHOD_BUFFERED, FILE_ANY_ACCESS)
  88. #define FSCTL_NWR_SET_INFO _NWRDR_CONTROL_CODE(211, METHOD_BUFFERED, FILE_ANY_ACCESS)
  89. #define FSCTL_NWR_GET_USERNAME _NWRDR_CONTROL_CODE(215, METHOD_NEITHER, FILE_ANY_ACCESS)
  90. #define FSCTL_NWR_CHALLENGE _NWRDR_CONTROL_CODE(216, METHOD_BUFFERED, FILE_ANY_ACCESS)
  91. #define FSCTL_NWR_GET_CONN_DETAILS _NWRDR_CONTROL_CODE(217, METHOD_NEITHER, FILE_ANY_ACCESS)
  92. #define FSCTL_NWR_GET_MESSAGE _NWRDR_CONTROL_CODE(218, METHOD_NEITHER, FILE_ANY_ACCESS)
  93. #define FSCTL_NWR_GET_STATISTICS _NWRDR_CONTROL_CODE(219, METHOD_NEITHER, FILE_ANY_ACCESS)
  94. #define FSCTL_NWR_GET_CONN_STATUS _NWRDR_CONTROL_CODE(220, METHOD_NEITHER, FILE_ANY_ACCESS)
  95. #define FSCTL_NWR_GET_CONN_INFO _NWRDR_CONTROL_CODE(221, METHOD_NEITHER, FILE_ANY_ACCESS)
  96. #define FSCTL_NWR_GET_PREFERRED_SERVER _NWRDR_CONTROL_CODE(222, METHOD_NEITHER, FILE_ANY_ACCESS)
  97. #define FSCTL_NWR_GET_CONN_PERFORMANCE _NWRDR_CONTROL_CODE(223, METHOD_NEITHER, FILE_ANY_ACCESS)
  98. #define FSCTL_NWR_SET_SHAREBIT _NWRDR_CONTROL_CODE(224, METHOD_NEITHER, FILE_ANY_ACCESS)
  99. #define FSCTL_NWR_GET_CONN_DETAILS2 _NWRDR_CONTROL_CODE(225, METHOD_NEITHER, FILE_ANY_ACCESS)
  100. #define FSCTL_NWR_CLOSEALL _NWRDR_CONTROL_CODE(226, METHOD_BUFFERED, FILE_ANY_ACCESS)
  101. #define FSCTL_NWR_NDS_SETCONTEXT NWR_ANY_NDS(1)
  102. #define FSCTL_NWR_NDS_GETCONTEXT NWR_ANY_NDS(2)
  103. #define FSCTL_NWR_NDS_VERIFY_TREE NWR_ANY_NDS(3)
  104. #define FSCTL_NWR_NDS_RESOLVE_NAME NWR_ANY_NDS(4)
  105. #define FSCTL_NWR_NDS_LIST_SUBS NWR_ANY_NDS(5)
  106. #define FSCTL_NWR_NDS_READ_INFO NWR_ANY_NDS(6)
  107. #define FSCTL_NWR_NDS_READ_ATTR NWR_ANY_NDS(7)
  108. #define FSCTL_NWR_NDS_OPEN_STREAM NWR_ANY_NDS(8)
  109. #define FSCTL_NWR_NDS_GET_QUEUE_INFO NWR_ANY_NDS(9)
  110. #define FSCTL_NWR_NDS_GET_VOLUME_INFO NWR_ANY_NDS(10)
  111. #define FSCTL_NWR_NDS_RAW_FRAGEX NWR_ANY_NDS(11)
  112. #define FSCTL_NWR_NDS_CHANGE_PASS NWR_ANY_NDS(12)
  113. #define FSCTL_NWR_NDS_LIST_TREES NWR_ANY_NDS(13)
  114. #define IOCTL_NWR_RAW_HANDLE _NWRDR_CONTROL_CODE(1002,METHOD_NEITHER, FILE_ANY_ACCESS)
  115. //
  116. // UserNcp control code definitions. The parameter (X) to NWR_ANY_NCP
  117. // is the function code to be placed in the NCP.
  118. //
  119. #define NWR_ANY_NCP(X) _NWRDR_CONTROL_CODE(0x400 | (X), METHOD_NEITHER, FILE_ANY_ACCESS)
  120. #define NWR_ANY_F2_NCP(X) _NWRDR_CONTROL_CODE(0x500 | (X), METHOD_NEITHER, FILE_ANY_ACCESS)
  121. #define NWR_ANY_HANDLE_NCP(X) _NWRDR_CONTROL_CODE(0x600 | (X), METHOD_NEITHER, FILE_ANY_ACCESS)
  122. #define NWR_ANY_NDS(X) _NWRDR_CONTROL_CODE(0x700 | (X), METHOD_NEITHER, FILE_ANY_ACCESS)
  123. #define FSCTL_NWR_NCP_E3H NWR_ANY_NCP(0x17)
  124. #define FSCTL_NWR_NCP_E2H NWR_ANY_NCP(0x16)
  125. #define FSCTL_NWR_NCP_E1H NWR_ANY_NCP(0x15)
  126. #define FSCTL_NWR_NCP_E0H NWR_ANY_NCP(0x14)
  127. //
  128. // Redirector Request Packet used by the Workstation service
  129. // to pass parameters to the Redirector through Buffer 1 of
  130. // NtFsControlFile.
  131. //
  132. // Additional output of each FSCtl is found in Buffer 2.
  133. //
  134. #define REQUEST_PACKET_VERSION 0x00000001L // Structure version.
  135. typedef struct _NWR_REQUEST_PACKET {
  136. ULONG Version; // Version of structure in Buffer 2
  137. union {
  138. //
  139. // For FSCTL_NWR_BIND_TO_TRANSPORT
  140. //
  141. struct {
  142. ULONG QualityOfService; // Quality of service indicator IN
  143. ULONG TransportNameLength; // Not including terminator IN
  144. WCHAR TransportName[1]; // Name of transport provider IN
  145. } Bind;
  146. //
  147. // For FSCTL_NWR_LOGON
  148. //
  149. struct {
  150. LUID LogonId; // User logon session identifier IN
  151. ULONG UserNameLength; // Byte count not including NULL IN
  152. ULONG PasswordLength; // Byte count not including NULL IN
  153. ULONG ServerNameLength; // Byte count not including NULL IN
  154. ULONG ReplicaAddrLength; // IPX address of the nearest dir server
  155. // replica (for NDS login only).
  156. // It's either sizeof(TDI_ADDRESS_IPX)
  157. // or 0. IN
  158. ULONG PrintOption; // Print options for user IN
  159. WCHAR UserName[1]; // User name not NULL terminated. IN
  160. // Password string // Default password for connection,
  161. // not NULL terminated, packed
  162. // in buffer immediately after
  163. // UserName. IN
  164. // ServerName // Preferred server name packed in
  165. // buffer immediately after
  166. // Password. IN
  167. // IpxAddress // Address copied from the SAP response
  168. // packet, packed immediately after
  169. // the servername. IN
  170. } Logon;
  171. //
  172. // For FSCTL_NWR_CHANGE_PASS
  173. //
  174. struct {
  175. ULONG UserNameLength;
  176. ULONG PasswordLength;
  177. ULONG ServerNameLength;
  178. WCHAR UserName[1];
  179. // Password string // New password. IN
  180. // ServerName // Server with the new password IN
  181. } ChangePass;
  182. //
  183. // For FSCTL_NWR_LOGOFF
  184. //
  185. struct {
  186. LUID LogonId; // User logon session identifier IN
  187. } Logoff;
  188. //
  189. // For FSCTL_NWR_DELETE_CONNECTION
  190. //
  191. struct {
  192. BOOLEAN UseForce; // Force flag IN
  193. } DeleteConn;
  194. //
  195. // For FSCTL_NWR_GET_CONNECTION
  196. //
  197. struct {
  198. ULONG BytesNeeded; // Size (byte count) required of
  199. // output buffer including
  200. // terminator OUT
  201. ULONG DeviceNameLength; // Not including terminator IN
  202. WCHAR DeviceName[4]; // Name of DOS device IN
  203. } GetConn;
  204. //
  205. // FSCTL_NWR_ENUMERATE_CONNECTIONS
  206. //
  207. struct {
  208. ULONG EntriesRequested; // Number of entries to get IN
  209. ULONG EntriesReturned; // Entries returned in respose buf OUT
  210. ULONG_PTR ResumeKey; // Handle to next entry to get IN OUT
  211. ULONG BytesNeeded; // Size (byte count) of next entry OUT
  212. ULONG ConnectionType; // Resource type requested IN
  213. LUID Uid; // Uid to search for IN
  214. } EnumConn;
  215. //
  216. // FSCTL_NWR_SET_INFO
  217. //
  218. struct {
  219. ULONG PrintOption;
  220. ULONG MaximumBurstSize;
  221. ULONG PreferredServerLength; // Byte count not including NULL IN
  222. ULONG ProviderNameLength; // Byte count not including NULL IN
  223. WCHAR PreferredServer[1]; // Preferred server name not NULL
  224. // terminated.
  225. // ProviderName string // Provider name not NULL terminated.
  226. // Packed in buffer immediately
  227. // after PreferredServer
  228. } SetInfo;
  229. //
  230. // FSCTL_NWR_GET_CONN_STATUS
  231. //
  232. struct {
  233. ULONG ConnectionNameLength; // IN: Length of the connection name we want.
  234. ULONG_PTR ResumeKey; // IN: Resume key for a continued request.
  235. ULONG EntriesReturned; // OUT: Entries returned in respose buffer.
  236. ULONG BytesNeeded; // OUT: Size (byte count) of next entry.
  237. WCHAR ConnectionName[1]; // IN: Connection name described above.
  238. } GetConnStatus;
  239. //
  240. // FSCTL_NWR_GET_CONN_INFO
  241. //
  242. struct {
  243. ULONG ConnectionNameLength; // IN: Length of the connection name we want.
  244. WCHAR ConnectionName[1]; // IN: Connection name described above.
  245. } GetConnInfo;
  246. //
  247. // FSCTL_NWR_GET_CONN_PERFORMANCE
  248. //
  249. struct {
  250. //
  251. // These are the fields for the NETCONNECTINFOSTRUCT.
  252. //
  253. DWORD dwFlags;
  254. DWORD dwSpeed;
  255. DWORD dwDelay;
  256. DWORD dwOptDataSize;
  257. //
  258. // This is the remote name in question.
  259. //
  260. ULONG RemoteNameLength;
  261. WCHAR RemoteName[1];
  262. } GetConnPerformance;
  263. struct {
  264. ULONG DebugFlags; // Value for NwDebug
  265. } DebugValue;
  266. } Parameters;
  267. } NWR_REQUEST_PACKET, *PNWR_REQUEST_PACKET;
  268. typedef struct _NWR_NDS_REQUEST_PACKET {
  269. //
  270. // Version of structure in Buffer 2.
  271. //
  272. ULONG Version;
  273. union {
  274. //
  275. // For FSCTL_NWR_NDS_RESOLVE_NAME
  276. //
  277. struct {
  278. ULONG ObjectNameLength; // IN
  279. DWORD ResolverFlags; // IN
  280. DWORD BytesWritten; // OUT
  281. WCHAR ObjectName[1]; // IN
  282. } ResolveName;
  283. //
  284. // For FSCTL_NWR_NDS_READ_INFO
  285. //
  286. struct {
  287. DWORD ObjectId; // IN
  288. DWORD BytesWritten; // OUT
  289. } GetObjectInfo;
  290. //
  291. // For FSCTL_NWR_NDS_LIST_SUBS
  292. //
  293. struct {
  294. DWORD ObjectId; // IN
  295. DWORD_PTR IterHandle; // IN
  296. DWORD BytesWritten; // OUT
  297. } ListSubordinates;
  298. //
  299. // For FSCTL_NWR_NDS_READ_ATTR
  300. //
  301. struct {
  302. DWORD ObjectId; // IN
  303. DWORD_PTR IterHandle; // IN
  304. DWORD BytesWritten; // OUT
  305. DWORD AttributeNameLength; // IN
  306. WCHAR AttributeName[1]; // IN
  307. } ReadAttribute;
  308. //
  309. // For FSCTL_NWR_NDS_OPEN_STREAM
  310. //
  311. struct {
  312. DWORD FileLength; // OUT
  313. DWORD StreamAccess; // IN
  314. DWORD ObjectOid; // IN
  315. UNICODE_STRING StreamName; // IN
  316. WCHAR StreamNameString[1]; // IN
  317. } OpenStream;
  318. //
  319. // For FSCTL_NWR_NDS_SET_CONTEXT
  320. //
  321. struct {
  322. DWORD TreeNameLen ; // IN
  323. DWORD ContextLen; // IN
  324. WCHAR TreeAndContextString[1]; // IN
  325. } SetContext;
  326. //
  327. // For FSCTL_NWR_NDS_GET_CONTEXT
  328. //
  329. struct {
  330. UNICODE_STRING Context; // OUT
  331. DWORD TreeNameLen ; // IN
  332. WCHAR TreeNameString[1]; // IN
  333. } GetContext;
  334. //
  335. // For FSCTL_NWR_NDS_VERIFY_TREE
  336. //
  337. struct {
  338. UNICODE_STRING TreeName; // IN
  339. WCHAR NameString[1]; // IN
  340. } VerifyTree;
  341. //
  342. // For FSCTL_NWR_NDS_GET_QUEUE_INFO
  343. //
  344. struct {
  345. UNICODE_STRING QueueName; // IN
  346. UNICODE_STRING HostServer; // OUT
  347. DWORD QueueId; // OUT
  348. } GetQueueInfo;
  349. //
  350. // For FSCTL_NWR_NDS_GET_VOLUME_INFO
  351. //
  352. struct {
  353. DWORD ServerNameLen; // OUT
  354. DWORD TargetVolNameLen; // OUT
  355. DWORD VolumeNameLen; // IN
  356. WCHAR VolumeName[1]; // IN
  357. } GetVolumeInfo;
  358. //
  359. // For FSCTL_NWR_NDS_RAW_FRAGEX
  360. //
  361. struct {
  362. DWORD NdsVerb; // IN
  363. DWORD RequestLength; // IN
  364. DWORD ReplyLength; // OUT
  365. BYTE Request[1]; // IN
  366. } RawRequest;
  367. //
  368. // For FSCTL_NWR_NDS_CHANGE_PASS
  369. //
  370. struct {
  371. DWORD NdsTreeNameLength;
  372. DWORD UserNameLength;
  373. DWORD CurrentPasswordLength;
  374. DWORD NewPasswordLength;
  375. //
  376. // The above strings should be end to
  377. // end starting at StringBuffer.
  378. //
  379. WCHAR StringBuffer[1];
  380. } ChangePass;
  381. //
  382. // For FSCTL_NWR_NDS_LIST_TREES
  383. //
  384. struct {
  385. DWORD NtUserNameLength; // IN
  386. LARGE_INTEGER UserLuid; // OUT
  387. DWORD TreesReturned; // OUT
  388. WCHAR NtUserName[1]; // IN
  389. } ListTrees;
  390. } Parameters;
  391. } NWR_NDS_REQUEST_PACKET, *PNWR_NDS_REQUEST_PACKET;
  392. NTSTATUS
  393. NwNdsOpenTreeHandle(
  394. IN PUNICODE_STRING puNdsTree,
  395. OUT PHANDLE phNwRdrHandle
  396. );
  397. // NwNdsOpenTreeHandle( PUNICODE_STRING, PHANDLE )
  398. //
  399. // Given an NDS tree name, this opens a handle the the redirector
  400. // for accessing that tree. The handle should closed using the
  401. // standard NT CloseHandle() call. This function is only a
  402. // simple wrapper around NT OpenFile().
  403. //
  404. // Administrativa.
  405. //
  406. #define HANDLE_TYPE_NCP_SERVER 1
  407. #define HANDLE_TYPE_NDS_TREE 2
  408. NTSTATUS
  409. NwNdsOpenGenericHandle(
  410. IN PUNICODE_STRING puNdsTree,
  411. OUT LPDWORD lpdwHandleType,
  412. OUT PHANDLE phNwRdrHandle
  413. );
  414. // NwNdsOpenGenericHandle( PUNICODE_STRING, LPDWORD, PHANDLE )
  415. //
  416. // Given a name, this opens a handle the the redirector for accessing that
  417. // named tree or server. lpdwHandleType is set to either HANDLE_TYPE_NCP_SERVER
  418. // or HANDLE_TYPE_NDS_TREE accordingly. The handle should be closed using
  419. // the standard NT CloseHandle() call. This function is only a simple
  420. // wrapper around NT OpenFile().
  421. NTSTATUS
  422. NwNdsResolveName (
  423. IN HANDLE hNdsTree,
  424. IN PUNICODE_STRING puObjectName,
  425. OUT DWORD *dwObjectId,
  426. OUT PUNICODE_STRING puReferredServer,
  427. OUT PBYTE pbRawResponse,
  428. IN DWORD dwResponseBufferLen
  429. );
  430. // NwNdsResolveName(HANDLE, PUNICODE_STRING, PDWORD)
  431. //
  432. // Resolve the given name to an NDS object id. This utilizes
  433. // NDS verb 1.
  434. //
  435. // There is currently no interface for canonicalizing names.
  436. // This call will use the default context if one has been set
  437. // for this NDS tree.
  438. //
  439. // puReferredServer must point to a UNICODE_STRING with enough
  440. // space to hold a server name (MAX_SERVER_NAME_LENGTH) *
  441. // sizeof( WCHAR ).
  442. //
  443. // If dwResponseBufferLen is not 0, and pbRawResponse points
  444. // to a writable buffer of length dwResponseBufferLen, then
  445. // this routine will also return the entire NDS response in
  446. // the raw response buffer. The NDS response is described
  447. // by NDS_RESPONSE_RESOLVE_NAME.
  448. //
  449. // Arguments:
  450. //
  451. // HANDLE hNdsTree - The name of the NDS tree that we are interested in looking into.
  452. // PUNICODE_STRING puObjectName - The name that we want resolved into an object id.
  453. // DWORD *dwObjectId - The place where we will place the object id.
  454. // BYTE *pbRawResponse - The raw response buffer, if desired.
  455. // DWORD dwResponseBufferLen - The length of the raw response buffer.
  456. WORD
  457. NwParseNdsUncPath(
  458. IN OUT LPWSTR * Result,
  459. IN LPWSTR ContainerName,
  460. IN ULONG flag
  461. );
  462. NTSTATUS NwNdsOpenRdrHandle(
  463. OUT PHANDLE phNwRdrHandle
  464. );
  465. NTSTATUS
  466. NwNdsGetTreeContext (
  467. IN HANDLE hNdsRdr,
  468. IN PUNICODE_STRING puTree,
  469. OUT PUNICODE_STRING puContext
  470. );
  471. VOID
  472. NwAbbreviateUserName(
  473. IN LPWSTR pszFullName,
  474. OUT LPWSTR pszUserName
  475. );
  476. VOID
  477. NwMakePrettyDisplayName(
  478. IN LPWSTR pszName
  479. );
  480. DWORD
  481. NWPGetConnectionStatus(
  482. IN LPWSTR pszRemoteName,
  483. IN OUT PDWORD_PTR ResumeKey,
  484. OUT LPBYTE Buffer,
  485. IN DWORD BufferSize,
  486. OUT PDWORD BytesNeeded,
  487. OUT PDWORD EntriesRead
  488. );
  489. BOOL
  490. NwIsNdsSyntax(
  491. IN LPWSTR lpstrUnc
  492. );
  493. DWORD
  494. NwOpenAndGetTreeInfo(
  495. LPWSTR pszNdsUNCPath,
  496. HANDLE *phTreeConn,
  497. DWORD *pdwOid
  498. );
  499. static
  500. DWORD
  501. NwRegQueryValueExW(
  502. IN HKEY hKey,
  503. IN LPWSTR lpValueName,
  504. OUT LPDWORD lpReserved,
  505. OUT LPDWORD lpType,
  506. OUT LPBYTE lpData,
  507. IN OUT LPDWORD lpcbData
  508. );
  509. DWORD
  510. NwReadRegValue(
  511. IN HKEY Key,
  512. IN LPWSTR ValueName,
  513. OUT LPWSTR *Value
  514. );
  515. DWORD
  516. NwpGetCurrentUserRegKey(
  517. IN DWORD DesiredAccess,
  518. OUT HKEY *phKeyCurrentUser
  519. );
  520. DWORD
  521. NwQueryInfo(
  522. OUT PDWORD pnPrintOptions,
  523. OUT LPWSTR *ppszPreferredSrv
  524. );
  525. DWORD
  526. NwGetConnectionStatus(
  527. IN LPWSTR pszRemoteName,
  528. OUT PDWORD_PTR ResumeKey,
  529. OUT LPBYTE *Buffer,
  530. OUT PDWORD EntriesRead
  531. );
  532. #endif