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.

539 lines
16 KiB

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