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 [nopush,nopull] NET_API_STATUS NetUserAdd(
165 [in,unique] string *server_name,
167 [in,ref] uint8 *buffer,
168 [out,ref] uint32 *parm_error
171 /*******************************************/
173 /*******************************************/
175 [nopush,nopull] NET_API_STATUS NetUserDel(
176 [in,unique] string *server_name,
177 [in,ref] string *user_name
180 /*******************************************/
182 /*******************************************/
184 const int FILTER_TEMP_DUPLICATE_ACCOUNT = 0x0001;
185 const int FILTER_NORMAL_ACCOUNT = 0x0002;
186 const int FILTER_INTERDOMAIN_TRUST_ACCOUNT = 0x0008;
187 const int FILTER_WORKSTATION_TRUST_ACCOUNT = 0x0010;
188 const int FILTER_SERVER_TRUST_ACCOUNT = 0x0020;
190 [nopush,nopull] NET_API_STATUS NetUserEnum(
191 [in,unique] string *server_name,
194 [out,ref] uint8 **buffer,
195 [in] uint32 prefmaxlen,
196 [out,ref] uint32 *entries_read,
197 [out,ref] uint32 *total_entries,
198 [in,out,ref] uint32 *resume_handle
201 /*******************************************/
202 /* NetUserChangePassword */
203 /*******************************************/
205 [nopush,nopull] NET_API_STATUS NetUserChangePassword(
206 [in] string domain_name,
207 [in] string user_name,
208 [in] string old_password,
209 [in] string new_password
212 /*******************************************/
213 /* NetQueryDisplayInformation */
214 /*******************************************/
216 [public] typedef struct {
218 string usri1_comment;
220 string usri1_full_name;
221 uint32 usri1_user_id;
222 uint32 usri1_next_index;
225 [public] typedef struct {
227 string usri2_comment;
229 uint32 usri2_user_id;
230 uint32 usri2_next_index;
231 } NET_DISPLAY_MACHINE;
233 [public] typedef struct {
235 string grpi3_comment;
236 uint32 grpi3_group_id;
237 uint32 grpi3_attributes;
238 uint32 grpi3_next_index;
241 [nopush,nopull] NET_API_STATUS NetQueryDisplayInformation(
242 [in,unique] string *server_name,
245 [in] uint32 entries_requested,
246 [in] uint32 prefmaxlen,
247 [out,ref] uint32 *entries_read,
248 [out,ref,noprint] void **buffer
251 /*******************************************/
253 /*******************************************/
261 string grpi1_comment;
266 string grpi2_comment;
267 uint32 grpi2_group_id;
268 uint32 grpi2_attributes;
273 string grpi3_comment;
274 domsid *grpi3_group_sid;
275 uint32 grpi3_attributes;
279 string grpi1002_comment;
283 uint32 grpi1005_attributes;
286 [nopush,nopull] NET_API_STATUS NetGroupAdd(
287 [in] string server_name,
290 [out] uint32 *parm_err
293 /*******************************************/
295 /*******************************************/
297 [nopush,nopull] NET_API_STATUS NetGroupDel(
298 [in] string server_name,
299 [in] string group_name
302 /*******************************************/
304 /*******************************************/
306 [nopush,nopull] NET_API_STATUS NetGroupEnum(
307 [in] string server_name,
309 [out,ref] uint8 **buffer,
310 [in] uint32 prefmaxlen,
311 [out,ref] uint32 *entries_read,
312 [out,ref] uint32 *total_entries,
313 [in,out,ref] uint32 *resume_handle
316 /*******************************************/
317 /* NetGroupSetInfo */
318 /*******************************************/
320 [nopush,nopull] NET_API_STATUS NetGroupSetInfo(
321 [in] string server_name,
322 [in] string group_name,
325 [out] uint32 *parm_err
328 /*******************************************/
329 /* NetGroupGetInfo */
330 /*******************************************/
332 [nopush,nopull] NET_API_STATUS NetGroupGetInfo(
333 [in] string server_name,
334 [in] string group_name,
339 /*******************************************/
340 /* NetGroupAddUser */
341 /*******************************************/
343 [nopush,nopull] NET_API_STATUS NetGroupAddUser(
344 [in] string server_name,
345 [in] string group_name,
346 [in] string user_name
349 /*******************************************/
350 /* NetGroupDelUser */
351 /*******************************************/
353 [nopush,nopull] NET_API_STATUS NetGroupDelUser(
354 [in] string server_name,
355 [in] string group_name,
356 [in] string user_name
359 /*******************************************/
360 /* NetLocalGroupAdd */
361 /*******************************************/
369 string lgrpi1_comment;
373 string lgrpi1002_comment;
374 } LOCALGROUP_INFO_1002;
376 [nopush,nopull] NET_API_STATUS NetLocalGroupAdd(
377 [in] string server_name,
380 [out,ref] uint32 *parm_err
383 /*******************************************/
384 /* NetLocalGroupDel */
385 /*******************************************/
387 [nopush,nopull] NET_API_STATUS NetLocalGroupDel(
388 [in] string server_name,
389 [in] string group_name
392 /*******************************************/
393 /* NetLocalGroupGetInfo */
394 /*******************************************/
396 [nopush,nopull] NET_API_STATUS NetLocalGroupGetInfo(
397 [in] string server_name,
398 [in] string group_name,
400 [out,ref] uint8 **buf
403 /*******************************************/
404 /* NetLocalGroupSetInfo */
405 /*******************************************/
407 [nopush,nopull] NET_API_STATUS NetLocalGroupSetInfo(
408 [in] string server_name,
409 [in] string group_name,
412 [out,ref] uint32 *parm_err
415 /*******************************************/
417 /*******************************************/
427 uint32 tod_tinterval;
434 [nopush,nopull] NET_API_STATUS NetRemoteTOD(
435 [in] string server_name,
436 [out,ref] uint8 **buf