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 [public] typedef struct {
306 string usriX_password;
307 uint32 usriX_password_age;
309 string usriX_home_dir;
310 string usriX_comment;
312 string usriX_script_path;
313 uint32 usriX_auth_flags;
314 string usriX_full_name;
315 string usriX_usr_comment;
317 string usriX_workstations;
318 uint32 usriX_last_logon;
319 uint32 usriX_last_logoff;
320 uint32 usriX_acct_expires;
321 uint32 usriX_max_storage;
322 uint32 usriX_units_per_week;
323 uint8 *usriX_logon_hours;
324 uint32 usriX_bad_pw_count;
325 uint32 usriX_num_logons;
326 string usriX_logon_server;
327 uint32 usriX_country_code;
328 uint32 usriX_code_page;
331 [nopush,nopull] NET_API_STATUS NetUserAdd(
332 [in,unique] string *server_name,
334 [in,ref] uint8 *buffer,
335 [out,ref] uint32 *parm_error
338 /*******************************************/
340 /*******************************************/
342 [nopush,nopull] NET_API_STATUS NetUserDel(
343 [in,unique] string *server_name,
344 [in,ref] string *user_name
347 /*******************************************/
349 /*******************************************/
351 const int FILTER_TEMP_DUPLICATE_ACCOUNT = 0x0001;
352 const int FILTER_NORMAL_ACCOUNT = 0x0002;
353 const int FILTER_INTERDOMAIN_TRUST_ACCOUNT = 0x0008;
354 const int FILTER_WORKSTATION_TRUST_ACCOUNT = 0x0010;
355 const int FILTER_SERVER_TRUST_ACCOUNT = 0x0020;
357 [nopush,nopull] NET_API_STATUS NetUserEnum(
358 [in,unique] string *server_name,
361 [out,ref] uint8 **buffer,
362 [in] uint32 prefmaxlen,
363 [out,ref] uint32 *entries_read,
364 [out,ref] uint32 *total_entries,
365 [in,out,ref] uint32 *resume_handle
368 /*******************************************/
369 /* NetUserChangePassword */
370 /*******************************************/
372 [nopush,nopull] NET_API_STATUS NetUserChangePassword(
373 [in] string domain_name,
374 [in] string user_name,
375 [in] string old_password,
376 [in] string new_password
379 /*******************************************/
381 /*******************************************/
383 [nopush,nopull] NET_API_STATUS NetUserGetInfo(
384 [in] string server_name,
385 [in] string user_name,
390 /*******************************************/
392 /*******************************************/
394 [nopush,nopull] NET_API_STATUS NetUserSetInfo(
395 [in] string server_name,
396 [in] string user_name,
399 [out] uint32 *parm_err
402 /*******************************************/
403 /* NetQueryDisplayInformation */
404 /*******************************************/
406 [public] typedef struct {
408 string usri1_comment;
410 string usri1_full_name;
411 uint32 usri1_user_id;
412 uint32 usri1_next_index;
415 [public] typedef struct {
417 string usri2_comment;
419 uint32 usri2_user_id;
420 uint32 usri2_next_index;
421 } NET_DISPLAY_MACHINE;
423 [public] typedef struct {
425 string grpi3_comment;
426 uint32 grpi3_group_id;
427 uint32 grpi3_attributes;
428 uint32 grpi3_next_index;
431 [nopush,nopull] NET_API_STATUS NetQueryDisplayInformation(
432 [in,unique] string *server_name,
435 [in] uint32 entries_requested,
436 [in] uint32 prefmaxlen,
437 [out,ref] uint32 *entries_read,
438 [out,ref,noprint] void **buffer
441 /*******************************************/
443 /*******************************************/
451 string grpi1_comment;
456 string grpi2_comment;
457 uint32 grpi2_group_id;
458 uint32 grpi2_attributes;
463 string grpi3_comment;
464 domsid *grpi3_group_sid;
465 uint32 grpi3_attributes;
469 string grpi1002_comment;
473 uint32 grpi1005_attributes;
476 [nopush,nopull] NET_API_STATUS NetGroupAdd(
477 [in] string server_name,
480 [out] uint32 *parm_err
483 /*******************************************/
485 /*******************************************/
487 [nopush,nopull] NET_API_STATUS NetGroupDel(
488 [in] string server_name,
489 [in] string group_name
492 /*******************************************/
494 /*******************************************/
496 [nopush,nopull] NET_API_STATUS NetGroupEnum(
497 [in] string server_name,
499 [out,ref] uint8 **buffer,
500 [in] uint32 prefmaxlen,
501 [out,ref] uint32 *entries_read,
502 [out,ref] uint32 *total_entries,
503 [in,out,ref] uint32 *resume_handle
506 /*******************************************/
507 /* NetGroupSetInfo */
508 /*******************************************/
510 [nopush,nopull] NET_API_STATUS NetGroupSetInfo(
511 [in] string server_name,
512 [in] string group_name,
515 [out] uint32 *parm_err
518 /*******************************************/
519 /* NetGroupGetInfo */
520 /*******************************************/
522 [nopush,nopull] NET_API_STATUS NetGroupGetInfo(
523 [in] string server_name,
524 [in] string group_name,
529 /*******************************************/
530 /* NetGroupAddUser */
531 /*******************************************/
533 [nopush,nopull] NET_API_STATUS NetGroupAddUser(
534 [in] string server_name,
535 [in] string group_name,
536 [in] string user_name
539 /*******************************************/
540 /* NetGroupDelUser */
541 /*******************************************/
543 [nopush,nopull] NET_API_STATUS NetGroupDelUser(
544 [in] string server_name,
545 [in] string group_name,
546 [in] string user_name
549 /*******************************************/
550 /* NetLocalGroupAdd */
551 /*******************************************/
559 string lgrpi1_comment;
563 string lgrpi1002_comment;
564 } LOCALGROUP_INFO_1002;
566 [nopush,nopull] NET_API_STATUS NetLocalGroupAdd(
567 [in] string server_name,
570 [out,ref] uint32 *parm_err
573 /*******************************************/
574 /* NetLocalGroupDel */
575 /*******************************************/
577 [nopush,nopull] NET_API_STATUS NetLocalGroupDel(
578 [in] string server_name,
579 [in] string group_name
582 /*******************************************/
583 /* NetLocalGroupGetInfo */
584 /*******************************************/
586 [nopush,nopull] NET_API_STATUS NetLocalGroupGetInfo(
587 [in] string server_name,
588 [in] string group_name,
590 [out,ref] uint8 **buffer
593 /*******************************************/
594 /* NetLocalGroupSetInfo */
595 /*******************************************/
597 [nopush,nopull] NET_API_STATUS NetLocalGroupSetInfo(
598 [in] string server_name,
599 [in] string group_name,
601 [in,ref] uint8 *buffer,
602 [out,ref] uint32 *parm_err
605 /*******************************************/
606 /* NetLocalGroupEnum */
607 /*******************************************/
609 [nopush,nopull] NET_API_STATUS NetLocalGroupEnum(
610 [in] string server_name,
612 [out,ref] uint8 **buffer,
613 [in] uint32 prefmaxlen,
614 [out,ref] uint32 *entries_read,
615 [out,ref] uint32 *total_entries,
616 [in,out,ref] uint32 *resume_handle
619 /*******************************************/
621 /*******************************************/
631 uint32 tod_tinterval;
638 [nopush,nopull] NET_API_STATUS NetRemoteTOD(
639 [in] string server_name,
640 [out,ref] uint8 **buffer