Add smbta-util to manage the encryption key.
[Samba/nascimento.git] / librpc / idl / winreg.idl
bloba21bbd4a623fa3378c6f916a618be458d611c92b
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 typedef [v1_enum] enum {
116 REG_KEYTYPE_NON_VOLATILE = 0x00000000,
117 REG_KEYTYPE_VOLATILE = 0x00000001,
118 REG_KEYTYPE_SYMLINK = 0x00000002
119 } winreg_KeyType;
121 typedef [v1_enum] enum {
122 REG_ACTION_NONE = 0, /* used by caller */
123 REG_CREATED_NEW_KEY = 1,
124 REG_OPENED_EXISTING_KEY = 2
125 } winreg_CreateAction;
127 [public] WERROR winreg_CreateKey(
128 [in,ref] policy_handle *handle,
129 [in] winreg_String name,
130 [in] winreg_String keyclass,
131 [in] winreg_KeyType options,
132 [in] winreg_AccessMask access_mask,
133 [in,unique] winreg_SecBuf *secdesc,
134 [out,ref] policy_handle *new_handle,
135 [in,out,unique] winreg_CreateAction *action_taken
138 /******************/
139 /* Function: 0x07 */
140 [public] WERROR winreg_DeleteKey(
141 [in,ref] policy_handle *handle,
142 [in] winreg_String key
145 /******************/
146 /* Function: 0x08 */
147 WERROR winreg_DeleteValue(
148 [in,ref] policy_handle *handle,
149 [in] winreg_String value
152 typedef struct {
153 [value(strlen_m_term_null(name)*2)] uint16 length;
154 /* size cannot be auto-set by value() as it is the
155 amount of space the server is allowed to use for this
156 string in the reply, not its current size */
157 uint16 size;
158 [size_is(size/2),length_is(length/2),charset(UTF16)] uint16 *name;
159 } winreg_StringBuf;
161 /******************/
162 /* Function: 0x09 */
163 [public] WERROR winreg_EnumKey(
164 [in,ref] policy_handle *handle,
165 [in] uint32 enum_index,
166 [in,out,ref] winreg_StringBuf *name,
167 [in,out,unique] winreg_StringBuf *keyclass,
168 [in,out,unique] NTTIME *last_changed_time
171 typedef struct {
172 [value(strlen_m_term(name)*2)] uint16 length;
173 /* size cannot be auto-set by value() as it is the
174 amount of space the server is allowed to use for this
175 string in the reply, not its current size */
176 uint16 size;
177 [size_is(size/2),length_is(length/2),charset(UTF16)] uint16 *name;
178 } winreg_ValNameBuf;
180 /******************/
181 /* Function: 0x0a */
183 [public] WERROR winreg_EnumValue(
184 [in,ref] policy_handle *handle,
185 [in] uint32 enum_index,
186 [in,out,ref] winreg_ValNameBuf *name,
187 [in,out,unique] winreg_Type *type,
188 [in,out,unique,size_is(*size),length_is(*length)] uint8 *value,
189 [in,out,unique] uint32 *size,
190 [in,out,unique] uint32 *length
193 /******************/
194 /* Function: 0x0b */
195 [public] WERROR winreg_FlushKey(
196 [in,ref] policy_handle *handle
199 /******************/
200 /* Function: 0x0c */
201 [public] WERROR winreg_GetKeySecurity(
202 [in,ref] policy_handle *handle,
203 [in] security_secinfo sec_info,
204 [in,out,ref] KeySecurityData *sd
207 /******************/
208 /* Function: 0x0d */
209 WERROR winreg_LoadKey(
210 [in,ref] policy_handle *handle,
211 [in,unique] winreg_String *keyname,
212 [in,unique] winreg_String *filename
215 /******************/
216 /* Function: 0x0e */
217 typedef [public,bitmap32bit] bitmap {
218 REG_NOTIFY_CHANGE_NAME = 0x00000001,
219 REG_NOTIFY_CHANGE_ATTRIBUTES = 0x00000002,
220 REG_NOTIFY_CHANGE_LAST_SET = 0x00000004,
221 REG_NOTIFY_CHANGE_SECURITY = 0x00000008
222 } winreg_NotifyChangeType;
224 [public] WERROR winreg_NotifyChangeKeyValue(
225 [in,ref] policy_handle *handle,
226 [in] boolean8 watch_subtree,
227 [in] winreg_NotifyChangeType notify_filter,
228 [in] uint32 unknown,
229 [in] winreg_String string1,
230 [in] winreg_String string2,
231 [in] uint32 unknown2
234 /******************/
235 /* Function: 0x0f */
236 [public] WERROR winreg_OpenKey(
237 [in,ref] policy_handle *parent_handle,
238 [in] winreg_String keyname,
239 [in] winreg_KeyType options,
240 [in] winreg_AccessMask access_mask,
241 [out,ref] policy_handle *handle
244 /******************/
245 /* Function: 0x10 */
246 [public] WERROR winreg_QueryInfoKey(
247 [in,ref] policy_handle *handle,
248 [in,out,ref] winreg_String *classname,
249 [out,ref] uint32 *num_subkeys,
250 [out,ref] uint32 *max_subkeylen,
251 [out,ref] uint32 *max_classlen,
252 [out,ref] uint32 *num_values,
253 [out,ref] uint32 *max_valnamelen,
254 [out,ref] uint32 *max_valbufsize,
255 [out,ref] uint32 *secdescsize,
256 [out,ref] NTTIME *last_changed_time
259 /******************/
260 /* Function: 0x11 */
261 [public] WERROR winreg_QueryValue(
262 [in,ref] policy_handle *handle,
263 [in,ref] winreg_String *value_name,
264 [in,out,unique] winreg_Type *type,
265 [in,out,unique,size_is(data_size ? *data_size : 0),length_is(data_length ? *data_length : 0),range(0,0x4000000)] uint8 *data,
266 [in,out,unique] uint32 *data_size,
267 [in,out,unique] uint32 *data_length
270 /******************/
271 /* Function: 0x12 */
272 [todo] WERROR winreg_ReplaceKey(
275 /******************/
276 /* Function: 0x13 */
277 WERROR winreg_RestoreKey(
278 [in,ref] policy_handle *handle,
279 [in,ref] winreg_String *filename,
280 [in] uint32 flags
283 /******************/
284 /* Function: 0x14 */
286 typedef struct {
287 uint32 data_size;
288 KeySecurityData sec_data;
289 uint8 inherit;
290 } KeySecurityAttribute;
292 WERROR winreg_SaveKey(
293 [in,ref] policy_handle *handle,
294 [in,ref] winreg_String *filename,
295 [in,unique] KeySecurityAttribute *sec_attrib
298 /******************/
299 /* Function: 0x15 */
300 WERROR winreg_SetKeySecurity(
301 [in,ref] policy_handle *handle,
302 [in] security_secinfo sec_info,
303 [in,ref] KeySecurityData *sd
306 /******************/
307 /* Function: 0x16 */
308 WERROR winreg_SetValue(
309 [in,ref] policy_handle *handle,
310 [in] winreg_String name,
311 [in] winreg_Type type,
312 [in,size_is(size),ref] uint8 *data,
313 [in] uint32 size
316 /******************/
317 /* Function: 0x17 */
318 [todo] WERROR winreg_UnLoadKey(
321 /******************/
322 /* Function: 0x18 */
323 WERROR winreg_InitiateSystemShutdown(
324 [in,unique] uint16 *hostname,
326 * Note: lsa_String and winreg_String both result
327 * in WERR_INVALID_PARAM
329 [in,unique] lsa_StringLarge *message,
330 [in] uint32 timeout,
331 [in] uint8 force_apps,
332 [in] uint8 do_reboot
335 /******************/
336 /* Function: 0x19 */
337 WERROR winreg_AbortSystemShutdown(
338 [in,unique] uint16 *server
341 /******************/
342 /* Function: 0x1a */
343 [public] WERROR winreg_GetVersion(
344 [in,ref] policy_handle *handle,
345 [out,ref] uint32 *version
348 /******************/
349 /* Function: 0x1b */
350 WERROR winreg_OpenHKCC(
351 [in,unique] uint16 *system_name,
352 [in] winreg_AccessMask access_mask,
353 [out,ref] policy_handle *handle
356 /******************/
357 /* Function: 0x1c */
358 WERROR winreg_OpenHKDD(
359 [in,unique] uint16 *system_name,
360 [in] winreg_AccessMask access_mask,
361 [out,ref] policy_handle *handle
364 typedef struct {
365 winreg_String *name;
366 winreg_Type type;
367 uint32 offset;
368 uint32 length;
369 } QueryMultipleValue;
371 /******************/
372 /* Function: 0x1d */
373 [public] WERROR winreg_QueryMultipleValues(
374 [in,ref] policy_handle *key_handle,
375 [in,out,ref,size_is(num_values),length_is(num_values)] QueryMultipleValue *values,
376 [in] uint32 num_values,
377 [in,out,unique,size_is(*buffer_size),length_is(*buffer_size)] uint8 *buffer,
378 [in,out,ref] uint32 *buffer_size
381 /******************/
382 /* Function: 0x1e */
383 WERROR winreg_InitiateSystemShutdownEx(
384 [in,unique] uint16 *hostname,
386 * Note: lsa_String and winreg_String both result
387 * in WERR_INVALID_PARAM
389 [in,unique] lsa_StringLarge *message,
390 [in] uint32 timeout,
391 [in] uint8 force_apps,
392 [in] uint8 do_reboot,
393 [in] uint32 reason
396 /******************/
397 /* Function: 0x1f */
398 [todo] WERROR winreg_SaveKeyEx(
401 /******************/
402 /* Function: 0x20 */
403 WERROR winreg_OpenHKPT(
404 [in,unique] uint16 *system_name,
405 [in] winreg_AccessMask access_mask,
406 [out,ref] policy_handle *handle
409 /******************/
410 /* Function: 0x21 */
411 WERROR winreg_OpenHKPN(
412 [in,unique] uint16 *system_name,
413 [in] winreg_AccessMask access_mask,
414 [out,ref] policy_handle *handle
417 /******************/
418 /* Function: 0x22 */
419 [todo] WERROR winreg_QueryMultipleValues2(