source: Daodan/MSYS2/mingw32/i686-w64-mingw32/include/lmaccess.h@ 1186

Last change on this file since 1186 was 1166, checked in by rossy, 3 years ago

Daodan: Replace MinGW build env with an up-to-date MSYS2 env

File size: 33.6 KB
Line 
1/**
2 * This file has no copyright assigned and is placed in the Public Domain.
3 * This file is part of the mingw-w64 runtime package.
4 * No warranty is given; refer to the file DISCLAIMER.PD within this package.
5 */
6#ifndef _LMUSER_
7#define _LMUSER_
8
9#ifdef __cplusplus
10extern "C" {
11#endif
12
13#include <lmcons.h>
14
15 NET_API_STATUS WINAPI NetUserAdd(LPCWSTR servername,DWORD level,LPBYTE buf,LPDWORD parm_err);
16 NET_API_STATUS WINAPI NetUserEnum(LPCWSTR servername,DWORD level,DWORD filter,LPBYTE *bufptr,DWORD prefmaxlen,LPDWORD entriesread,LPDWORD totalentries,LPDWORD resume_handle);
17 NET_API_STATUS WINAPI NetUserGetInfo(LPCWSTR servername,LPCWSTR username,DWORD level,LPBYTE *bufptr);
18 NET_API_STATUS WINAPI NetUserSetInfo(LPCWSTR servername,LPCWSTR username,DWORD level,LPBYTE buf,LPDWORD parm_err);
19 NET_API_STATUS WINAPI NetUserDel(LPCWSTR servername,LPCWSTR username);
20 NET_API_STATUS WINAPI NetUserGetGroups(LPCWSTR servername,LPCWSTR username,DWORD level,LPBYTE *bufptr,DWORD prefmaxlen,LPDWORD entriesread,LPDWORD totalentries);
21 NET_API_STATUS WINAPI NetUserSetGroups(LPCWSTR servername,LPCWSTR username,DWORD level,LPBYTE buf,DWORD num_entries);
22 NET_API_STATUS WINAPI NetUserGetLocalGroups(LPCWSTR servername,LPCWSTR username,DWORD level,DWORD flags,LPBYTE *bufptr,DWORD prefmaxlen,LPDWORD entriesread,LPDWORD totalentries);
23 NET_API_STATUS WINAPI NetUserModalsGet(LPCWSTR servername,DWORD level,LPBYTE *bufptr);
24 NET_API_STATUS WINAPI NetUserModalsSet(LPCWSTR servername,DWORD level,LPBYTE buf,LPDWORD parm_err);
25 NET_API_STATUS WINAPI NetUserChangePassword(LPCWSTR domainname,LPCWSTR username,LPCWSTR oldpassword,LPCWSTR newpassword);
26
27 typedef struct _USER_INFO_0 {
28 LPWSTR usri0_name;
29 } USER_INFO_0,*PUSER_INFO_0,*LPUSER_INFO_0;
30
31 typedef struct _USER_INFO_1 {
32 LPWSTR usri1_name;
33 LPWSTR usri1_password;
34 DWORD usri1_password_age;
35 DWORD usri1_priv;
36 LPWSTR usri1_home_dir;
37 LPWSTR usri1_comment;
38 DWORD usri1_flags;
39 LPWSTR usri1_script_path;
40 } USER_INFO_1,*PUSER_INFO_1,*LPUSER_INFO_1;
41
42 typedef struct _USER_INFO_2 {
43 LPWSTR usri2_name;
44 LPWSTR usri2_password;
45 DWORD usri2_password_age;
46 DWORD usri2_priv;
47 LPWSTR usri2_home_dir;
48 LPWSTR usri2_comment;
49 DWORD usri2_flags;
50 LPWSTR usri2_script_path;
51 DWORD usri2_auth_flags;
52 LPWSTR usri2_full_name;
53 LPWSTR usri2_usr_comment;
54 LPWSTR usri2_parms;
55 LPWSTR usri2_workstations;
56 DWORD usri2_last_logon;
57 DWORD usri2_last_logoff;
58 DWORD usri2_acct_expires;
59 DWORD usri2_max_storage;
60 DWORD usri2_units_per_week;
61 PBYTE usri2_logon_hours;
62 DWORD usri2_bad_pw_count;
63 DWORD usri2_num_logons;
64 LPWSTR usri2_logon_server;
65 DWORD usri2_country_code;
66 DWORD usri2_code_page;
67 } USER_INFO_2,*PUSER_INFO_2,*LPUSER_INFO_2;
68
69 typedef struct _USER_INFO_3 {
70 LPWSTR usri3_name;
71 LPWSTR usri3_password;
72 DWORD usri3_password_age;
73 DWORD usri3_priv;
74 LPWSTR usri3_home_dir;
75 LPWSTR usri3_comment;
76 DWORD usri3_flags;
77 LPWSTR usri3_script_path;
78 DWORD usri3_auth_flags;
79 LPWSTR usri3_full_name;
80 LPWSTR usri3_usr_comment;
81 LPWSTR usri3_parms;
82 LPWSTR usri3_workstations;
83 DWORD usri3_last_logon;
84 DWORD usri3_last_logoff;
85 DWORD usri3_acct_expires;
86 DWORD usri3_max_storage;
87 DWORD usri3_units_per_week;
88 PBYTE usri3_logon_hours;
89 DWORD usri3_bad_pw_count;
90 DWORD usri3_num_logons;
91 LPWSTR usri3_logon_server;
92 DWORD usri3_country_code;
93 DWORD usri3_code_page;
94 DWORD usri3_user_id;
95 DWORD usri3_primary_group_id;
96 LPWSTR usri3_profile;
97 LPWSTR usri3_home_dir_drive;
98 DWORD usri3_password_expired;
99 } USER_INFO_3,*PUSER_INFO_3,*LPUSER_INFO_3;
100
101 typedef struct _USER_INFO_4 {
102 LPWSTR usri4_name;
103 LPWSTR usri4_password;
104 DWORD usri4_password_age;
105 DWORD usri4_priv;
106 LPWSTR usri4_home_dir;
107 LPWSTR usri4_comment;
108 DWORD usri4_flags;
109 LPWSTR usri4_script_path;
110 DWORD usri4_auth_flags;
111 LPWSTR usri4_full_name;
112 LPWSTR usri4_usr_comment;
113 LPWSTR usri4_parms;
114 LPWSTR usri4_workstations;
115 DWORD usri4_last_logon;
116 DWORD usri4_last_logoff;
117 DWORD usri4_acct_expires;
118 DWORD usri4_max_storage;
119 DWORD usri4_units_per_week;
120 PBYTE usri4_logon_hours;
121 DWORD usri4_bad_pw_count;
122 DWORD usri4_num_logons;
123 LPWSTR usri4_logon_server;
124 DWORD usri4_country_code;
125 DWORD usri4_code_page;
126 PSID usri4_user_sid;
127 DWORD usri4_primary_group_id;
128 LPWSTR usri4_profile;
129 LPWSTR usri4_home_dir_drive;
130 DWORD usri4_password_expired;
131 } USER_INFO_4,*PUSER_INFO_4,*LPUSER_INFO_4;
132
133 typedef struct _USER_INFO_10 {
134 LPWSTR usri10_name;
135 LPWSTR usri10_comment;
136 LPWSTR usri10_usr_comment;
137 LPWSTR usri10_full_name;
138 }USER_INFO_10,*PUSER_INFO_10,*LPUSER_INFO_10;
139
140 typedef struct _USER_INFO_11 {
141 LPWSTR usri11_name;
142 LPWSTR usri11_comment;
143 LPWSTR usri11_usr_comment;
144 LPWSTR usri11_full_name;
145 DWORD usri11_priv;
146 DWORD usri11_auth_flags;
147 DWORD usri11_password_age;
148 LPWSTR usri11_home_dir;
149 LPWSTR usri11_parms;
150 DWORD usri11_last_logon;
151 DWORD usri11_last_logoff;
152 DWORD usri11_bad_pw_count;
153 DWORD usri11_num_logons;
154 LPWSTR usri11_logon_server;
155 DWORD usri11_country_code;
156 LPWSTR usri11_workstations;
157 DWORD usri11_max_storage;
158 DWORD usri11_units_per_week;
159 PBYTE usri11_logon_hours;
160 DWORD usri11_code_page;
161 } USER_INFO_11,*PUSER_INFO_11,*LPUSER_INFO_11;
162
163 typedef struct _USER_INFO_20 {
164 LPWSTR usri20_name;
165 LPWSTR usri20_full_name;
166 LPWSTR usri20_comment;
167 DWORD usri20_flags;
168 DWORD usri20_user_id;
169 } USER_INFO_20,*PUSER_INFO_20,*LPUSER_INFO_20;
170
171 typedef struct _USER_INFO_21 {
172 BYTE usri21_password[ENCRYPTED_PWLEN];
173 } USER_INFO_21,*PUSER_INFO_21,*LPUSER_INFO_21;
174
175 typedef struct _USER_INFO_22 {
176 LPWSTR usri22_name;
177 BYTE usri22_password[ENCRYPTED_PWLEN];
178 DWORD usri22_password_age;
179 DWORD usri22_priv;
180 LPWSTR usri22_home_dir;
181 LPWSTR usri22_comment;
182 DWORD usri22_flags;
183 LPWSTR usri22_script_path;
184 DWORD usri22_auth_flags;
185 LPWSTR usri22_full_name;
186 LPWSTR usri22_usr_comment;
187 LPWSTR usri22_parms;
188 LPWSTR usri22_workstations;
189 DWORD usri22_last_logon;
190 DWORD usri22_last_logoff;
191 DWORD usri22_acct_expires;
192 DWORD usri22_max_storage;
193 DWORD usri22_units_per_week;
194 PBYTE usri22_logon_hours;
195 DWORD usri22_bad_pw_count;
196 DWORD usri22_num_logons;
197 LPWSTR usri22_logon_server;
198 DWORD usri22_country_code;
199 DWORD usri22_code_page;
200 } USER_INFO_22,*PUSER_INFO_22,*LPUSER_INFO_22;
201
202 typedef struct _USER_INFO_23 {
203 LPWSTR usri23_name;
204 LPWSTR usri23_full_name;
205 LPWSTR usri23_comment;
206 DWORD usri23_flags;
207 PSID usri23_user_sid;
208 } USER_INFO_23,*PUSER_INFO_23,*LPUSER_INFO_23;
209
210 typedef struct _USER_INFO_24 {
211 BOOL usri24_internet_identity;
212 DWORD usri24_flags;
213 LPWSTR usri24_internet_provider_name;
214 LPWSTR usri24_internet_principal_name;
215 PSID usri24_user_sid;
216 } USER_INFO_24,*PUSER_INFO_24,*LPUSER_INFO_24;
217
218 typedef struct _USER_INFO_1003 {
219 LPWSTR usri1003_password;
220 } USER_INFO_1003,*PUSER_INFO_1003,*LPUSER_INFO_1003;
221
222 typedef struct _USER_INFO_1005 {
223 DWORD usri1005_priv;
224 } USER_INFO_1005,*PUSER_INFO_1005,*LPUSER_INFO_1005;
225
226 typedef struct _USER_INFO_1006 {
227 LPWSTR usri1006_home_dir;
228 } USER_INFO_1006,*PUSER_INFO_1006,*LPUSER_INFO_1006;
229
230 typedef struct _USER_INFO_1007 {
231 LPWSTR usri1007_comment;
232 } USER_INFO_1007,*PUSER_INFO_1007,*LPUSER_INFO_1007;
233
234 typedef struct _USER_INFO_1008 {
235 DWORD usri1008_flags;
236 } USER_INFO_1008,*PUSER_INFO_1008,*LPUSER_INFO_1008;
237
238 typedef struct _USER_INFO_1009 {
239 LPWSTR usri1009_script_path;
240 } USER_INFO_1009,*PUSER_INFO_1009,*LPUSER_INFO_1009;
241
242 typedef struct _USER_INFO_1010 {
243 DWORD usri1010_auth_flags;
244 } USER_INFO_1010,*PUSER_INFO_1010,*LPUSER_INFO_1010;
245
246 typedef struct _USER_INFO_1011 {
247 LPWSTR usri1011_full_name;
248 } USER_INFO_1011,*PUSER_INFO_1011,*LPUSER_INFO_1011;
249
250 typedef struct _USER_INFO_1012 {
251 LPWSTR usri1012_usr_comment;
252 } USER_INFO_1012,*PUSER_INFO_1012,*LPUSER_INFO_1012;
253
254 typedef struct _USER_INFO_1013 {
255 LPWSTR usri1013_parms;
256 } USER_INFO_1013,*PUSER_INFO_1013,*LPUSER_INFO_1013;
257
258 typedef struct _USER_INFO_1014 {
259 LPWSTR usri1014_workstations;
260 } USER_INFO_1014,*PUSER_INFO_1014,*LPUSER_INFO_1014;
261
262 typedef struct _USER_INFO_1017 {
263 DWORD usri1017_acct_expires;
264 } USER_INFO_1017,*PUSER_INFO_1017,*LPUSER_INFO_1017;
265
266 typedef struct _USER_INFO_1018 {
267 DWORD usri1018_max_storage;
268 } USER_INFO_1018,*PUSER_INFO_1018,*LPUSER_INFO_1018;
269
270 typedef struct _USER_INFO_1020 {
271 DWORD usri1020_units_per_week;
272 LPBYTE usri1020_logon_hours;
273 } USER_INFO_1020,*PUSER_INFO_1020,*LPUSER_INFO_1020;
274
275 typedef struct _USER_INFO_1023 {
276 LPWSTR usri1023_logon_server;
277 } USER_INFO_1023,*PUSER_INFO_1023,*LPUSER_INFO_1023;
278
279 typedef struct _USER_INFO_1024 {
280 DWORD usri1024_country_code;
281 } USER_INFO_1024,*PUSER_INFO_1024,*LPUSER_INFO_1024;
282
283 typedef struct _USER_INFO_1025 {
284 DWORD usri1025_code_page;
285 } USER_INFO_1025,*PUSER_INFO_1025,*LPUSER_INFO_1025;
286
287 typedef struct _USER_INFO_1051 {
288 DWORD usri1051_primary_group_id;
289 } USER_INFO_1051,*PUSER_INFO_1051,*LPUSER_INFO_1051;
290
291 typedef struct _USER_INFO_1052 {
292 LPWSTR usri1052_profile;
293 } USER_INFO_1052,*PUSER_INFO_1052,*LPUSER_INFO_1052;
294
295 typedef struct _USER_INFO_1053 {
296 LPWSTR usri1053_home_dir_drive;
297 } USER_INFO_1053,*PUSER_INFO_1053,*LPUSER_INFO_1053;
298
299 typedef struct _USER_MODALS_INFO_0 {
300 DWORD usrmod0_min_passwd_len;
301 DWORD usrmod0_max_passwd_age;
302 DWORD usrmod0_min_passwd_age;
303 DWORD usrmod0_force_logoff;
304 DWORD usrmod0_password_hist_len;
305 } USER_MODALS_INFO_0,*PUSER_MODALS_INFO_0,*LPUSER_MODALS_INFO_0;
306
307 typedef struct _USER_MODALS_INFO_1 {
308 DWORD usrmod1_role;
309 LPWSTR usrmod1_primary;
310 } USER_MODALS_INFO_1,*PUSER_MODALS_INFO_1,*LPUSER_MODALS_INFO_1;
311
312 typedef struct _USER_MODALS_INFO_2 {
313 LPWSTR usrmod2_domain_name;
314 PSID usrmod2_domain_id;
315 } USER_MODALS_INFO_2,*PUSER_MODALS_INFO_2,*LPUSER_MODALS_INFO_2;
316
317 typedef struct _USER_MODALS_INFO_3 {
318 DWORD usrmod3_lockout_duration;
319 DWORD usrmod3_lockout_observation_window;
320 DWORD usrmod3_lockout_threshold;
321 } USER_MODALS_INFO_3,*PUSER_MODALS_INFO_3,*LPUSER_MODALS_INFO_3;
322
323 typedef struct _USER_MODALS_INFO_1001 {
324 DWORD usrmod1001_min_passwd_len;
325 } USER_MODALS_INFO_1001,*PUSER_MODALS_INFO_1001,*LPUSER_MODALS_INFO_1001;
326
327 typedef struct _USER_MODALS_INFO_1002 {
328 DWORD usrmod1002_max_passwd_age;
329 } USER_MODALS_INFO_1002,*PUSER_MODALS_INFO_1002,*LPUSER_MODALS_INFO_1002;
330
331 typedef struct _USER_MODALS_INFO_1003 {
332 DWORD usrmod1003_min_passwd_age;
333 } USER_MODALS_INFO_1003,*PUSER_MODALS_INFO_1003,*LPUSER_MODALS_INFO_1003;
334
335 typedef struct _USER_MODALS_INFO_1004 {
336 DWORD usrmod1004_force_logoff;
337 } USER_MODALS_INFO_1004,*PUSER_MODALS_INFO_1004,*LPUSER_MODALS_INFO_1004;
338
339 typedef struct _USER_MODALS_INFO_1005 {
340 DWORD usrmod1005_password_hist_len;
341 } USER_MODALS_INFO_1005,*PUSER_MODALS_INFO_1005,*LPUSER_MODALS_INFO_1005;
342
343 typedef struct _USER_MODALS_INFO_1006 {
344 DWORD usrmod1006_role;
345 } USER_MODALS_INFO_1006,*PUSER_MODALS_INFO_1006,*LPUSER_MODALS_INFO_1006;
346
347 typedef struct _USER_MODALS_INFO_1007 {
348 LPWSTR usrmod1007_primary;
349 } USER_MODALS_INFO_1007,*PUSER_MODALS_INFO_1007,*LPUSER_MODALS_INFO_1007;
350
351#define UF_SCRIPT 0x0001
352#define UF_ACCOUNTDISABLE 0x0002
353#define UF_HOMEDIR_REQUIRED 0x0008
354#define UF_LOCKOUT 0x0010
355#define UF_PASSWD_NOTREQD 0x0020
356#define UF_PASSWD_CANT_CHANGE 0x0040
357#define UF_ENCRYPTED_TEXT_PASSWORD_ALLOWED 0x0080
358
359#define UF_TEMP_DUPLICATE_ACCOUNT 0x0100
360#define UF_NORMAL_ACCOUNT 0x0200
361#define UF_INTERDOMAIN_TRUST_ACCOUNT 0x0800
362#define UF_WORKSTATION_TRUST_ACCOUNT 0x1000
363#define UF_SERVER_TRUST_ACCOUNT 0x2000
364
365#define UF_MACHINE_ACCOUNT_MASK (UF_INTERDOMAIN_TRUST_ACCOUNT | UF_WORKSTATION_TRUST_ACCOUNT | UF_SERVER_TRUST_ACCOUNT)
366#define UF_ACCOUNT_TYPE_MASK (UF_TEMP_DUPLICATE_ACCOUNT | UF_NORMAL_ACCOUNT | UF_INTERDOMAIN_TRUST_ACCOUNT | UF_WORKSTATION_TRUST_ACCOUNT | UF_SERVER_TRUST_ACCOUNT)
367
368#define UF_DONT_EXPIRE_PASSWD 0x10000
369#define UF_MNS_LOGON_ACCOUNT 0x20000
370#define UF_SMARTCARD_REQUIRED 0x40000
371#define UF_TRUSTED_FOR_DELEGATION 0x80000
372#define UF_NOT_DELEGATED 0x100000
373#define UF_USE_DES_KEY_ONLY 0x200000
374#define UF_DONT_REQUIRE_PREAUTH 0x400000
375#define UF_PASSWORD_EXPIRED 0x800000
376#define UF_TRUSTED_TO_AUTHENTICATE_FOR_DELEGATION 0x1000000
377#define UF_NO_AUTH_DATA_REQUIRED 0x2000000
378
379#define UF_SETTABLE_BITS (UF_SCRIPT | UF_ACCOUNTDISABLE | UF_LOCKOUT | UF_HOMEDIR_REQUIRED | UF_PASSWD_NOTREQD | UF_PASSWD_CANT_CHANGE | UF_ACCOUNT_TYPE_MASK | UF_DONT_EXPIRE_PASSWD | UF_MNS_LOGON_ACCOUNT | UF_ENCRYPTED_TEXT_PASSWORD_ALLOWED | UF_SMARTCARD_REQUIRED | UF_TRUSTED_FOR_DELEGATION | UF_NOT_DELEGATED | UF_USE_DES_KEY_ONLY | UF_DONT_REQUIRE_PREAUTH | UF_PASSWORD_EXPIRED | UF_TRUSTED_TO_AUTHENTICATE_FOR_DELEGATION | UF_NO_AUTH_DATA_REQUIRED)
380
381#define FILTER_TEMP_DUPLICATE_ACCOUNT (0x0001)
382#define FILTER_NORMAL_ACCOUNT (0x0002)
383
384#define FILTER_INTERDOMAIN_TRUST_ACCOUNT (0x0008)
385#define FILTER_WORKSTATION_TRUST_ACCOUNT (0x0010)
386#define FILTER_SERVER_TRUST_ACCOUNT (0x0020)
387
388#define LG_INCLUDE_INDIRECT (0x0001)
389
390#define AF_OP_PRINT 0x1
391#define AF_OP_COMM 0x2
392#define AF_OP_SERVER 0x4
393#define AF_OP_ACCOUNTS 0x8
394#define AF_SETTABLE_BITS (AF_OP_PRINT | AF_OP_COMM | AF_OP_SERVER | AF_OP_ACCOUNTS)
395
396#define UAS_ROLE_STANDALONE 0
397#define UAS_ROLE_MEMBER 1
398#define UAS_ROLE_BACKUP 2
399#define UAS_ROLE_PRIMARY 3
400
401#define USER_NAME_PARMNUM 1
402#define USER_PASSWORD_PARMNUM 3
403#define USER_PASSWORD_AGE_PARMNUM 4
404#define USER_PRIV_PARMNUM 5
405#define USER_HOME_DIR_PARMNUM 6
406#define USER_COMMENT_PARMNUM 7
407#define USER_FLAGS_PARMNUM 8
408#define USER_SCRIPT_PATH_PARMNUM 9
409#define USER_AUTH_FLAGS_PARMNUM 10
410#define USER_FULL_NAME_PARMNUM 11
411#define USER_USR_COMMENT_PARMNUM 12
412#define USER_PARMS_PARMNUM 13
413#define USER_WORKSTATIONS_PARMNUM 14
414#define USER_LAST_LOGON_PARMNUM 15
415#define USER_LAST_LOGOFF_PARMNUM 16
416#define USER_ACCT_EXPIRES_PARMNUM 17
417#define USER_MAX_STORAGE_PARMNUM 18
418#define USER_UNITS_PER_WEEK_PARMNUM 19
419#define USER_LOGON_HOURS_PARMNUM 20
420#define USER_PAD_PW_COUNT_PARMNUM 21
421#define USER_NUM_LOGONS_PARMNUM 22
422#define USER_LOGON_SERVER_PARMNUM 23
423#define USER_COUNTRY_CODE_PARMNUM 24
424#define USER_CODE_PAGE_PARMNUM 25
425#define USER_PRIMARY_GROUP_PARMNUM 51
426#define USER_PROFILE 52
427#define USER_PROFILE_PARMNUM 52
428#define USER_HOME_DIR_DRIVE_PARMNUM 53
429
430#define USER_NAME_INFOLEVEL (PARMNUM_BASE_INFOLEVEL + USER_NAME_PARMNUM)
431#define USER_PASSWORD_INFOLEVEL (PARMNUM_BASE_INFOLEVEL + USER_PASSWORD_PARMNUM)
432#define USER_PASSWORD_AGE_INFOLEVEL (PARMNUM_BASE_INFOLEVEL + USER_PASSWORD_AGE_PARMNUM)
433#define USER_PRIV_INFOLEVEL (PARMNUM_BASE_INFOLEVEL + USER_PRIV_PARMNUM)
434#define USER_HOME_DIR_INFOLEVEL (PARMNUM_BASE_INFOLEVEL + USER_HOME_DIR_PARMNUM)
435#define USER_COMMENT_INFOLEVEL (PARMNUM_BASE_INFOLEVEL + USER_COMMENT_PARMNUM)
436#define USER_FLAGS_INFOLEVEL (PARMNUM_BASE_INFOLEVEL + USER_FLAGS_PARMNUM)
437#define USER_SCRIPT_PATH_INFOLEVEL (PARMNUM_BASE_INFOLEVEL + USER_SCRIPT_PATH_PARMNUM)
438#define USER_AUTH_FLAGS_INFOLEVEL (PARMNUM_BASE_INFOLEVEL + USER_AUTH_FLAGS_PARMNUM)
439#define USER_FULL_NAME_INFOLEVEL (PARMNUM_BASE_INFOLEVEL + USER_FULL_NAME_PARMNUM)
440#define USER_USR_COMMENT_INFOLEVEL (PARMNUM_BASE_INFOLEVEL + USER_USR_COMMENT_PARMNUM)
441#define USER_PARMS_INFOLEVEL (PARMNUM_BASE_INFOLEVEL + USER_PARMS_PARMNUM)
442#define USER_WORKSTATIONS_INFOLEVEL (PARMNUM_BASE_INFOLEVEL + USER_WORKSTATIONS_PARMNUM)
443#define USER_LAST_LOGON_INFOLEVEL (PARMNUM_BASE_INFOLEVEL + USER_LAST_LOGON_PARMNUM)
444#define USER_LAST_LOGOFF_INFOLEVEL (PARMNUM_BASE_INFOLEVEL + USER_LAST_LOGOFF_PARMNUM)
445#define USER_ACCT_EXPIRES_INFOLEVEL (PARMNUM_BASE_INFOLEVEL + USER_ACCT_EXPIRES_PARMNUM)
446#define USER_MAX_STORAGE_INFOLEVEL (PARMNUM_BASE_INFOLEVEL + USER_MAX_STORAGE_PARMNUM)
447#define USER_UNITS_PER_WEEK_INFOLEVEL (PARMNUM_BASE_INFOLEVEL + USER_UNITS_PER_WEEK_PARMNUM)
448#define USER_LOGON_HOURS_INFOLEVEL (PARMNUM_BASE_INFOLEVEL + USER_LOGON_HOURS_PARMNUM)
449#define USER_PAD_PW_COUNT_INFOLEVEL (PARMNUM_BASE_INFOLEVEL + USER_PAD_PW_COUNT_PARMNUM)
450#define USER_NUM_LOGONS_INFOLEVEL (PARMNUM_BASE_INFOLEVEL + USER_NUM_LOGONS_PARMNUM)
451#define USER_LOGON_SERVER_INFOLEVEL (PARMNUM_BASE_INFOLEVEL + USER_LOGON_SERVER_PARMNUM)
452#define USER_COUNTRY_CODE_INFOLEVEL (PARMNUM_BASE_INFOLEVEL + USER_COUNTRY_CODE_PARMNUM)
453#define USER_CODE_PAGE_INFOLEVEL (PARMNUM_BASE_INFOLEVEL + USER_CODE_PAGE_PARMNUM)
454#define USER_PRIMARY_GROUP_INFOLEVEL (PARMNUM_BASE_INFOLEVEL + USER_PRIMARY_GROUP_PARMNUM)
455#define USER_POSIX_ID_INFOLEVEL (PARMNUM_BASE_INFOLEVEL + USER_POSIX_ID_PARMNUM)
456#define USER_HOME_DIR_DRIVE_INFOLEVEL (PARMNUM_BASE_INFOLEVEL + USER_HOME_DIR_DRIVE_PARMNUM)
457
458#define NULL_USERSETINFO_PASSWD " "
459
460#define TIMEQ_FOREVER ((unsigned __LONG32) -1)
461#define USER_MAXSTORAGE_UNLIMITED ((unsigned __LONG32) -1)
462#define USER_NO_LOGOFF ((unsigned __LONG32) -1)
463#define UNITS_PER_DAY 24
464#define UNITS_PER_WEEK UNITS_PER_DAY *7
465
466#define USER_PRIV_MASK 0x3
467#define USER_PRIV_GUEST 0
468#define USER_PRIV_USER 1
469#define USER_PRIV_ADMIN 2
470
471#define MAX_PASSWD_LEN PWLEN
472#define DEF_MIN_PWLEN 6
473#define DEF_PWUNIQUENESS 5
474#define DEF_MAX_PWHIST 8
475
476#define DEF_MAX_PWAGE TIMEQ_FOREVER
477#define DEF_MIN_PWAGE (unsigned __LONG32) 0
478#define DEF_FORCE_LOGOFF (unsigned __LONG32) 0xffffffff
479#define DEF_MAX_BADPW 0
480#define ONE_DAY (unsigned __LONG32) 01*24*3600
481
482#define VALIDATED_LOGON 0
483#define PASSWORD_EXPIRED 2
484#define NON_VALIDATED_LOGON 3
485
486#define VALID_LOGOFF 1
487
488#define MODALS_MIN_PASSWD_LEN_PARMNUM 1
489#define MODALS_MAX_PASSWD_AGE_PARMNUM 2
490#define MODALS_MIN_PASSWD_AGE_PARMNUM 3
491#define MODALS_FORCE_LOGOFF_PARMNUM 4
492#define MODALS_PASSWD_HIST_LEN_PARMNUM 5
493#define MODALS_ROLE_PARMNUM 6
494#define MODALS_PRIMARY_PARMNUM 7
495#define MODALS_DOMAIN_NAME_PARMNUM 8
496#define MODALS_DOMAIN_ID_PARMNUM 9
497#define MODALS_LOCKOUT_DURATION_PARMNUM 10
498#define MODALS_LOCKOUT_OBSERVATION_WINDOW_PARMNUM 11
499#define MODALS_LOCKOUT_THRESHOLD_PARMNUM 12
500
501#define MODALS_MIN_PASSWD_LEN_INFOLEVEL (PARMNUM_BASE_INFOLEVEL + MODALS_MIN_PASSWD_LEN_PARMNUM)
502#define MODALS_MAX_PASSWD_AGE_INFOLEVEL (PARMNUM_BASE_INFOLEVEL + MODALS_MAX_PASSWD_AGE_PARMNUM)
503#define MODALS_MIN_PASSWD_AGE_INFOLEVEL (PARMNUM_BASE_INFOLEVEL + MODALS_MIN_PASSWD_AGE_PARMNUM)
504#define MODALS_FORCE_LOGOFF_INFOLEVEL (PARMNUM_BASE_INFOLEVEL + MODALS_FORCE_LOGOFF_PARMNUM)
505#define MODALS_PASSWD_HIST_LEN_INFOLEVEL (PARMNUM_BASE_INFOLEVEL + MODALS_PASSWD_HIST_LEN_PARMNUM)
506#define MODALS_ROLE_INFOLEVEL (PARMNUM_BASE_INFOLEVEL + MODALS_ROLE_PARMNUM)
507#define MODALS_PRIMARY_INFOLEVEL (PARMNUM_BASE_INFOLEVEL + MODALS_PRIMARY_PARMNUM)
508#define MODALS_DOMAIN_NAME_INFOLEVEL (PARMNUM_BASE_INFOLEVEL + MODALS_DOMAIN_NAME_PARMNUM)
509#define MODALS_DOMAIN_ID_INFOLEVEL (PARMNUM_BASE_INFOLEVEL + MODALS_DOMAIN_ID_PARMNUM)
510#endif
511
512#ifndef _LMGROUP_
513#define _LMGROUP_
514
515 NET_API_STATUS WINAPI NetGroupAdd(LPCWSTR servername,DWORD level,LPBYTE buf,LPDWORD parm_err);
516 NET_API_STATUS WINAPI NetGroupAddUser(LPCWSTR servername,LPCWSTR GroupName,LPCWSTR username);
517 NET_API_STATUS WINAPI NetGroupEnum(LPCWSTR servername,DWORD level,LPBYTE *bufptr,DWORD prefmaxlen,LPDWORD entriesread,LPDWORD totalentries,PDWORD_PTR resume_handle);
518 NET_API_STATUS WINAPI NetGroupGetInfo(LPCWSTR servername,LPCWSTR groupname,DWORD level,LPBYTE *bufptr);
519 NET_API_STATUS WINAPI NetGroupSetInfo(LPCWSTR servername,LPCWSTR groupname,DWORD level,LPBYTE buf,LPDWORD parm_err);
520 NET_API_STATUS WINAPI NetGroupDel(LPCWSTR servername,LPCWSTR groupname);
521 NET_API_STATUS WINAPI NetGroupDelUser(LPCWSTR servername,LPCWSTR GroupName,LPCWSTR Username);
522 NET_API_STATUS WINAPI NetGroupGetUsers(LPCWSTR servername,LPCWSTR groupname,DWORD level,LPBYTE *bufptr,DWORD prefmaxlen,LPDWORD entriesread,LPDWORD totalentries,PDWORD_PTR ResumeHandle);
523 NET_API_STATUS WINAPI NetGroupSetUsers(LPCWSTR servername,LPCWSTR groupname,DWORD level,LPBYTE buf,DWORD totalentries);
524
525 typedef struct _GROUP_INFO_0 {
526 LPWSTR grpi0_name;
527 } GROUP_INFO_0,*PGROUP_INFO_0,*LPGROUP_INFO_0;
528
529 typedef struct _GROUP_INFO_1 {
530 LPWSTR grpi1_name;
531 LPWSTR grpi1_comment;
532 } GROUP_INFO_1,*PGROUP_INFO_1,*LPGROUP_INFO_1;
533
534 typedef struct _GROUP_INFO_2 {
535 LPWSTR grpi2_name;
536 LPWSTR grpi2_comment;
537 DWORD grpi2_group_id;
538 DWORD grpi2_attributes;
539 } GROUP_INFO_2,*PGROUP_INFO_2;
540
541 typedef struct _GROUP_INFO_3 {
542 LPWSTR grpi3_name;
543 LPWSTR grpi3_comment;
544 PSID grpi3_group_sid;
545 DWORD grpi3_attributes;
546 } GROUP_INFO_3,*PGROUP_INFO_3;
547
548 typedef struct _GROUP_INFO_1002 {
549 LPWSTR grpi1002_comment;
550 } GROUP_INFO_1002,*PGROUP_INFO_1002,*LPGROUP_INFO_1002;
551
552 typedef struct _GROUP_INFO_1005 {
553 DWORD grpi1005_attributes;
554 } GROUP_INFO_1005,*PGROUP_INFO_1005,*LPGROUP_INFO_1005;
555
556 typedef struct _GROUP_USERS_INFO_0 {
557 LPWSTR grui0_name;
558 } GROUP_USERS_INFO_0,*PGROUP_USERS_INFO_0,*LPGROUP_USERS_INFO_0;
559
560 typedef struct _GROUP_USERS_INFO_1 {
561 LPWSTR grui1_name;
562 DWORD grui1_attributes;
563 } GROUP_USERS_INFO_1,*PGROUP_USERS_INFO_1,*LPGROUP_USERS_INFO_1;
564
565#define GROUPIDMASK 0x8000
566
567#define GROUP_SPECIALGRP_USERS L"USERS"
568#define GROUP_SPECIALGRP_ADMINS L"ADMINS"
569#define GROUP_SPECIALGRP_GUESTS L"GUESTS"
570#define GROUP_SPECIALGRP_LOCAL L"LOCAL"
571
572#define GROUP_ALL_PARMNUM 0
573#define GROUP_NAME_PARMNUM 1
574#define GROUP_COMMENT_PARMNUM 2
575#define GROUP_ATTRIBUTES_PARMNUM 3
576
577#define GROUP_ALL_INFOLEVEL (PARMNUM_BASE_INFOLEVEL + GROUP_ALL_PARMNUM)
578#define GROUP_NAME_INFOLEVEL (PARMNUM_BASE_INFOLEVEL + GROUP_NAME_PARMNUM)
579#define GROUP_COMMENT_INFOLEVEL (PARMNUM_BASE_INFOLEVEL + GROUP_COMMENT_PARMNUM)
580#define GROUP_ATTRIBUTES_INFOLEVEL (PARMNUM_BASE_INFOLEVEL + GROUP_ATTRIBUTES_PARMNUM)
581#define GROUP_POSIX_ID_INFOLEVEL (PARMNUM_BASE_INFOLEVEL + GROUP_POSIX_ID_PARMNUM)
582#endif
583
584#ifndef _LMLOCALGROUP_
585#define _LMLOCALGROUP_
586 NET_API_STATUS WINAPI NetLocalGroupAdd(LPCWSTR servername,DWORD level,LPBYTE buf,LPDWORD parm_err);
587 NET_API_STATUS WINAPI NetLocalGroupAddMember(LPCWSTR servername,LPCWSTR groupname,PSID membersid);
588 NET_API_STATUS WINAPI NetLocalGroupEnum(LPCWSTR servername,DWORD level,LPBYTE *bufptr,DWORD prefmaxlen,LPDWORD entriesread,LPDWORD totalentries,PDWORD_PTR resumehandle);
589 NET_API_STATUS WINAPI NetLocalGroupGetInfo(LPCWSTR servername,LPCWSTR groupname,DWORD level,LPBYTE *bufptr);
590 NET_API_STATUS WINAPI NetLocalGroupSetInfo(LPCWSTR servername,LPCWSTR groupname,DWORD level,LPBYTE buf,LPDWORD parm_err);
591 NET_API_STATUS WINAPI NetLocalGroupDel(LPCWSTR servername,LPCWSTR groupname);
592 NET_API_STATUS WINAPI NetLocalGroupDelMember(LPCWSTR servername,LPCWSTR groupname,PSID membersid);
593 NET_API_STATUS WINAPI NetLocalGroupGetMembers(LPCWSTR servername,LPCWSTR localgroupname,DWORD level,LPBYTE *bufptr,DWORD prefmaxlen,LPDWORD entriesread,LPDWORD totalentries,PDWORD_PTR resumehandle);
594 NET_API_STATUS WINAPI NetLocalGroupSetMembers(LPCWSTR servername,LPCWSTR groupname,DWORD level,LPBYTE buf,DWORD totalentries);
595 NET_API_STATUS WINAPI NetLocalGroupAddMembers(LPCWSTR servername,LPCWSTR groupname,DWORD level,LPBYTE buf,DWORD totalentries);
596 NET_API_STATUS WINAPI NetLocalGroupDelMembers(LPCWSTR servername,LPCWSTR groupname,DWORD level,LPBYTE buf,DWORD totalentries);
597
598 typedef struct _LOCALGROUP_INFO_0 {
599 LPWSTR lgrpi0_name;
600 } LOCALGROUP_INFO_0,*PLOCALGROUP_INFO_0,*LPLOCALGROUP_INFO_0;
601
602 typedef struct _LOCALGROUP_INFO_1 {
603 LPWSTR lgrpi1_name;
604 LPWSTR lgrpi1_comment;
605 } LOCALGROUP_INFO_1,*PLOCALGROUP_INFO_1,*LPLOCALGROUP_INFO_1;
606
607 typedef struct _LOCALGROUP_INFO_1002 {
608 LPWSTR lgrpi1002_comment;
609 } LOCALGROUP_INFO_1002,*PLOCALGROUP_INFO_1002,*LPLOCALGROUP_INFO_1002;
610
611 typedef struct _LOCALGROUP_MEMBERS_INFO_0 {
612 PSID lgrmi0_sid;
613 } LOCALGROUP_MEMBERS_INFO_0,*PLOCALGROUP_MEMBERS_INFO_0,*LPLOCALGROUP_MEMBERS_INFO_0;
614
615 typedef struct _LOCALGROUP_MEMBERS_INFO_1 {
616 PSID lgrmi1_sid;
617 SID_NAME_USE lgrmi1_sidusage;
618 LPWSTR lgrmi1_name;
619 } LOCALGROUP_MEMBERS_INFO_1,*PLOCALGROUP_MEMBERS_INFO_1,*LPLOCALGROUP_MEMBERS_INFO_1;
620
621 typedef struct _LOCALGROUP_MEMBERS_INFO_2 {
622 PSID lgrmi2_sid;
623 SID_NAME_USE lgrmi2_sidusage;
624 LPWSTR lgrmi2_domainandname;
625 } LOCALGROUP_MEMBERS_INFO_2,*PLOCALGROUP_MEMBERS_INFO_2,*LPLOCALGROUP_MEMBERS_INFO_2;
626
627 typedef struct _LOCALGROUP_MEMBERS_INFO_3 {
628 LPWSTR lgrmi3_domainandname;
629 } LOCALGROUP_MEMBERS_INFO_3,*PLOCALGROUP_MEMBERS_INFO_3,*LPLOCALGROUP_MEMBERS_INFO_3;
630
631 typedef struct _LOCALGROUP_USERS_INFO_0 {
632 LPWSTR lgrui0_name;
633 } LOCALGROUP_USERS_INFO_0,*PLOCALGROUP_USERS_INFO_0,*LPLOCALGROUP_USERS_INFO_0;
634
635#define LOCALGROUP_NAME_PARMNUM 1
636#define LOCALGROUP_COMMENT_PARMNUM 2
637
638 NET_API_STATUS WINAPI NetQueryDisplayInformation(LPCWSTR ServerName,DWORD Level,DWORD Index,DWORD EntriesRequested,DWORD PreferredMaximumLength,LPDWORD ReturnedEntryCount,PVOID *SortedBuffer);
639 NET_API_STATUS WINAPI NetGetDisplayInformationIndex(LPCWSTR ServerName,DWORD Level,LPCWSTR Prefix,LPDWORD Index);
640
641 typedef struct _NET_DISPLAY_USER {
642 LPWSTR usri1_name;
643 LPWSTR usri1_comment;
644 DWORD usri1_flags;
645 LPWSTR usri1_full_name;
646 DWORD usri1_user_id;
647 DWORD usri1_next_index;
648 } NET_DISPLAY_USER,*PNET_DISPLAY_USER;
649
650 typedef struct _NET_DISPLAY_MACHINE {
651 LPWSTR usri2_name;
652 LPWSTR usri2_comment;
653 DWORD usri2_flags;
654 DWORD usri2_user_id;
655 DWORD usri2_next_index;
656 } NET_DISPLAY_MACHINE,*PNET_DISPLAY_MACHINE;
657
658 typedef struct _NET_DISPLAY_GROUP {
659 LPWSTR grpi3_name;
660 LPWSTR grpi3_comment;
661 DWORD grpi3_group_id;
662 DWORD grpi3_attributes;
663 DWORD grpi3_next_index;
664 } NET_DISPLAY_GROUP,*PNET_DISPLAY_GROUP;
665#endif
666
667#ifndef _LMACCESS_
668#define _LMACCESS_
669
670#define NetAccessAdd RxNetAccessAdd
671#define NetAccessEnum RxNetAccessEnum
672#define NetAccessGetInfo RxNetAccessGetInfo
673#define NetAccessSetInfo RxNetAccessSetInfo
674#define NetAccessDel RxNetAccessDel
675#define NetAccessGetUserPerms RxNetAccessGetUserPerms
676
677 NET_API_STATUS WINAPI NetAccessAdd(LPCWSTR servername,DWORD level,LPBYTE buf,LPDWORD parm_err);
678 NET_API_STATUS WINAPI NetAccessEnum(LPCWSTR servername,LPCWSTR BasePath,DWORD Recursive,DWORD level,LPBYTE *bufptr,DWORD prefmaxlen,LPDWORD entriesread,LPDWORD totalentries,LPDWORD resume_handle);
679 NET_API_STATUS WINAPI NetAccessGetInfo(LPCWSTR servername,LPCWSTR resource,DWORD level,LPBYTE *bufptr);
680 NET_API_STATUS WINAPI NetAccessSetInfo(LPCWSTR servername,LPCWSTR resource,DWORD level,LPBYTE buf,LPDWORD parm_err);
681 NET_API_STATUS WINAPI NetAccessDel(LPCWSTR servername,LPCWSTR resource);
682 NET_API_STATUS WINAPI NetAccessGetUserPerms(LPCWSTR servername,LPCWSTR UGname,LPCWSTR resource,LPDWORD Perms);
683
684 typedef struct _ACCESS_INFO_0 {
685 LPWSTR acc0_resource_name;
686 } ACCESS_INFO_0,*PACCESS_INFO_0,*LPACCESS_INFO_0;
687
688 typedef struct _ACCESS_INFO_1 {
689 LPWSTR acc1_resource_name;
690 DWORD acc1_attr;
691 DWORD acc1_count;
692 } ACCESS_INFO_1,*PACCESS_INFO_1,*LPACCESS_INFO_1;
693
694 typedef struct _ACCESS_INFO_1002 {
695 DWORD acc1002_attr;
696 } ACCESS_INFO_1002,*PACCESS_INFO_1002,*LPACCESS_INFO_1002;
697
698 typedef struct _ACCESS_LIST {
699 LPWSTR acl_ugname;
700 DWORD acl_access;
701 } ACCESS_LIST,*PACCESS_LIST,*LPACCESS_LIST;
702
703#define MAXPERMENTRIES 64
704
705#define ACCESS_NONE 0
706#define ACCESS_ALL (ACCESS_READ | ACCESS_WRITE | ACCESS_CREATE | ACCESS_EXEC | ACCESS_DELETE | ACCESS_ATRIB | ACCESS_PERM)
707
708#define ACCESS_READ 0x01
709#define ACCESS_WRITE 0x02
710#define ACCESS_CREATE 0x04
711#define ACCESS_EXEC 0x08
712#define ACCESS_DELETE 0x10
713#define ACCESS_ATRIB 0x20
714#define ACCESS_PERM 0x40
715#define ACCESS_GROUP 0x8000
716#define ACCESS_AUDIT 0x1
717#define ACCESS_SUCCESS_OPEN 0x10
718#define ACCESS_SUCCESS_WRITE 0x20
719#define ACCESS_SUCCESS_DELETE 0x40
720#define ACCESS_SUCCESS_ACL 0x80
721#define ACCESS_SUCCESS_MASK 0xF0
722
723#define ACCESS_FAIL_OPEN 0x100
724#define ACCESS_FAIL_WRITE 0x200
725#define ACCESS_FAIL_DELETE 0x400
726#define ACCESS_FAIL_ACL 0x800
727#define ACCESS_FAIL_MASK 0xF00
728
729#define ACCESS_FAIL_SHIFT 4
730
731#define ACCESS_RESOURCE_NAME_PARMNUM 1
732#define ACCESS_ATTR_PARMNUM 2
733#define ACCESS_COUNT_PARMNUM 3
734#define ACCESS_ACCESS_LIST_PARMNUM 4
735
736#define ACCESS_RESOURCE_NAME_INFOLEVEL (PARMNUM_BASE_INFOLEVEL + ACCESS_RESOURCE_NAME_PARMNUM)
737#define ACCESS_ATTR_INFOLEVEL (PARMNUM_BASE_INFOLEVEL + ACCESS_ATTR_PARMNUM)
738#define ACCESS_COUNT_INFOLEVEL (PARMNUM_BASE_INFOLEVEL + ACCESS_COUNT_PARMNUM)
739#define ACCESS_ACCESS_LIST_INFOLEVEL (PARMNUM_BASE_INFOLEVEL + ACCESS_ACCESS_LIST_PARMNUM)
740
741#define ACCESS_LETTERS "RWCXDAP "
742
743 typedef enum _NET_VALIDATE_PASSWORD_TYPE {
744 NetValidateAuthentication = 1,NetValidatePasswordChange,NetValidatePasswordReset
745 } NET_VALIDATE_PASSWORD_TYPE,*PNET_VALIDATE_PASSWORD_TYPE;
746
747 typedef struct _NET_VALIDATE_PASSWORD_HASH{
748 ULONG Length;
749 LPBYTE Hash;
750 } NET_VALIDATE_PASSWORD_HASH,*PNET_VALIDATE_PASSWORD_HASH;
751
752#define NET_VALIDATE_PASSWORD_LAST_SET 0x00000001
753#define NET_VALIDATE_BAD_PASSWORD_TIME 0x00000002
754#define NET_VALIDATE_LOCKOUT_TIME 0x00000004
755#define NET_VALIDATE_BAD_PASSWORD_COUNT 0x00000008
756#define NET_VALIDATE_PASSWORD_HISTORY_LENGTH 0x00000010
757#define NET_VALIDATE_PASSWORD_HISTORY 0x00000020
758
759#if !defined(_WINBASE_) && !defined(_FILETIME_)
760#define _FILETIME_
761 typedef struct _FILETIME {
762 DWORD dwLowDateTime;
763 DWORD dwHighDateTime;
764 } FILETIME,*LPFILETIME,*PFILETIME;
765#endif
766
767 typedef struct _NET_VALIDATE_PERSISTED_FIELDS {
768 ULONG PresentFields;
769 FILETIME PasswordLastSet;
770 FILETIME BadPasswordTime;
771 FILETIME LockoutTime;
772 ULONG BadPasswordCount;
773 ULONG PasswordHistoryLength;
774 PNET_VALIDATE_PASSWORD_HASH PasswordHistory;
775 } NET_VALIDATE_PERSISTED_FIELDS,*PNET_VALIDATE_PERSISTED_FIELDS;
776
777 typedef struct _NET_VALIDATE_OUTPUT_ARG {
778 NET_VALIDATE_PERSISTED_FIELDS ChangedPersistedFields;
779 NET_API_STATUS ValidationStatus;
780 } NET_VALIDATE_OUTPUT_ARG,*PNET_VALIDATE_OUTPUT_ARG;
781
782 typedef struct _NET_VALIDATE_AUTHENTICATION_INPUT_ARG {
783 NET_VALIDATE_PERSISTED_FIELDS InputPersistedFields;
784 BOOLEAN PasswordMatched;
785 } NET_VALIDATE_AUTHENTICATION_INPUT_ARG,*PNET_VALIDATE_AUTHENTICATION_INPUT_ARG;
786
787 typedef struct _NET_VALIDATE_PASSWORD_CHANGE_INPUT_ARG {
788 NET_VALIDATE_PERSISTED_FIELDS InputPersistedFields;
789 LPWSTR ClearPassword;
790 LPWSTR UserAccountName;
791 NET_VALIDATE_PASSWORD_HASH HashedPassword;
792 BOOLEAN PasswordMatch;
793 } NET_VALIDATE_PASSWORD_CHANGE_INPUT_ARG,*PNET_VALIDATE_PASSWORD_CHANGE_INPUT_ARG;
794
795 typedef struct _NET_VALIDATE_PASSWORD_RESET_INPUT_ARG {
796 NET_VALIDATE_PERSISTED_FIELDS InputPersistedFields;
797 LPWSTR ClearPassword;
798 LPWSTR UserAccountName;
799 NET_VALIDATE_PASSWORD_HASH HashedPassword;
800 BOOLEAN PasswordMustChangeAtNextLogon;
801 BOOLEAN ClearLockout;
802 } NET_VALIDATE_PASSWORD_RESET_INPUT_ARG,*PNET_VALIDATE_PASSWORD_RESET_INPUT_ARG;
803
804 NET_API_STATUS WINAPI NetValidatePasswordPolicy(LPCWSTR ServerName,LPVOID Qualifier,NET_VALIDATE_PASSWORD_TYPE ValidationType,LPVOID InputArg,LPVOID *OutputArg);
805 NET_API_STATUS WINAPI NetValidatePasswordPolicyFree(LPVOID *OutputArg);
806#endif
807
808#ifndef _LMDOMAIN_
809#define _LMDOMAIN_
810 NET_API_STATUS WINAPI NetGetDCName(LPCWSTR servername,LPCWSTR domainname,LPBYTE *bufptr);
811 NET_API_STATUS WINAPI NetGetAnyDCName(LPCWSTR servername,LPCWSTR domainname,LPBYTE *bufptr);
812 NET_API_STATUS WINAPI I_NetLogonControl(LPCWSTR ServerName,DWORD FunctionCode,DWORD QueryLevel,LPBYTE *Buffer);
813 NET_API_STATUS WINAPI I_NetLogonControl2(LPCWSTR ServerName,DWORD FunctionCode,DWORD QueryLevel,LPBYTE Data,LPBYTE *Buffer);
814
815#if !defined (_NTDEF_) && !defined (_NTSTATUS_PSDK)
816#define _NTSTATUS_PSDK
817 typedef LONG NTSTATUS,*PNTSTATUS;
818#endif
819
820 NTSTATUS WINAPI NetEnumerateTrustedDomains (LPWSTR ServerName,LPWSTR *DomainNames);
821
822#define NETLOGON_CONTROL_QUERY 1
823#define NETLOGON_CONTROL_REPLICATE 2
824#define NETLOGON_CONTROL_SYNCHRONIZE 3
825#define NETLOGON_CONTROL_PDC_REPLICATE 4
826#define NETLOGON_CONTROL_REDISCOVER 5
827#define NETLOGON_CONTROL_TC_QUERY 6
828#define NETLOGON_CONTROL_TRANSPORT_NOTIFY 7
829#define NETLOGON_CONTROL_FIND_USER 8
830#define NETLOGON_CONTROL_CHANGE_PASSWORD 9
831#define NETLOGON_CONTROL_TC_VERIFY 10
832#define NETLOGON_CONTROL_FORCE_DNS_REG 11
833#define NETLOGON_CONTROL_QUERY_DNS_REG 12
834
835#define NETLOGON_CONTROL_UNLOAD_NETLOGON_DLL 0xFFFB
836#define NETLOGON_CONTROL_BACKUP_CHANGE_LOG 0xFFFC
837#define NETLOGON_CONTROL_TRUNCATE_LOG 0xFFFD
838#define NETLOGON_CONTROL_SET_DBFLAG 0xFFFE
839#define NETLOGON_CONTROL_BREAKPOINT 0xFFFF
840
841 typedef struct _NETLOGON_INFO_1 {
842 DWORD netlog1_flags;
843 NET_API_STATUS netlog1_pdc_connection_status;
844 } NETLOGON_INFO_1,*PNETLOGON_INFO_1;
845
846 typedef struct _NETLOGON_INFO_2 {
847 DWORD netlog2_flags;
848
849 NET_API_STATUS netlog2_pdc_connection_status;
850 LPWSTR netlog2_trusted_dc_name;
851 NET_API_STATUS netlog2_tc_connection_status;
852 } NETLOGON_INFO_2,*PNETLOGON_INFO_2;
853
854 typedef struct _NETLOGON_INFO_3 {
855 DWORD netlog3_flags;
856 DWORD netlog3_logon_attempts;
857 DWORD netlog3_reserved1;
858 DWORD netlog3_reserved2;
859 DWORD netlog3_reserved3;
860 DWORD netlog3_reserved4;
861 DWORD netlog3_reserved5;
862 } NETLOGON_INFO_3,*PNETLOGON_INFO_3;
863
864 typedef struct _NETLOGON_INFO_4 {
865 LPWSTR netlog4_trusted_dc_name;
866 LPWSTR netlog4_trusted_domain_name;
867 } NETLOGON_INFO_4,*PNETLOGON_INFO_4;
868
869#define NETLOGON_REPLICATION_NEEDED 0x01
870#define NETLOGON_REPLICATION_IN_PROGRESS 0x02
871#define NETLOGON_FULL_SYNC_REPLICATION 0x04
872#define NETLOGON_REDO_NEEDED 0x08
873#define NETLOGON_HAS_IP 0x10
874#define NETLOGON_HAS_TIMESERV 0x20
875#define NETLOGON_DNS_UPDATE_FAILURE 0x40
876#define NETLOGON_VERIFY_STATUS_RETURNED 0x80
877
878#if (_WIN32_WINNT >= 0x0601)
879
880typedef enum _MSA_INFO_STATE {
881 MsaInfoNotExist = 1,
882 MsaInfoNotService,
883 MsaInfoCannotInstall,
884 MsaInfoCanInstall,
885 MsaInfoInstalled
886} MSA_INFO_STATE;
887
888typedef struct _MSA_INFO_0 {
889 MSA_INFO_STATE State;
890} MSA_INFO_0, *PMSA_INFO_0;
891
892#define SERVICE_ACCOUNT_FLAG_LINK_TO_HOST_ONLY 0x00000001
893
894 NTSTATUS WINAPI NetAddServiceAccount (LPWSTR ServerName,LPWSTR AccountName,LPWSTR Reserved,DWORD Flags);
895 NTSTATUS WINAPI NetRemoveServiceAccount (LPWSTR ServerName,LPWSTR AccountName,DWORD Flags);
896 NTSTATUS WINAPI NetIsServiceAccount (LPWSTR ServerName,LPWSTR AccountName,BOOL *IsService);
897 NTSTATUS WINAPI NetEnumerateServiceAccounts (LPWSTR ServerName,DWORD Flags,DWORD *AccountsCount, PZPWSTR *Accounts);
898
899#endif /*(_WIN32_WINNT >= 0x0601)*/
900
901#ifdef __cplusplus
902}
903#endif
904#endif
Note: See TracBrowser for help on using the repository browser.