2 libnetapi interface definition
5 cpp_quote("#define LIBNETAPI_LOCAL_SERVER(x) (!x || is_myname_or_ipaddr(x))")
6 cpp_quote("#ifndef MAXSUBAUTHS")
7 cpp_quote("#define MAXSUBAUTHS 15 /* max sub authorities in a SID */")
11 pointer_default(unique)
15 const int ERROR_MORE_DATA = 234L;
17 [public] typedef [v1_enum] enum {
21 [public] typedef struct {
25 uint32 sub_auths[MAXSUBAUTHS];
28 /*******************************************/
30 /*******************************************/
32 [nopush,nopull] NET_API_STATUS NetJoinDomain(
33 [in,unique] string *server,
34 [in,ref] string *domain,
35 [in,unique] string *account_ou,
36 [in,unique] string *account,
37 [in,unique] string *password,
38 [in] uint32 join_flags
41 /*******************************************/
43 /*******************************************/
45 [nopush,nopull] NET_API_STATUS NetUnjoinDomain(
46 [in,unique] string *server_name,
47 [in,unique] string *account,
48 [in,unique] string *password,
49 [in] uint32 unjoin_flags
52 /*******************************************/
53 /* NetGetJoinInformation */
54 /*******************************************/
56 [nopush,nopull] NET_API_STATUS NetGetJoinInformation(
57 [in,unique] string *server_name,
58 [out] string **name_buffer,
59 [out] uint16 *name_type
62 /*******************************************/
63 /* NetGetJoinableOUs */
64 /*******************************************/
66 [nopush,nopull] NET_API_STATUS NetGetJoinableOUs(
67 [in,unique] string *server_name,
68 [in,ref] string *domain,
69 [in,unique] string *account,
70 [in,unique] string *password,
71 [out] uint32 *ou_count,
75 /*******************************************/
76 /* NetServerGetInfo */
77 /*******************************************/
79 [public] typedef struct {
80 string sv1005_comment;
83 [nopush,nopull] NET_API_STATUS NetServerGetInfo(
84 [in,unique] string *server_name,
89 /*******************************************/
90 /* NetServerSetInfo */
91 /*******************************************/
93 [nopush,nopull] NET_API_STATUS NetServerSetInfo(
94 [in,unique] string *server_name,
97 [out] uint32 *parm_error
100 /*******************************************/
102 /*******************************************/
104 [nopush,nopull] NET_API_STATUS NetGetDCName(
105 [in,unique] string *server_name,
106 [in,unique] string *domain_name,
110 /*******************************************/
111 /* NetGetAnyDCName */
112 /*******************************************/
114 [nopush,nopull] NET_API_STATUS NetGetAnyDCName(
115 [in,unique] string *server_name,
116 [in,unique] string *domain_name,
120 /*******************************************/
122 /*******************************************/
124 [public] typedef struct {
125 string domain_controller_name;
126 string domain_controller_address;
127 uint32 domain_controller_address_type;
130 string dns_forest_name;
133 string client_site_name;
134 } DOMAIN_CONTROLLER_INFO;
136 [nopush,nopull] NET_API_STATUS DsGetDcName(
137 [in,unique] string *server_name,
138 [in,ref] string *domain_name,
139 [in,unique] GUID *domain_guid,
140 [in,unique] string *site_name,
142 [out,ref] DOMAIN_CONTROLLER_INFO **dc_info
145 /*******************************************/
147 /*******************************************/
149 [public] typedef struct {
153 [public] typedef struct {
155 string usri1_password;
156 uint32 usri1_password_age;
158 string usri1_home_dir;
159 string usri1_comment;
161 string usri1_script_path;
164 [public] typedef struct {
166 string usri2_password;
167 uint32 usri2_password_age;
169 string usri2_home_dir;
170 string usri2_comment;
172 string usri2_script_path;
173 uint32 usri2_auth_flags;
174 string usri2_full_name;
175 string usri2_usr_comment;
177 string usri2_workstations;
178 uint32 usri2_last_logon;
179 uint32 usri2_last_logoff;
180 uint32 usri2_acct_expires;
181 uint32 usri2_max_storage;
182 uint32 usri2_units_per_week;
183 uint8 *usri2_logon_hours;
184 uint32 usri2_bad_pw_count;
185 uint32 usri2_num_logons;
186 string usri2_logon_server;
187 uint32 usri2_country_code;
188 uint32 usri2_code_page;
191 [public] typedef struct {
193 uint32 usri3_password_age;
195 string usri3_home_dir;
196 string usri3_comment;
198 string usri3_script_path;
199 uint32 usri3_auth_flags;
200 string usri3_full_name;
201 string usri3_usr_comment;
203 string usri3_workstations;
204 uint32 usri3_last_logon;
205 uint32 usri3_last_logoff;
206 uint32 usri3_acct_expires;
207 uint32 usri3_max_storage;
208 uint32 usri3_units_per_week;
209 uint8 *usri3_logon_hours;
210 uint32 usri3_bad_pw_count;
211 uint32 usri3_num_logons;
212 string usri3_logon_server;
213 uint32 usri3_country_code;
214 uint32 usri3_code_page;
215 uint32 usri3_user_id;
216 uint32 usri3_primary_group_id;
217 string usri3_profile;
218 string usri3_home_dir_drive;
219 uint32 usri3_password_expired;
222 [public] typedef struct {
224 string usri4_password;
225 uint32 usri4_password_age;
227 string usri4_home_dir;
228 string usri4_comment;
230 string usri4_script_path;
231 uint32 usri4_auth_flags;
232 string usri4_full_name;
233 string usri4_usr_comment;
235 string usri4_workstations;
236 uint32 usri4_last_logon;
237 uint32 usri4_last_logoff;
238 uint32 usri4_acct_expires;
239 uint32 usri4_max_storage;
240 uint32 usri4_units_per_week;
241 uint8 *usri4_logon_hours;
242 uint32 usri4_bad_pw_count;
243 uint32 usri4_num_logons;
244 string usri4_logon_server;
245 uint32 usri4_country_code;
246 uint32 usri4_code_page;
247 dom_sid *usri4_user_sid;
248 uint32 usri4_primary_group_id;
249 string usri4_profile;
250 string usri4_home_dir_drive;
251 uint32 usri4_password_expired;
254 [public] typedef struct {
256 string usri10_comment;
257 string usri10_usr_comment;
258 string usri10_full_name;
261 [public] typedef struct {
263 string usri11_comment;
264 string usri11_usr_comment;
265 string usri11_full_name;
267 uint32 usri11_auth_flags;
268 uint32 usri11_password_age;
269 string usri11_home_dir;
271 uint32 usri11_last_logon;
272 uint32 usri11_last_logoff;
273 uint32 usri11_bad_pw_count;
274 uint32 usri11_num_logons;
275 string usri11_logon_server;
276 uint32 usri11_country_code;
277 string usri11_workstations;
278 uint32 usri11_max_storage;
279 uint32 usri11_units_per_week;
280 uint8 *usri11_logon_hours;
281 uint32 usri11_code_page;
284 [public] typedef struct {
286 string usri20_full_name;
287 string usri20_comment;
289 uint32 usri20_user_id;
292 [public] typedef struct {
294 string usri23_full_name;
295 string usri23_comment;
297 domsid *usri23_user_sid;
300 [public] typedef struct {
301 string usri1007_comment;
304 [nopush,nopull] NET_API_STATUS NetUserAdd(
305 [in,unique] string *server_name,
307 [in,ref] uint8 *buffer,
308 [out,ref] uint32 *parm_error
311 /*******************************************/
313 /*******************************************/
315 [nopush,nopull] NET_API_STATUS NetUserDel(
316 [in,unique] string *server_name,
317 [in,ref] string *user_name
320 /*******************************************/
322 /*******************************************/
324 const int FILTER_TEMP_DUPLICATE_ACCOUNT = 0x0001;
325 const int FILTER_NORMAL_ACCOUNT = 0x0002;
326 const int FILTER_INTERDOMAIN_TRUST_ACCOUNT = 0x0008;
327 const int FILTER_WORKSTATION_TRUST_ACCOUNT = 0x0010;
328 const int FILTER_SERVER_TRUST_ACCOUNT = 0x0020;
330 [nopush,nopull] NET_API_STATUS NetUserEnum(
331 [in,unique] string *server_name,
334 [out,ref] uint8 **buffer,
335 [in] uint32 prefmaxlen,
336 [out,ref] uint32 *entries_read,
337 [out,ref] uint32 *total_entries,
338 [in,out,ref] uint32 *resume_handle
341 /*******************************************/
342 /* NetUserChangePassword */
343 /*******************************************/
345 [nopush,nopull] NET_API_STATUS NetUserChangePassword(
346 [in] string domain_name,
347 [in] string user_name,
348 [in] string old_password,
349 [in] string new_password
352 /*******************************************/
354 /*******************************************/
356 [nopush,nopull] NET_API_STATUS NetUserGetInfo(
357 [in] string server_name,
358 [in] string user_name,
363 /*******************************************/
364 /* NetQueryDisplayInformation */
365 /*******************************************/
367 [public] typedef struct {
369 string usri1_comment;
371 string usri1_full_name;
372 uint32 usri1_user_id;
373 uint32 usri1_next_index;
376 [public] typedef struct {
378 string usri2_comment;
380 uint32 usri2_user_id;
381 uint32 usri2_next_index;
382 } NET_DISPLAY_MACHINE;
384 [public] typedef struct {
386 string grpi3_comment;
387 uint32 grpi3_group_id;
388 uint32 grpi3_attributes;
389 uint32 grpi3_next_index;
392 [nopush,nopull] NET_API_STATUS NetQueryDisplayInformation(
393 [in,unique] string *server_name,
396 [in] uint32 entries_requested,
397 [in] uint32 prefmaxlen,
398 [out,ref] uint32 *entries_read,
399 [out,ref,noprint] void **buffer
402 /*******************************************/
404 /*******************************************/
412 string grpi1_comment;
417 string grpi2_comment;
418 uint32 grpi2_group_id;
419 uint32 grpi2_attributes;
424 string grpi3_comment;
425 domsid *grpi3_group_sid;
426 uint32 grpi3_attributes;
430 string grpi1002_comment;
434 uint32 grpi1005_attributes;
437 [nopush,nopull] NET_API_STATUS NetGroupAdd(
438 [in] string server_name,
441 [out] uint32 *parm_err
444 /*******************************************/
446 /*******************************************/
448 [nopush,nopull] NET_API_STATUS NetGroupDel(
449 [in] string server_name,
450 [in] string group_name
453 /*******************************************/
455 /*******************************************/
457 [nopush,nopull] NET_API_STATUS NetGroupEnum(
458 [in] string server_name,
460 [out,ref] uint8 **buffer,
461 [in] uint32 prefmaxlen,
462 [out,ref] uint32 *entries_read,
463 [out,ref] uint32 *total_entries,
464 [in,out,ref] uint32 *resume_handle
467 /*******************************************/
468 /* NetGroupSetInfo */
469 /*******************************************/
471 [nopush,nopull] NET_API_STATUS NetGroupSetInfo(
472 [in] string server_name,
473 [in] string group_name,
476 [out] uint32 *parm_err
479 /*******************************************/
480 /* NetGroupGetInfo */
481 /*******************************************/
483 [nopush,nopull] NET_API_STATUS NetGroupGetInfo(
484 [in] string server_name,
485 [in] string group_name,
490 /*******************************************/
491 /* NetGroupAddUser */
492 /*******************************************/
494 [nopush,nopull] NET_API_STATUS NetGroupAddUser(
495 [in] string server_name,
496 [in] string group_name,
497 [in] string user_name
500 /*******************************************/
501 /* NetGroupDelUser */
502 /*******************************************/
504 [nopush,nopull] NET_API_STATUS NetGroupDelUser(
505 [in] string server_name,
506 [in] string group_name,
507 [in] string user_name
510 /*******************************************/
511 /* NetLocalGroupAdd */
512 /*******************************************/
520 string lgrpi1_comment;
524 string lgrpi1002_comment;
525 } LOCALGROUP_INFO_1002;
527 [nopush,nopull] NET_API_STATUS NetLocalGroupAdd(
528 [in] string server_name,
531 [out,ref] uint32 *parm_err
534 /*******************************************/
535 /* NetLocalGroupDel */
536 /*******************************************/
538 [nopush,nopull] NET_API_STATUS NetLocalGroupDel(
539 [in] string server_name,
540 [in] string group_name
543 /*******************************************/
544 /* NetLocalGroupGetInfo */
545 /*******************************************/
547 [nopush,nopull] NET_API_STATUS NetLocalGroupGetInfo(
548 [in] string server_name,
549 [in] string group_name,
551 [out,ref] uint8 **buf
554 /*******************************************/
555 /* NetLocalGroupSetInfo */
556 /*******************************************/
558 [nopush,nopull] NET_API_STATUS NetLocalGroupSetInfo(
559 [in] string server_name,
560 [in] string group_name,
563 [out,ref] uint32 *parm_err
566 /*******************************************/
568 /*******************************************/
578 uint32 tod_tinterval;
585 [nopush,nopull] NET_API_STATUS NetRemoteTOD(
586 [in] string server_name,
587 [out,ref] uint8 **buf