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.

544 lines
16 KiB

  1. /*++ BUILD Version: 0006 // Increment this if a change has global effects
  2. Copyright (c) 1991-1999 Microsoft Corporation
  3. Module Name:
  4. lmwksta.h
  5. Abstract:
  6. This file contains structures, function prototypes, and definitions
  7. for the NetWorkstation and NetWkstaTransport API.
  8. Environment:
  9. User Mode - Win32
  10. Portable to any flat, 32-bit environment. (Uses Win32 typedefs.)
  11. Requires ANSI C extensions: slash-slash comments, long external names.
  12. Notes:
  13. You must include NETCONS.H before this file, since this file depends
  14. on values defined in NETCONS.H.
  15. --*/
  16. #ifndef _LMWKSTA_
  17. #define _LMWKSTA_
  18. #if _MSC_VER > 1000
  19. #pragma once
  20. #endif
  21. #ifdef __cplusplus
  22. extern "C" {
  23. #endif
  24. #include <lmcons.h>
  25. #include <lmuseflg.h> // Deletion force level flags
  26. //
  27. // Function Prototypes
  28. //
  29. NET_API_STATUS NET_API_FUNCTION
  30. NetWkstaGetInfo (
  31. IN LMSTR servername OPTIONAL,
  32. IN DWORD level,
  33. OUT LPBYTE *bufptr
  34. );
  35. NET_API_STATUS NET_API_FUNCTION
  36. NetWkstaSetInfo (
  37. IN LMSTR servername OPTIONAL,
  38. IN DWORD level,
  39. IN LPBYTE buffer,
  40. OUT LPDWORD parm_err OPTIONAL
  41. );
  42. NET_API_STATUS NET_API_FUNCTION
  43. NetWkstaUserGetInfo (
  44. IN LMSTR reserved,
  45. IN DWORD level,
  46. OUT LPBYTE *bufptr
  47. );
  48. NET_API_STATUS NET_API_FUNCTION
  49. NetWkstaUserSetInfo (
  50. IN LMSTR reserved,
  51. IN DWORD level,
  52. OUT LPBYTE buf,
  53. OUT LPDWORD parm_err OPTIONAL
  54. );
  55. NET_API_STATUS NET_API_FUNCTION
  56. NetWkstaUserEnum (
  57. IN LMSTR servername OPTIONAL,
  58. IN DWORD level,
  59. OUT LPBYTE *bufptr,
  60. IN DWORD prefmaxlen,
  61. OUT LPDWORD entriesread,
  62. OUT LPDWORD totalentries,
  63. IN OUT LPDWORD resumehandle OPTIONAL
  64. );
  65. NET_API_STATUS NET_API_FUNCTION
  66. NetWkstaTransportAdd (
  67. IN LMSTR servername OPTIONAL,
  68. IN DWORD level,
  69. IN LPBYTE buf,
  70. OUT LPDWORD parm_err
  71. );
  72. NET_API_STATUS NET_API_FUNCTION
  73. NetWkstaTransportDel (
  74. IN LMSTR servername OPTIONAL,
  75. IN LMSTR transportname,
  76. IN DWORD ucond
  77. );
  78. NET_API_STATUS NET_API_FUNCTION
  79. NetWkstaTransportEnum (
  80. IN LMSTR servername OPTIONAL,
  81. IN DWORD level,
  82. OUT LPBYTE *bufptr,
  83. IN DWORD prefmaxlen,
  84. OUT LPDWORD entriesread,
  85. OUT LPDWORD totalentries,
  86. IN OUT LPDWORD resumehandle OPTIONAL
  87. );
  88. //
  89. // Data Structures
  90. //
  91. //
  92. // NetWkstaGetInfo and NetWkstaSetInfo
  93. //
  94. //
  95. // NetWkstaGetInfo only. System information - guest access
  96. //
  97. typedef struct _WKSTA_INFO_100 {
  98. DWORD wki100_platform_id;
  99. LMSTR wki100_computername;
  100. LMSTR wki100_langroup;
  101. DWORD wki100_ver_major;
  102. DWORD wki100_ver_minor;
  103. }WKSTA_INFO_100, *PWKSTA_INFO_100, *LPWKSTA_INFO_100;
  104. //
  105. // NetWkstaGetInfo only. System information - user access
  106. //
  107. typedef struct _WKSTA_INFO_101 {
  108. DWORD wki101_platform_id;
  109. LMSTR wki101_computername;
  110. LMSTR wki101_langroup;
  111. DWORD wki101_ver_major;
  112. DWORD wki101_ver_minor;
  113. LMSTR wki101_lanroot;
  114. }WKSTA_INFO_101, *PWKSTA_INFO_101, *LPWKSTA_INFO_101;
  115. //
  116. // NetWkstaGetInfo only. System information - admin or operator access
  117. //
  118. typedef struct _WKSTA_INFO_102 {
  119. DWORD wki102_platform_id;
  120. LMSTR wki102_computername;
  121. LMSTR wki102_langroup;
  122. DWORD wki102_ver_major;
  123. DWORD wki102_ver_minor;
  124. LMSTR wki102_lanroot;
  125. DWORD wki102_logged_on_users;
  126. }WKSTA_INFO_102, *PWKSTA_INFO_102, *LPWKSTA_INFO_102;
  127. //
  128. // Down-level NetWkstaGetInfo and NetWkstaSetInfo.
  129. //
  130. // DOS specific workstation information -
  131. // admin or domain operator access
  132. //
  133. typedef struct _WKSTA_INFO_302{
  134. DWORD wki302_char_wait;
  135. DWORD wki302_collection_time;
  136. DWORD wki302_maximum_collection_count;
  137. DWORD wki302_keep_conn;
  138. DWORD wki302_keep_search;
  139. DWORD wki302_max_cmds;
  140. DWORD wki302_num_work_buf;
  141. DWORD wki302_siz_work_buf;
  142. DWORD wki302_max_wrk_cache;
  143. DWORD wki302_sess_timeout;
  144. DWORD wki302_siz_error;
  145. DWORD wki302_num_alerts;
  146. DWORD wki302_num_services;
  147. DWORD wki302_errlog_sz;
  148. DWORD wki302_print_buf_time;
  149. DWORD wki302_num_char_buf;
  150. DWORD wki302_siz_char_buf;
  151. LMSTR wki302_wrk_heuristics;
  152. DWORD wki302_mailslots;
  153. DWORD wki302_num_dgram_buf;
  154. }WKSTA_INFO_302, *PWKSTA_INFO_302, *LPWKSTA_INFO_302;
  155. //
  156. // Down-level NetWkstaGetInfo and NetWkstaSetInfo
  157. //
  158. // OS/2 specific workstation information -
  159. // admin or domain operator access
  160. //
  161. typedef struct _WKSTA_INFO_402{
  162. DWORD wki402_char_wait;
  163. DWORD wki402_collection_time;
  164. DWORD wki402_maximum_collection_count;
  165. DWORD wki402_keep_conn;
  166. DWORD wki402_keep_search;
  167. DWORD wki402_max_cmds;
  168. DWORD wki402_num_work_buf;
  169. DWORD wki402_siz_work_buf;
  170. DWORD wki402_max_wrk_cache;
  171. DWORD wki402_sess_timeout;
  172. DWORD wki402_siz_error;
  173. DWORD wki402_num_alerts;
  174. DWORD wki402_num_services;
  175. DWORD wki402_errlog_sz;
  176. DWORD wki402_print_buf_time;
  177. DWORD wki402_num_char_buf;
  178. DWORD wki402_siz_char_buf;
  179. LMSTR wki402_wrk_heuristics;
  180. DWORD wki402_mailslots;
  181. DWORD wki402_num_dgram_buf;
  182. DWORD wki402_max_threads;
  183. }WKSTA_INFO_402, *PWKSTA_INFO_402, *LPWKSTA_INFO_402;
  184. //
  185. // Same-level NetWkstaGetInfo and NetWkstaSetInfo.
  186. //
  187. // NT specific workstation information -
  188. // admin or domain operator access
  189. //
  190. typedef struct _WKSTA_INFO_502{
  191. DWORD wki502_char_wait;
  192. DWORD wki502_collection_time;
  193. DWORD wki502_maximum_collection_count;
  194. DWORD wki502_keep_conn;
  195. DWORD wki502_max_cmds;
  196. DWORD wki502_sess_timeout;
  197. DWORD wki502_siz_char_buf;
  198. DWORD wki502_max_threads;
  199. DWORD wki502_lock_quota;
  200. DWORD wki502_lock_increment;
  201. DWORD wki502_lock_maximum;
  202. DWORD wki502_pipe_increment;
  203. DWORD wki502_pipe_maximum;
  204. DWORD wki502_cache_file_timeout;
  205. DWORD wki502_dormant_file_limit;
  206. DWORD wki502_read_ahead_throughput;
  207. DWORD wki502_num_mailslot_buffers;
  208. DWORD wki502_num_srv_announce_buffers;
  209. DWORD wki502_max_illegal_datagram_events;
  210. DWORD wki502_illegal_datagram_event_reset_frequency;
  211. BOOL wki502_log_election_packets;
  212. BOOL wki502_use_opportunistic_locking;
  213. BOOL wki502_use_unlock_behind;
  214. BOOL wki502_use_close_behind;
  215. BOOL wki502_buf_named_pipes;
  216. BOOL wki502_use_lock_read_unlock;
  217. BOOL wki502_utilize_nt_caching;
  218. BOOL wki502_use_raw_read;
  219. BOOL wki502_use_raw_write;
  220. BOOL wki502_use_write_raw_data;
  221. BOOL wki502_use_encryption;
  222. BOOL wki502_buf_files_deny_write;
  223. BOOL wki502_buf_read_only_files;
  224. BOOL wki502_force_core_create_mode;
  225. BOOL wki502_use_512_byte_max_transfer;
  226. }WKSTA_INFO_502, *PWKSTA_INFO_502, *LPWKSTA_INFO_502;
  227. //
  228. // The following info-levels are only valid for NetWkstaSetInfo
  229. //
  230. //
  231. // The following levels are supported on down-level systems (LAN Man 2.x)
  232. // as well as NT systems:
  233. //
  234. typedef struct _WKSTA_INFO_1010 {
  235. DWORD wki1010_char_wait;
  236. } WKSTA_INFO_1010, *PWKSTA_INFO_1010, *LPWKSTA_INFO_1010;
  237. typedef struct _WKSTA_INFO_1011 {
  238. DWORD wki1011_collection_time;
  239. } WKSTA_INFO_1011, *PWKSTA_INFO_1011, *LPWKSTA_INFO_1011;
  240. typedef struct _WKSTA_INFO_1012 {
  241. DWORD wki1012_maximum_collection_count;
  242. } WKSTA_INFO_1012, *PWKSTA_INFO_1012, *LPWKSTA_INFO_1012;
  243. //
  244. // The following level are supported on down-level systems (LAN Man 2.x)
  245. // only:
  246. //
  247. typedef struct _WKSTA_INFO_1027 {
  248. DWORD wki1027_errlog_sz;
  249. } WKSTA_INFO_1027, *PWKSTA_INFO_1027, *LPWKSTA_INFO_1027;
  250. typedef struct _WKSTA_INFO_1028 {
  251. DWORD wki1028_print_buf_time;
  252. } WKSTA_INFO_1028, *PWKSTA_INFO_1028, *LPWKSTA_INFO_1028;
  253. typedef struct _WKSTA_INFO_1032 {
  254. DWORD wki1032_wrk_heuristics;
  255. } WKSTA_INFO_1032, *PWKSTA_INFO_1032, *LPWKSTA_INFO_1032;
  256. //
  257. // The following levels are settable on NT systems, and have no
  258. // effect on down-level systems (i.e. LANMan 2.x) since these
  259. // fields cannot be set on them:
  260. //
  261. typedef struct _WKSTA_INFO_1013 {
  262. DWORD wki1013_keep_conn;
  263. } WKSTA_INFO_1013, *PWKSTA_INFO_1013, *LPWKSTA_INFO_1013;
  264. typedef struct _WKSTA_INFO_1018 {
  265. DWORD wki1018_sess_timeout;
  266. } WKSTA_INFO_1018, *PWKSTA_INFO_1018, *LPWKSTA_INFO_1018;
  267. typedef struct _WKSTA_INFO_1023 {
  268. DWORD wki1023_siz_char_buf;
  269. } WKSTA_INFO_1023, *PWKSTA_INFO_1023, *LPWKSTA_INFO_1023;
  270. typedef struct _WKSTA_INFO_1033 {
  271. DWORD wki1033_max_threads;
  272. } WKSTA_INFO_1033, *PWKSTA_INFO_1033, *LPWKSTA_INFO_1033;
  273. //
  274. // The following levels are only supported on NT systems:
  275. //
  276. typedef struct _WKSTA_INFO_1041 {
  277. DWORD wki1041_lock_quota;
  278. } WKSTA_INFO_1041, *PWKSTA_INFO_1041, *LPWKSTA_INFO_1041;
  279. typedef struct _WKSTA_INFO_1042 {
  280. DWORD wki1042_lock_increment;
  281. } WKSTA_INFO_1042, *PWKSTA_INFO_1042, *LPWKSTA_INFO_1042;
  282. typedef struct _WKSTA_INFO_1043 {
  283. DWORD wki1043_lock_maximum;
  284. } WKSTA_INFO_1043, *PWKSTA_INFO_1043, *LPWKSTA_INFO_1043;
  285. typedef struct _WKSTA_INFO_1044 {
  286. DWORD wki1044_pipe_increment;
  287. } WKSTA_INFO_1044, *PWKSTA_INFO_1044, *LPWKSTA_INFO_1044;
  288. typedef struct _WKSTA_INFO_1045 {
  289. DWORD wki1045_pipe_maximum;
  290. } WKSTA_INFO_1045, *PWKSTA_INFO_1045, *LPWKSTA_INFO_1045;
  291. typedef struct _WKSTA_INFO_1046 {
  292. DWORD wki1046_dormant_file_limit;
  293. } WKSTA_INFO_1046, *PWKSTA_INFO_1046, *LPWKSTA_INFO_1046;
  294. typedef struct _WKSTA_INFO_1047 {
  295. DWORD wki1047_cache_file_timeout;
  296. } WKSTA_INFO_1047, *PWKSTA_INFO_1047, *LPWKSTA_INFO_1047;
  297. typedef struct _WKSTA_INFO_1048 {
  298. BOOL wki1048_use_opportunistic_locking;
  299. } WKSTA_INFO_1048, *PWKSTA_INFO_1048, *LPWKSTA_INFO_1048;
  300. typedef struct _WKSTA_INFO_1049 {
  301. BOOL wki1049_use_unlock_behind;
  302. } WKSTA_INFO_1049, *PWKSTA_INFO_1049, *LPWKSTA_INFO_1049;
  303. typedef struct _WKSTA_INFO_1050 {
  304. BOOL wki1050_use_close_behind;
  305. } WKSTA_INFO_1050, *PWKSTA_INFO_1050, *LPWKSTA_INFO_1050;
  306. typedef struct _WKSTA_INFO_1051 {
  307. BOOL wki1051_buf_named_pipes;
  308. } WKSTA_INFO_1051, *PWKSTA_INFO_1051, *LPWKSTA_INFO_1051;
  309. typedef struct _WKSTA_INFO_1052 {
  310. BOOL wki1052_use_lock_read_unlock;
  311. } WKSTA_INFO_1052, *PWKSTA_INFO_1052, *LPWKSTA_INFO_1052;
  312. typedef struct _WKSTA_INFO_1053 {
  313. BOOL wki1053_utilize_nt_caching;
  314. } WKSTA_INFO_1053, *PWKSTA_INFO_1053, *LPWKSTA_INFO_1053;
  315. typedef struct _WKSTA_INFO_1054 {
  316. BOOL wki1054_use_raw_read;
  317. } WKSTA_INFO_1054, *PWKSTA_INFO_1054, *LPWKSTA_INFO_1054;
  318. typedef struct _WKSTA_INFO_1055 {
  319. BOOL wki1055_use_raw_write;
  320. } WKSTA_INFO_1055, *PWKSTA_INFO_1055, *LPWKSTA_INFO_1055;
  321. typedef struct _WKSTA_INFO_1056 {
  322. BOOL wki1056_use_write_raw_data;
  323. } WKSTA_INFO_1056, *PWKSTA_INFO_1056, *LPWKSTA_INFO_1056;
  324. typedef struct _WKSTA_INFO_1057 {
  325. BOOL wki1057_use_encryption;
  326. } WKSTA_INFO_1057, *PWKSTA_INFO_1057, *LPWKSTA_INFO_1057;
  327. typedef struct _WKSTA_INFO_1058 {
  328. BOOL wki1058_buf_files_deny_write;
  329. } WKSTA_INFO_1058, *PWKSTA_INFO_1058, *LPWKSTA_INFO_1058;
  330. typedef struct _WKSTA_INFO_1059 {
  331. BOOL wki1059_buf_read_only_files;
  332. } WKSTA_INFO_1059, *PWKSTA_INFO_1059, *LPWKSTA_INFO_1059;
  333. typedef struct _WKSTA_INFO_1060 {
  334. BOOL wki1060_force_core_create_mode;
  335. } WKSTA_INFO_1060, *PWKSTA_INFO_1060, *LPWKSTA_INFO_1060;
  336. typedef struct _WKSTA_INFO_1061 {
  337. BOOL wki1061_use_512_byte_max_transfer;
  338. } WKSTA_INFO_1061, *PWKSTA_INFO_1061, *LPWKSTA_INFO_1061;
  339. typedef struct _WKSTA_INFO_1062 {
  340. DWORD wki1062_read_ahead_throughput;
  341. } WKSTA_INFO_1062, *PWKSTA_INFO_1062, *LPWKSTA_INFO_1062;
  342. //
  343. // NetWkstaUserGetInfo (local only) and NetWkstaUserEnum -
  344. // no access restrictions.
  345. //
  346. typedef struct _WKSTA_USER_INFO_0 {
  347. LMSTR wkui0_username;
  348. }WKSTA_USER_INFO_0, *PWKSTA_USER_INFO_0, *LPWKSTA_USER_INFO_0;
  349. //
  350. // NetWkstaUserGetInfo (local only) and NetWkstaUserEnum -
  351. // no access restrictions.
  352. //
  353. typedef struct _WKSTA_USER_INFO_1 {
  354. LMSTR wkui1_username;
  355. LMSTR wkui1_logon_domain;
  356. LMSTR wkui1_oth_domains;
  357. LMSTR wkui1_logon_server;
  358. }WKSTA_USER_INFO_1, *PWKSTA_USER_INFO_1, *LPWKSTA_USER_INFO_1;
  359. //
  360. // NetWkstaUserSetInfo - local access.
  361. //
  362. typedef struct _WKSTA_USER_INFO_1101 {
  363. LMSTR wkui1101_oth_domains;
  364. } WKSTA_USER_INFO_1101, *PWKSTA_USER_INFO_1101,
  365. *LPWKSTA_USER_INFO_1101;
  366. //
  367. // NetWkstaTransportAdd - admin access
  368. //
  369. typedef struct _WKSTA_TRANSPORT_INFO_0 {
  370. DWORD wkti0_quality_of_service;
  371. DWORD wkti0_number_of_vcs;
  372. LMSTR wkti0_transport_name;
  373. LMSTR wkti0_transport_address;
  374. BOOL wkti0_wan_ish;
  375. }WKSTA_TRANSPORT_INFO_0, *PWKSTA_TRANSPORT_INFO_0,
  376. *LPWKSTA_TRANSPORT_INFO_0;
  377. //
  378. // Special Values and Constants
  379. //
  380. //
  381. // Identifiers for use as NetWkstaSetInfo parmnum parameter
  382. //
  383. //
  384. // One of these values indicates the parameter within an information
  385. // structure that is invalid when ERROR_INVALID_PARAMETER is returned by
  386. // NetWkstaSetInfo.
  387. //
  388. #define WKSTA_PLATFORM_ID_PARMNUM 100
  389. #define WKSTA_COMPUTERNAME_PARMNUM 1
  390. #define WKSTA_LANGROUP_PARMNUM 2
  391. #define WKSTA_VER_MAJOR_PARMNUM 4
  392. #define WKSTA_VER_MINOR_PARMNUM 5
  393. #define WKSTA_LOGGED_ON_USERS_PARMNUM 6
  394. #define WKSTA_LANROOT_PARMNUM 7
  395. #define WKSTA_LOGON_DOMAIN_PARMNUM 8
  396. #define WKSTA_LOGON_SERVER_PARMNUM 9
  397. #define WKSTA_CHARWAIT_PARMNUM 10 // Supported by down-level.
  398. #define WKSTA_CHARTIME_PARMNUM 11 // Supported by down-level.
  399. #define WKSTA_CHARCOUNT_PARMNUM 12 // Supported by down-level.
  400. #define WKSTA_KEEPCONN_PARMNUM 13
  401. #define WKSTA_KEEPSEARCH_PARMNUM 14
  402. #define WKSTA_MAXCMDS_PARMNUM 15
  403. #define WKSTA_NUMWORKBUF_PARMNUM 16
  404. #define WKSTA_MAXWRKCACHE_PARMNUM 17
  405. #define WKSTA_SESSTIMEOUT_PARMNUM 18
  406. #define WKSTA_SIZERROR_PARMNUM 19
  407. #define WKSTA_NUMALERTS_PARMNUM 20
  408. #define WKSTA_NUMSERVICES_PARMNUM 21
  409. #define WKSTA_NUMCHARBUF_PARMNUM 22
  410. #define WKSTA_SIZCHARBUF_PARMNUM 23
  411. #define WKSTA_ERRLOGSZ_PARMNUM 27 // Supported by down-level.
  412. #define WKSTA_PRINTBUFTIME_PARMNUM 28 // Supported by down-level.
  413. #define WKSTA_SIZWORKBUF_PARMNUM 29
  414. #define WKSTA_MAILSLOTS_PARMNUM 30
  415. #define WKSTA_NUMDGRAMBUF_PARMNUM 31
  416. #define WKSTA_WRKHEURISTICS_PARMNUM 32 // Supported by down-level.
  417. #define WKSTA_MAXTHREADS_PARMNUM 33
  418. #define WKSTA_LOCKQUOTA_PARMNUM 41
  419. #define WKSTA_LOCKINCREMENT_PARMNUM 42
  420. #define WKSTA_LOCKMAXIMUM_PARMNUM 43
  421. #define WKSTA_PIPEINCREMENT_PARMNUM 44
  422. #define WKSTA_PIPEMAXIMUM_PARMNUM 45
  423. #define WKSTA_DORMANTFILELIMIT_PARMNUM 46
  424. #define WKSTA_CACHEFILETIMEOUT_PARMNUM 47
  425. #define WKSTA_USEOPPORTUNISTICLOCKING_PARMNUM 48
  426. #define WKSTA_USEUNLOCKBEHIND_PARMNUM 49
  427. #define WKSTA_USECLOSEBEHIND_PARMNUM 50
  428. #define WKSTA_BUFFERNAMEDPIPES_PARMNUM 51
  429. #define WKSTA_USELOCKANDREADANDUNLOCK_PARMNUM 52
  430. #define WKSTA_UTILIZENTCACHING_PARMNUM 53
  431. #define WKSTA_USERAWREAD_PARMNUM 54
  432. #define WKSTA_USERAWWRITE_PARMNUM 55
  433. #define WKSTA_USEWRITERAWWITHDATA_PARMNUM 56
  434. #define WKSTA_USEENCRYPTION_PARMNUM 57
  435. #define WKSTA_BUFFILESWITHDENYWRITE_PARMNUM 58
  436. #define WKSTA_BUFFERREADONLYFILES_PARMNUM 59
  437. #define WKSTA_FORCECORECREATEMODE_PARMNUM 60
  438. #define WKSTA_USE512BYTESMAXTRANSFER_PARMNUM 61
  439. #define WKSTA_READAHEADTHRUPUT_PARMNUM 62
  440. //
  441. // One of these values indicates the parameter within an information
  442. // structure that is invalid when ERROR_INVALID_PARAMETER is returned by
  443. // NetWkstaUserSetInfo.
  444. //
  445. #define WKSTA_OTH_DOMAINS_PARMNUM 101
  446. //
  447. // One of these values indicates the parameter within an information
  448. // structure that is invalid when ERROR_INVALID_PARAMETER is returned by
  449. // NetWkstaTransportAdd.
  450. //
  451. #define TRANSPORT_QUALITYOFSERVICE_PARMNUM 201
  452. #define TRANSPORT_NAME_PARMNUM 202
  453. #ifdef __cplusplus
  454. }
  455. #endif
  456. #endif // _LMWKSTA_