waf: Fix make etags
[Samba/gebeck_regimport.git] / librpc / idl / winreg.idl
blobc5da3281b167d7f03c8cf8300612cf5dcaba8290
1 /*
2 winreg interface definition
3 */
5 import "lsa.idl", "security.idl", "misc.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] struct {
49 [value(strlen_m_term(name)*2)] uint16 name_len;
50 [value(strlen_m_term(name)*2)] uint16 name_size;
51 [string,charset(UTF16)] uint16 *name;
52 } winreg_String;
54 /******************/
55 /* Function: 0x00 */
56 WERROR winreg_OpenHKCR(
57 [in,unique] uint16 *system_name,
58 [in] winreg_AccessMask access_mask,
59 [out,ref] policy_handle *handle
62 /******************/
63 /* Function: 0x01 */
64 WERROR winreg_OpenHKCU(
65 [in,unique] uint16 *system_name,
66 [in] winreg_AccessMask access_mask,
67 [out,ref] policy_handle *handle
70 /******************/
71 /* Function: 0x02 */
72 [public] WERROR winreg_OpenHKLM(
73 [in,unique] uint16 *system_name,
74 [in] winreg_AccessMask access_mask,
75 [out,ref] policy_handle *handle
78 /******************/
79 /* Function: 0x03 */
80 WERROR winreg_OpenHKPD(
81 [in,unique] uint16 *system_name,
82 [in] winreg_AccessMask access_mask,
83 [out,ref] policy_handle *handle
86 /******************/
87 /* Function: 0x04 */
88 WERROR winreg_OpenHKU(
89 [in,unique] uint16 *system_name,
90 [in] winreg_AccessMask access_mask,
91 [out,ref] policy_handle *handle
94 /******************/
95 /* Function: 0x05 */
96 [public] WERROR winreg_CloseKey(
97 [in,out,ref] policy_handle *handle
100 /******************/
101 /* Function: 0x06 */
103 typedef struct {
104 [size_is(size),length_is(len)] uint8 *data;
105 uint32 size;
106 uint32 len;
107 } KeySecurityData;
109 typedef struct {
110 uint32 length;
111 KeySecurityData sd;
112 boolean8 inherit;
113 } winreg_SecBuf;
115 const int REG_OPTION_NON_VOLATILE = 0x00000000;
117 typedef [bitmap32bit] bitmap {
118 REG_OPTION_VOLATILE = 0x00000001,
119 REG_OPTION_CREATE_LINK = 0x00000002,
120 REG_OPTION_BACKUP_RESTORE = 0x00000004,
121 REG_OPTION_OPEN_LINK = 0x00000008
122 } winreg_KeyOptions;
124 typedef [v1_enum] enum {
125 REG_ACTION_NONE = 0, /* used by caller */
126 REG_CREATED_NEW_KEY = 1,
127 REG_OPENED_EXISTING_KEY = 2
128 } winreg_CreateAction;
130 [public] WERROR winreg_CreateKey(
131 [in,ref] policy_handle *handle,
132 [in] winreg_String name,
133 [in] winreg_String keyclass,
134 [in] winreg_KeyOptions options,
135 [in] winreg_AccessMask access_mask,
136 [in,unique] winreg_SecBuf *secdesc,
137 [out,ref] policy_handle *new_handle,
138 [in,out,unique] winreg_CreateAction *action_taken
141 /******************/
142 /* Function: 0x07 */
143 [public] WERROR winreg_DeleteKey(
144 [in,ref] policy_handle *handle,
145 [in] winreg_String key
148 /******************/
149 /* Function: 0x08 */
150 WERROR winreg_DeleteValue(
151 [in,ref] policy_handle *handle,
152 [in] winreg_String value
155 typedef struct {
156 [value(strlen_m_term_null(name)*2)] uint16 length;
157 /* size cannot be auto-set by value() as it is the
158 amount of space the server is allowed to use for this
159 string in the reply, not its current size */
160 uint16 size;
161 [size_is(size/2),length_is(length/2),charset(UTF16)] uint16 *name;
162 } winreg_StringBuf;
164 /******************/
165 /* Function: 0x09 */
166 [public] WERROR winreg_EnumKey(
167 [in,ref] policy_handle *handle,
168 [in] uint32 enum_index,
169 [in,out,ref] winreg_StringBuf *name,
170 [in,out,unique] winreg_StringBuf *keyclass,
171 [in,out,unique] NTTIME *last_changed_time
174 typedef struct {
175 [value(strlen_m_term(name)*2)] uint16 length;
176 /* size cannot be auto-set by value() as it is the
177 amount of space the server is allowed to use for this
178 string in the reply, not its current size */
179 uint16 size;
180 [size_is(size/2),length_is(length/2),charset(UTF16)] uint16 *name;
181 } winreg_ValNameBuf;
183 /******************/
184 /* Function: 0x0a */
186 [public] WERROR winreg_EnumValue(
187 [in,ref] policy_handle *handle,
188 [in] uint32 enum_index,
189 [in,out,ref] winreg_ValNameBuf *name,
190 [in,out,unique] winreg_Type *type,
191 [in,out,unique,size_is(size ? *size : 0),length_is(length ? *length : 0),range(0,0x4000000)] uint8 *value,
192 [in,out,unique] uint32 *size,
193 [in,out,unique] uint32 *length
196 /******************/
197 /* Function: 0x0b */
198 [public] WERROR winreg_FlushKey(
199 [in,ref] policy_handle *handle
202 /******************/
203 /* Function: 0x0c */
204 [public] WERROR winreg_GetKeySecurity(
205 [in,ref] policy_handle *handle,
206 [in] security_secinfo sec_info,
207 [in,out,ref] KeySecurityData *sd
210 /******************/
211 /* Function: 0x0d */
212 WERROR winreg_LoadKey(
213 [in,ref] policy_handle *handle,
214 [in,unique] winreg_String *keyname,
215 [in,unique] winreg_String *filename
218 /******************/
219 /* Function: 0x0e */
220 typedef [public,bitmap32bit] bitmap {
221 REG_NOTIFY_CHANGE_NAME = 0x00000001,
222 REG_NOTIFY_CHANGE_ATTRIBUTES = 0x00000002,
223 REG_NOTIFY_CHANGE_LAST_SET = 0x00000004,
224 REG_NOTIFY_CHANGE_SECURITY = 0x00000008
225 } winreg_NotifyChangeType;
227 [public] WERROR winreg_NotifyChangeKeyValue(
228 [in,ref] policy_handle *handle,
229 [in] boolean8 watch_subtree,
230 [in] winreg_NotifyChangeType notify_filter,
231 [in] uint32 unknown,
232 [in] winreg_String string1,
233 [in] winreg_String string2,
234 [in] uint32 unknown2
237 /******************/
238 /* Function: 0x0f */
239 [public] WERROR winreg_OpenKey(
240 [in,ref] policy_handle *parent_handle,
241 [in] winreg_String keyname,
242 [in] winreg_KeyOptions options,
243 [in] winreg_AccessMask access_mask,
244 [out,ref] policy_handle *handle
247 /******************/
248 /* Function: 0x10 */
249 [public] WERROR winreg_QueryInfoKey(
250 [in,ref] policy_handle *handle,
251 [in,out,ref] winreg_String *classname,
252 [out,ref] uint32 *num_subkeys,
253 [out,ref] uint32 *max_subkeylen,
254 [out,ref] uint32 *max_classlen,
255 [out,ref] uint32 *num_values,
256 [out,ref] uint32 *max_valnamelen,
257 [out,ref] uint32 *max_valbufsize,
258 [out,ref] uint32 *secdescsize,
259 [out,ref] NTTIME *last_changed_time
262 /******************/
263 /* Function: 0x11 */
264 [public] WERROR winreg_QueryValue(
265 [in,ref] policy_handle *handle,
266 [in,ref] winreg_String *value_name,
267 [in,out,unique] winreg_Type *type,
268 [in,out,unique,size_is(data_size ? *data_size : 0),length_is(data_length ? *data_length : 0),range(0,0x4000000)] uint8 *data,
269 [in,out,unique] uint32 *data_size,
270 [in,out,unique] uint32 *data_length
273 /******************/
274 /* Function: 0x12 */
275 WERROR winreg_ReplaceKey(
276 [in,ref] policy_handle *handle,
277 [in,ref] winreg_String *subkey,
278 [in,ref] winreg_String *new_file,
279 [in,ref] winreg_String *old_file
282 /******************/
283 /* Function: 0x13 */
285 typedef [public,bitmap32bit] bitmap {
286 REG_WHOLE_HIVE_VOLATILE = 0x00000001,
287 REG_REFRESH_HIVE = 0x00000002,
288 REG_NO_LAZY_FLUSH = 0x00000004,
289 REG_FORCE_RESTORE = 0x00000008
290 } winreg_RestoreKeyFlags;
292 WERROR winreg_RestoreKey(
293 [in,ref] policy_handle *handle,
294 [in,ref] winreg_String *filename,
295 [in] winreg_RestoreKeyFlags flags
298 /******************/
299 /* Function: 0x14 */
301 typedef struct {
302 uint32 data_size;
303 KeySecurityData sec_data;
304 uint8 inherit;
305 } KeySecurityAttribute;
307 WERROR winreg_SaveKey(
308 [in,ref] policy_handle *handle,
309 [in,ref] winreg_String *filename,
310 [in,unique] KeySecurityAttribute *sec_attrib
313 /******************/
314 /* Function: 0x15 */
315 WERROR winreg_SetKeySecurity(
316 [in,ref] policy_handle *handle,
317 [in] security_secinfo sec_info,
318 [in,ref] KeySecurityData *sd
321 /******************/
322 /* Function: 0x16 */
323 WERROR winreg_SetValue(
324 [in,ref] policy_handle *handle,
325 [in] winreg_String name,
326 [in] winreg_Type type,
327 [in,size_is(size),ref] uint8 *data,
328 [in] uint32 size
331 /******************/
332 /* Function: 0x17 */
333 WERROR winreg_UnLoadKey(
334 [in,ref] policy_handle *handle,
335 [in,ref] winreg_String *subkey
338 /******************/
339 /* Function: 0x18 */
340 WERROR winreg_InitiateSystemShutdown(
341 [in,unique] uint16 *hostname,
343 * Note: lsa_String and winreg_String both result
344 * in WERR_INVALID_PARAM
346 [in,unique] lsa_StringLarge *message,
347 [in] uint32 timeout,
348 [in] uint8 force_apps,
349 [in] uint8 do_reboot
352 /******************/
353 /* Function: 0x19 */
354 WERROR winreg_AbortSystemShutdown(
355 [in,unique] uint16 *server
358 /******************/
359 /* Function: 0x1a */
360 [public] WERROR winreg_GetVersion(
361 [in,ref] policy_handle *handle,
362 [out,ref] uint32 *version
365 /******************/
366 /* Function: 0x1b */
367 WERROR winreg_OpenHKCC(
368 [in,unique] uint16 *system_name,
369 [in] winreg_AccessMask access_mask,
370 [out,ref] policy_handle *handle
373 /******************/
374 /* Function: 0x1c */
375 WERROR winreg_OpenHKDD(
376 [in,unique] uint16 *system_name,
377 [in] winreg_AccessMask access_mask,
378 [out,ref] policy_handle *handle
381 typedef struct {
382 winreg_ValNameBuf *ve_valuename;
383 uint32 ve_valuelen;
384 uint32 ve_valueptr;
385 winreg_Type ve_type;
386 } QueryMultipleValue;
388 /******************/
389 /* Function: 0x1d */
390 [public] WERROR winreg_QueryMultipleValues(
391 [in,ref] policy_handle *key_handle,
392 [in,ref,size_is(num_values),length_is(num_values)] QueryMultipleValue *values_in,
393 [out,ref,size_is(num_values),length_is(num_values)] QueryMultipleValue *values_out,
394 [in] uint32 num_values,
395 [in,out,unique,size_is(*buffer_size),length_is(*buffer_size)] uint8 *buffer,
396 [in,out,ref] uint32 *buffer_size
399 /******************/
400 /* Function: 0x1e */
401 WERROR winreg_InitiateSystemShutdownEx(
402 [in,unique] uint16 *hostname,
404 * Note: lsa_String and winreg_String both result
405 * in WERR_INVALID_PARAM
407 [in,unique] lsa_StringLarge *message,
408 [in] uint32 timeout,
409 [in] uint8 force_apps,
410 [in] uint8 do_reboot,
411 [in] uint32 reason
414 /******************/
415 /* Function: 0x1f */
416 WERROR winreg_SaveKeyEx(
417 [in,ref] policy_handle *handle,
418 [in,ref] winreg_String *filename,
419 [in,unique] KeySecurityAttribute *sec_attrib,
420 [in] uint32 flags
423 /******************/
424 /* Function: 0x20 */
425 WERROR winreg_OpenHKPT(
426 [in,unique] uint16 *system_name,
427 [in] winreg_AccessMask access_mask,
428 [out,ref] policy_handle *handle
431 /******************/
432 /* Function: 0x21 */
433 WERROR winreg_OpenHKPN(
434 [in,unique] uint16 *system_name,
435 [in] winreg_AccessMask access_mask,
436 [out,ref] policy_handle *handle
439 /******************/
440 /* Function: 0x22 */
441 [public] WERROR winreg_QueryMultipleValues2(
442 [in,ref] policy_handle *key_handle,
443 [in,ref,size_is(num_values),length_is(num_values)] QueryMultipleValue *values_in,
444 [out,ref,size_is(num_values),length_is(num_values)] QueryMultipleValue *values_out,
445 [in] uint32 num_values,
446 [in,out,unique,size_is(*offered),length_is(*offered)] uint8 *buffer,
447 [in,ref] uint32 *offered,
448 [out,ref] uint32 *needed
451 /******************/
452 /* Function: 0x23 */
453 WERROR winreg_DeleteKeyEx(
454 [in,ref] policy_handle *handle,
455 [in,ref] winreg_String *key,
456 [in] winreg_AccessMask access_mask,
457 [in] uint32 reserved