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.

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