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 /*******************************************/
365 /*******************************************/
367 [nopush,nopull] NET_API_STATUS NetUserSetInfo(
368 [in] string server_name,
369 [in] string user_name,
372 [out] uint32 *parm_err
375 /*******************************************/
376 /* NetQueryDisplayInformation */
377 /*******************************************/
379 [public] typedef struct {
381 string usri1_comment;
383 string usri1_full_name;
384 uint32 usri1_user_id;
385 uint32 usri1_next_index;
388 [public] typedef struct {
390 string usri2_comment;
392 uint32 usri2_user_id;
393 uint32 usri2_next_index;
394 } NET_DISPLAY_MACHINE;
396 [public] typedef struct {
398 string grpi3_comment;
399 uint32 grpi3_group_id;
400 uint32 grpi3_attributes;
401 uint32 grpi3_next_index;
404 [nopush,nopull] NET_API_STATUS NetQueryDisplayInformation(
405 [in,unique] string *server_name,
408 [in] uint32 entries_requested,
409 [in] uint32 prefmaxlen,
410 [out,ref] uint32 *entries_read,
411 [out,ref,noprint] void **buffer
414 /*******************************************/
416 /*******************************************/
424 string grpi1_comment;
429 string grpi2_comment;
430 uint32 grpi2_group_id;
431 uint32 grpi2_attributes;
436 string grpi3_comment;
437 domsid *grpi3_group_sid;
438 uint32 grpi3_attributes;
442 string grpi1002_comment;
446 uint32 grpi1005_attributes;
449 [nopush,nopull] NET_API_STATUS NetGroupAdd(
450 [in] string server_name,
453 [out] uint32 *parm_err
456 /*******************************************/
458 /*******************************************/
460 [nopush,nopull] NET_API_STATUS NetGroupDel(
461 [in] string server_name,
462 [in] string group_name
465 /*******************************************/
467 /*******************************************/
469 [nopush,nopull] NET_API_STATUS NetGroupEnum(
470 [in] string server_name,
472 [out,ref] uint8 **buffer,
473 [in] uint32 prefmaxlen,
474 [out,ref] uint32 *entries_read,
475 [out,ref] uint32 *total_entries,
476 [in,out,ref] uint32 *resume_handle
479 /*******************************************/
480 /* NetGroupSetInfo */
481 /*******************************************/
483 [nopush,nopull] NET_API_STATUS NetGroupSetInfo(
484 [in] string server_name,
485 [in] string group_name,
488 [out] uint32 *parm_err
491 /*******************************************/
492 /* NetGroupGetInfo */
493 /*******************************************/
495 [nopush,nopull] NET_API_STATUS NetGroupGetInfo(
496 [in] string server_name,
497 [in] string group_name,
502 /*******************************************/
503 /* NetGroupAddUser */
504 /*******************************************/
506 [nopush,nopull] NET_API_STATUS NetGroupAddUser(
507 [in] string server_name,
508 [in] string group_name,
509 [in] string user_name
512 /*******************************************/
513 /* NetGroupDelUser */
514 /*******************************************/
516 [nopush,nopull] NET_API_STATUS NetGroupDelUser(
517 [in] string server_name,
518 [in] string group_name,
519 [in] string user_name
522 /*******************************************/
523 /* NetLocalGroupAdd */
524 /*******************************************/
532 string lgrpi1_comment;
536 string lgrpi1002_comment;
537 } LOCALGROUP_INFO_1002;
539 [nopush,nopull] NET_API_STATUS NetLocalGroupAdd(
540 [in] string server_name,
543 [out,ref] uint32 *parm_err
546 /*******************************************/
547 /* NetLocalGroupDel */
548 /*******************************************/
550 [nopush,nopull] NET_API_STATUS NetLocalGroupDel(
551 [in] string server_name,
552 [in] string group_name
555 /*******************************************/
556 /* NetLocalGroupGetInfo */
557 /*******************************************/
559 [nopush,nopull] NET_API_STATUS NetLocalGroupGetInfo(
560 [in] string server_name,
561 [in] string group_name,
563 [out,ref] uint8 **buf
566 /*******************************************/
567 /* NetLocalGroupSetInfo */
568 /*******************************************/
570 [nopush,nopull] NET_API_STATUS NetLocalGroupSetInfo(
571 [in] string server_name,
572 [in] string group_name,
575 [out,ref] uint32 *parm_err
578 /*******************************************/
580 /*******************************************/
590 uint32 tod_tinterval;
597 [nopush,nopull] NET_API_STATUS NetRemoteTOD(
598 [in] string server_name,
599 [out,ref] uint8 **buf