Fix bug #6330 - DFS doesn't work on AIX. Jeremy.
[Samba.git] / librpc / idl / winreg.idl
blob18b5edcb5d98d7198027b4f6f8c6f3d36832a4b7
1 /*
2 winreg interface definition
3 */
5 import "lsa.idl", "security.idl";
7 [
8 uuid("338cd001-2244-31f1-aaaa-900038001003"),
9 version(1.0),
10 endpoint("ncacn_np:[\\pipe\\winreg]","ncacn_ip_tcp:","ncalrpc:"),
11 pointer_default(unique),
12 helpstring("Remote Registry Service")
13 ] interface winreg
15 typedef bitmap security_secinfo security_secinfo;
18 * Access Bits for registry ACLS
21 typedef [bitmap32bit] bitmap {
22 KEY_QUERY_VALUE = 0x00001,
23 KEY_SET_VALUE = 0x00002,
24 KEY_CREATE_SUB_KEY = 0x00004,
25 KEY_ENUMERATE_SUB_KEYS = 0x00008,
26 KEY_NOTIFY = 0x00010,
27 KEY_CREATE_LINK = 0x00020,
28 KEY_WOW64_64KEY = 0x00100,
29 KEY_WOW64_32KEY = 0x00200
30 } winreg_AccessMask;
32 const int REG_KEY_READ = ( STANDARD_RIGHTS_READ_ACCESS |
33 KEY_QUERY_VALUE |
34 KEY_ENUMERATE_SUB_KEYS |
35 KEY_NOTIFY);
37 const int REG_KEY_EXECUTE = REG_KEY_READ;
39 const int REG_KEY_WRITE = ( STANDARD_RIGHTS_WRITE_ACCESS |
40 KEY_SET_VALUE |
41 KEY_CREATE_SUB_KEY);
43 const int REG_KEY_ALL = ( STANDARD_RIGHTS_REQUIRED_ACCESS |
44 REG_KEY_READ |
45 REG_KEY_WRITE |
46 KEY_CREATE_LINK);
48 typedef [public,v1_enum] enum {
49 REG_NONE = 0,
50 REG_SZ = 1,
51 REG_EXPAND_SZ = 2,
52 REG_BINARY = 3,
53 REG_DWORD = 4,
54 REG_DWORD_BIG_ENDIAN = 5,
55 REG_LINK = 6,
56 REG_MULTI_SZ = 7,
57 REG_RESOURCE_LIST = 8,
58 REG_FULL_RESOURCE_DESCRIPTOR = 9,
59 REG_RESOURCE_REQUIREMENTS_LIST = 10,
60 REG_QWORD = 11
61 } winreg_Type;
63 typedef [public] struct {
64 [value(strlen_m_term(name)*2)] uint16 name_len;
65 [value(strlen_m_term(name)*2)] uint16 name_size;
66 [string,charset(UTF16)] uint16 *name;
67 } winreg_String;
69 /******************/
70 /* Function: 0x00 */
71 WERROR winreg_OpenHKCR(
72 [in,unique] uint16 *system_name,
73 [in] winreg_AccessMask access_mask,
74 [out,ref] policy_handle *handle
77 /******************/
78 /* Function: 0x01 */
79 WERROR winreg_OpenHKCU(
80 [in,unique] uint16 *system_name,
81 [in] winreg_AccessMask access_mask,
82 [out,ref] policy_handle *handle
85 /******************/
86 /* Function: 0x02 */
87 [public] WERROR winreg_OpenHKLM(
88 [in,unique] uint16 *system_name,
89 [in] winreg_AccessMask access_mask,
90 [out,ref] policy_handle *handle
93 /******************/
94 /* Function: 0x03 */
95 WERROR winreg_OpenHKPD(
96 [in,unique] uint16 *system_name,
97 [in] winreg_AccessMask access_mask,
98 [out,ref] policy_handle *handle
101 /******************/
102 /* Function: 0x04 */
103 WERROR winreg_OpenHKU(
104 [in,unique] uint16 *system_name,
105 [in] winreg_AccessMask access_mask,
106 [out,ref] policy_handle *handle
109 /******************/
110 /* Function: 0x05 */
111 [public] WERROR winreg_CloseKey(
112 [in,out,ref] policy_handle *handle
115 /******************/
116 /* Function: 0x06 */
118 typedef struct {
119 [size_is(size),length_is(len)] uint8 *data;
120 uint32 size;
121 uint32 len;
122 } KeySecurityData;
124 typedef struct {
125 uint32 length;
126 KeySecurityData sd;
127 boolean8 inherit;
128 } winreg_SecBuf;
130 typedef [v1_enum] enum {
131 REG_ACTION_NONE = 0, /* used by caller */
132 REG_CREATED_NEW_KEY = 1,
133 REG_OPENED_EXISTING_KEY = 2
134 } winreg_CreateAction;
136 [public] WERROR winreg_CreateKey(
137 [in,ref] policy_handle *handle,
138 [in] winreg_String name,
139 [in] winreg_String keyclass,
140 [in] uint32 options,
141 [in] winreg_AccessMask access_mask,
142 [in,unique] winreg_SecBuf *secdesc,
143 [out,ref] policy_handle *new_handle,
144 [in,out,unique] winreg_CreateAction *action_taken
147 /******************/
148 /* Function: 0x07 */
149 [public] WERROR winreg_DeleteKey(
150 [in,ref] policy_handle *handle,
151 [in] winreg_String key
154 /******************/
155 /* Function: 0x08 */
156 WERROR winreg_DeleteValue(
157 [in,ref] policy_handle *handle,
158 [in] winreg_String value
161 typedef struct {
162 [value(strlen_m_term_null(name)*2)] uint16 length;
163 /* size cannot be auto-set by value() as it is the
164 amount of space the server is allowed to use for this
165 string in the reply, not its current size */
166 uint16 size;
167 [size_is(size/2),length_is(length/2),charset(UTF16)] uint16 *name;
168 } winreg_StringBuf;
170 /******************/
171 /* Function: 0x09 */
172 [public] WERROR winreg_EnumKey(
173 [in,ref] policy_handle *handle,
174 [in] uint32 enum_index,
175 [in,out,ref] winreg_StringBuf *name,
176 [in,out,unique] winreg_StringBuf *keyclass,
177 [in,out,unique] NTTIME *last_changed_time
180 typedef struct {
181 [value(strlen_m_term(name)*2)] uint16 length;
182 /* size cannot be auto-set by value() as it is the
183 amount of space the server is allowed to use for this
184 string in the reply, not its current size */
185 uint16 size;
186 [size_is(size/2),length_is(length/2),charset(UTF16)] uint16 *name;
187 } winreg_ValNameBuf;
189 /******************/
190 /* Function: 0x0a */
192 [public] WERROR winreg_EnumValue(
193 [in,ref] policy_handle *handle,
194 [in] uint32 enum_index,
195 [in,out,ref] winreg_ValNameBuf *name,
196 [in,out,unique] winreg_Type *type,
197 [in,out,unique,size_is(*size),length_is(*length)] uint8 *value,
198 [in,out,unique] uint32 *size,
199 [in,out,unique] uint32 *length
202 /******************/
203 /* Function: 0x0b */
204 [public] WERROR winreg_FlushKey(
205 [in,ref] policy_handle *handle
208 /******************/
209 /* Function: 0x0c */
210 [public] WERROR winreg_GetKeySecurity(
211 [in,ref] policy_handle *handle,
212 [in] security_secinfo sec_info,
213 [in,out,ref] KeySecurityData *sd
216 /******************/
217 /* Function: 0x0d */
218 WERROR winreg_LoadKey(
219 [in,ref] policy_handle *handle,
220 [in,unique] winreg_String *keyname,
221 [in,unique] winreg_String *filename
224 /******************/
225 /* Function: 0x0e */
226 typedef [public,bitmap32bit] bitmap {
227 REG_NOTIFY_CHANGE_NAME = 0x00000001,
228 REG_NOTIFY_CHANGE_ATTRIBUTES = 0x00000002,
229 REG_NOTIFY_CHANGE_LAST_SET = 0x00000004,
230 REG_NOTIFY_CHANGE_SECURITY = 0x00000008
231 } winreg_NotifyChangeType;
233 [public] WERROR winreg_NotifyChangeKeyValue(
234 [in,ref] policy_handle *handle,
235 [in] boolean8 watch_subtree,
236 [in] winreg_NotifyChangeType notify_filter,
237 [in] uint32 unknown,
238 [in] winreg_String string1,
239 [in] winreg_String string2,
240 [in] uint32 unknown2
243 /******************/
244 /* Function: 0x0f */
245 [public] WERROR winreg_OpenKey(
246 [in,ref] policy_handle *parent_handle,
247 [in] winreg_String keyname,
248 [in] uint32 unknown,
249 [in] winreg_AccessMask access_mask,
250 [out,ref] policy_handle *handle
253 /******************/
254 /* Function: 0x10 */
255 [public] WERROR winreg_QueryInfoKey(
256 [in,ref] policy_handle *handle,
257 [in,out,ref] winreg_String *classname,
258 [out,ref] uint32 *num_subkeys,
259 [out,ref] uint32 *max_subkeylen,
260 [out,ref] uint32 *max_classlen,
261 [out,ref] uint32 *num_values,
262 [out,ref] uint32 *max_valnamelen,
263 [out,ref] uint32 *max_valbufsize,
264 [out,ref] uint32 *secdescsize,
265 [out,ref] NTTIME *last_changed_time
268 /******************/
269 /* Function: 0x11 */
270 [public] WERROR winreg_QueryValue(
271 [in,ref] policy_handle *handle,
272 [in,ref] winreg_String *value_name,
273 [in,out,unique] winreg_Type *type,
274 [in,out,unique,size_is(*data_size),length_is(*data_length)] uint8 *data,
275 [in,out,unique] uint32 *data_size,
276 [in,out,unique] uint32 *data_length
279 /******************/
280 /* Function: 0x12 */
281 [todo] WERROR winreg_ReplaceKey(
284 /******************/
285 /* Function: 0x13 */
286 WERROR winreg_RestoreKey(
287 [in,ref] policy_handle *handle,
288 [in,ref] winreg_String *filename,
289 [in] uint32 flags
292 /******************/
293 /* Function: 0x14 */
295 typedef struct {
296 uint32 data_size;
297 KeySecurityData sec_data;
298 uint8 inherit;
299 } KeySecurityAttribute;
301 WERROR winreg_SaveKey(
302 [in,ref] policy_handle *handle,
303 [in,ref] winreg_String *filename,
304 [in,unique] KeySecurityAttribute *sec_attrib
307 /******************/
308 /* Function: 0x15 */
309 WERROR winreg_SetKeySecurity(
310 [in,ref] policy_handle *handle,
311 [in] security_secinfo sec_info,
312 [in,ref] KeySecurityData *sd
315 /******************/
316 /* Function: 0x16 */
317 WERROR winreg_SetValue(
318 [in,ref] policy_handle *handle,
319 [in] winreg_String name,
320 [in] winreg_Type type,
321 [in,size_is(size),ref] uint8 *data,
322 [in] uint32 size
325 /******************/
326 /* Function: 0x17 */
327 [todo] WERROR winreg_UnLoadKey(
330 /******************/
331 /* Function: 0x18 */
332 WERROR winreg_InitiateSystemShutdown(
333 [in,unique] uint16 *hostname,
335 * Note: lsa_String and winreg_String both result
336 * in WERR_INVALID_PARAM
338 [in,unique] lsa_StringLarge *message,
339 [in] uint32 timeout,
340 [in] uint8 force_apps,
341 [in] uint8 do_reboot
344 /******************/
345 /* Function: 0x19 */
346 WERROR winreg_AbortSystemShutdown(
347 [in,unique] uint16 *server
350 /******************/
351 /* Function: 0x1a */
352 [public] WERROR winreg_GetVersion(
353 [in,ref] policy_handle *handle,
354 [out,ref] uint32 *version
357 /******************/
358 /* Function: 0x1b */
359 WERROR winreg_OpenHKCC(
360 [in,unique] uint16 *system_name,
361 [in] winreg_AccessMask access_mask,
362 [out,ref] policy_handle *handle
365 /******************/
366 /* Function: 0x1c */
367 WERROR winreg_OpenHKDD(
368 [in,unique] uint16 *system_name,
369 [in] winreg_AccessMask access_mask,
370 [out,ref] policy_handle *handle
373 typedef struct {
374 winreg_String *name;
375 winreg_Type type;
376 uint32 offset;
377 uint32 length;
378 } QueryMultipleValue;
380 /******************/
381 /* Function: 0x1d */
382 [public] WERROR winreg_QueryMultipleValues(
383 [in,ref] policy_handle *key_handle,
384 [in,out,ref,size_is(num_values),length_is(num_values)] QueryMultipleValue *values,
385 [in] uint32 num_values,
386 [in,out,unique,size_is(*buffer_size),length_is(*buffer_size)] uint8 *buffer,
387 [in,out,ref] uint32 *buffer_size
390 /******************/
391 /* Function: 0x1e */
392 WERROR winreg_InitiateSystemShutdownEx(
393 [in,unique] uint16 *hostname,
395 * Note: lsa_String and winreg_String both result
396 * in WERR_INVALID_PARAM
398 [in,unique] lsa_StringLarge *message,
399 [in] uint32 timeout,
400 [in] uint8 force_apps,
401 [in] uint8 do_reboot,
402 [in] uint32 reason
405 /******************/
406 /* Function: 0x1f */
407 [todo] WERROR winreg_SaveKeyEx(
410 /******************/
411 /* Function: 0x20 */
412 WERROR winreg_OpenHKPT(
413 [in,unique] uint16 *system_name,
414 [in] winreg_AccessMask access_mask,
415 [out,ref] policy_handle *handle
418 /******************/
419 /* Function: 0x21 */
420 WERROR winreg_OpenHKPN(
421 [in,unique] uint16 *system_name,
422 [in] winreg_AccessMask access_mask,
423 [out,ref] policy_handle *handle
426 /******************/
427 /* Function: 0x22 */
428 [todo] WERROR winreg_QueryMultipleValues2(