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 [nopush,nopull] NET_API_STATUS NetJoinDomain(
29 [in,unique] string *server,
30 [in,ref] string *domain,
31 [in,unique] string *account_ou,
32 [in,unique] string *account,
33 [in,unique] string *password,
34 [in] uint32 join_flags
37 [nopush,nopull] NET_API_STATUS NetUnjoinDomain(
38 [in,unique] string *server_name,
39 [in,unique] string *account,
40 [in,unique] string *password,
41 [in] uint32 unjoin_flags
44 [nopush,nopull] NET_API_STATUS NetGetJoinInformation(
45 [in,unique] string *server_name,
46 [out] string **name_buffer,
47 [out] uint16 *name_type
50 [nopush,nopull] NET_API_STATUS NetGetJoinableOUs(
51 [in,unique] string *server_name,
52 [in,ref] string *domain,
53 [in,unique] string *account,
54 [in,unique] string *password,
55 [out] uint32 *ou_count,
59 [public] typedef struct {
60 string sv1005_comment;
63 [nopush,nopull] NET_API_STATUS NetServerGetInfo(
64 [in,unique] string *server_name,
69 [nopush,nopull] NET_API_STATUS NetServerSetInfo(
70 [in,unique] string *server_name,
73 [out] uint32 *parm_error
76 [nopush,nopull] NET_API_STATUS NetGetDCName(
77 [in,unique] string *server_name,
78 [in,unique] string *domain_name,
82 [nopush,nopull] NET_API_STATUS NetGetAnyDCName(
83 [in,unique] string *server_name,
84 [in,unique] string *domain_name,
88 [public] typedef struct {
89 string domain_controller_name;
90 string domain_controller_address;
91 uint32 domain_controller_address_type;
94 string dns_forest_name;
97 string client_site_name;
98 } DOMAIN_CONTROLLER_INFO;
100 [nopush,nopull] NET_API_STATUS DsGetDcName(
101 [in,unique] string *server_name,
102 [in,ref] string *domain_name,
103 [in,unique] GUID *domain_guid,
104 [in,unique] string *site_name,
106 [out,ref] DOMAIN_CONTROLLER_INFO **dc_info
109 [public] typedef struct {
113 [public] typedef struct {
115 string usri1_password;
116 uint32 usri1_password_age;
118 string usri1_home_dir;
119 string usri1_comment;
121 string usri1_script_path;
124 [nopush,nopull] NET_API_STATUS NetUserAdd(
125 [in,unique] string *server_name,
127 [in,ref] uint8 *buffer,
128 [out,ref] uint32 *parm_error
131 [nopush,nopull] NET_API_STATUS NetUserDel(
132 [in,unique] string *server_name,
133 [in,ref] string *user_name
136 [nopush,nopull] NET_API_STATUS NetUserEnum(
137 [in,unique] string *server_name,
140 [out,ref] uint8 **buffer,
141 [in] uint32 prefmaxlen,
142 [out,ref] uint32 *entries_read,
143 [out,ref] uint32 *total_entries,
144 [in,out,ref] uint32 *resume_handle
147 [public] typedef struct {
149 string usri1_comment;
151 string usri1_full_name;
152 uint32 usri1_user_id;
153 uint32 usri1_next_index;
156 [public] typedef struct {
158 string usri2_comment;
160 uint32 usri2_user_id;
161 uint32 usri2_next_index;
162 } NET_DISPLAY_MACHINE;
164 [public] typedef struct {
166 string grpi3_comment;
167 uint32 grpi3_group_id;
168 uint32 grpi3_attributes;
169 uint32 grpi3_next_index;
172 [nopush,nopull] NET_API_STATUS NetQueryDisplayInformation(
173 [in,unique] string *server_name,
176 [in] uint32 entries_requested,
177 [in] uint32 prefmaxlen,
178 [out,ref] uint32 *entries_read,
179 [out,ref,noprint] void **buffer
188 string grpi1_comment;
193 string grpi2_comment;
194 uint32 grpi2_group_id;
195 uint32 grpi2_attributes;
200 string grpi3_comment;
201 domsid grpi3_group_sid;
202 uint32 grpi3_attributes;
206 string grpi1002_comment;
210 uint32 grpi1005_attributes;
213 [nopush,nopull] NET_API_STATUS NetGroupAdd(
214 [in] string server_name,
217 [out] uint32 *parm_err
220 [nopush,nopull] NET_API_STATUS NetGroupDel(
221 [in] string server_name,
222 [in] string group_name
225 [nopush,nopull] NET_API_STATUS NetGroupSetInfo(
226 [in] string server_name,
227 [in] string group_name,
230 [out] uint32 *parm_err
233 [nopush,nopull] NET_API_STATUS NetGroupGetInfo(
234 [in] string server_name,
235 [in] string group_name,
240 [nopush,nopull] NET_API_STATUS NetGroupAddUser(
241 [in] string server_name,
242 [in] string group_name,
243 [in] string user_name
246 [nopush,nopull] NET_API_STATUS NetGroupDelUser(
247 [in] string server_name,
248 [in] string group_name,
249 [in] string user_name
258 string lgrpi1_comment;
262 string lgrpi1002_comment;
263 } LOCALGROUP_INFO_1002;
265 [nopush,nopull] NET_API_STATUS NetLocalGroupAdd(
266 [in] string server_name,
269 [out,ref] uint32 *parm_err