s4-smbtorture: add test_QueryServiceObjectSecurity() to RPC-SVCCTL test.
[Samba/gbeck.git] / librpc / idl / winreg.idl
blobb905bdea7bd0168e9fe68576c9ff05b6b8ccde11
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;
17 typedef [bitmap32bit] bitmap {
18 KEY_QUERY_VALUE = 0x00001,
19 KEY_SET_VALUE = 0x00002,
20 KEY_CREATE_SUB_KEY = 0x00004,
21 KEY_ENUMERATE_SUB_KEYS = 0x00008,
22 KEY_NOTIFY = 0x00010,
23 KEY_CREATE_LINK = 0x00020,
24 KEY_WOW64_64KEY = 0x00100,
25 KEY_WOW64_32KEY = 0x00200
26 } winreg_AccessMask;
28 typedef [public,v1_enum] enum {
29 REG_NONE = 0,
30 REG_SZ = 1,
31 REG_EXPAND_SZ = 2,
32 REG_BINARY = 3,
33 REG_DWORD = 4,
34 REG_DWORD_BIG_ENDIAN = 5,
35 REG_LINK = 6,
36 REG_MULTI_SZ = 7,
37 REG_RESOURCE_LIST = 8,
38 REG_FULL_RESOURCE_DESCRIPTOR = 9,
39 REG_RESOURCE_REQUIREMENTS_LIST = 10,
40 REG_QWORD = 11
41 } winreg_Type;
43 typedef [public] struct {
44 [value(strlen_m_term(name)*2)] uint16 name_len;
45 [value(strlen_m_term(name)*2)] uint16 name_size;
46 [string,charset(UTF16)] uint16 *name;
47 } winreg_String;
49 /******************/
50 /* Function: 0x00 */
51 WERROR winreg_OpenHKCR(
52 [in,unique] uint16 *system_name,
53 [in] winreg_AccessMask access_mask,
54 [out,ref] policy_handle *handle
57 /******************/
58 /* Function: 0x01 */
59 WERROR winreg_OpenHKCU(
60 [in,unique] uint16 *system_name,
61 [in] winreg_AccessMask access_mask,
62 [out,ref] policy_handle *handle
65 /******************/
66 /* Function: 0x02 */
67 [public] WERROR winreg_OpenHKLM(
68 [in,unique] uint16 *system_name,
69 [in] winreg_AccessMask access_mask,
70 [out,ref] policy_handle *handle
73 /******************/
74 /* Function: 0x03 */
75 WERROR winreg_OpenHKPD(
76 [in,unique] uint16 *system_name,
77 [in] winreg_AccessMask access_mask,
78 [out,ref] policy_handle *handle
81 /******************/
82 /* Function: 0x04 */
83 WERROR winreg_OpenHKU(
84 [in,unique] uint16 *system_name,
85 [in] winreg_AccessMask access_mask,
86 [out,ref] policy_handle *handle
89 /******************/
90 /* Function: 0x05 */
91 [public] WERROR winreg_CloseKey(
92 [in,out,ref] policy_handle *handle
95 /******************/
96 /* Function: 0x06 */
98 typedef struct {
99 [size_is(size),length_is(len)] uint8 *data;
100 uint32 size;
101 uint32 len;
102 } KeySecurityData;
104 typedef struct {
105 uint32 length;
106 KeySecurityData sd;
107 boolean8 inherit;
108 } winreg_SecBuf;
110 typedef [v1_enum] enum {
111 REG_ACTION_NONE = 0, /* used by caller */
112 REG_CREATED_NEW_KEY = 1,
113 REG_OPENED_EXISTING_KEY = 2
114 } winreg_CreateAction;
116 [public] WERROR winreg_CreateKey(
117 [in,ref] policy_handle *handle,
118 [in] winreg_String name,
119 [in] winreg_String keyclass,
120 [in] uint32 options,
121 [in] winreg_AccessMask access_mask,
122 [in,unique] winreg_SecBuf *secdesc,
123 [out,ref] policy_handle *new_handle,
124 [in,out,unique] winreg_CreateAction *action_taken
127 /******************/
128 /* Function: 0x07 */
129 [public] WERROR winreg_DeleteKey(
130 [in,ref] policy_handle *handle,
131 [in] winreg_String key
134 /******************/
135 /* Function: 0x08 */
136 WERROR winreg_DeleteValue(
137 [in,ref] policy_handle *handle,
138 [in] winreg_String value
141 typedef struct {
142 [value(strlen_m_term_null(name)*2)] uint16 length;
143 /* size cannot be auto-set by value() as it is the
144 amount of space the server is allowed to use for this
145 string in the reply, not its current size */
146 uint16 size;
147 [size_is(size/2),length_is(length/2),charset(UTF16)] uint16 *name;
148 } winreg_StringBuf;
150 /******************/
151 /* Function: 0x09 */
152 [public] WERROR winreg_EnumKey(
153 [in,ref] policy_handle *handle,
154 [in] uint32 enum_index,
155 [in,out,ref] winreg_StringBuf *name,
156 [in,out,unique] winreg_StringBuf *keyclass,
157 [in,out,unique] NTTIME *last_changed_time
160 typedef struct {
161 [value(strlen_m_term(name)*2)] uint16 length;
162 /* size cannot be auto-set by value() as it is the
163 amount of space the server is allowed to use for this
164 string in the reply, not its current size */
165 uint16 size;
166 [size_is(size/2),length_is(length/2),charset(UTF16)] uint16 *name;
167 } winreg_ValNameBuf;
169 /******************/
170 /* Function: 0x0a */
172 [public] WERROR winreg_EnumValue(
173 [in,ref] policy_handle *handle,
174 [in] uint32 enum_index,
175 [in,out,ref] winreg_ValNameBuf *name,
176 [in,out,unique] winreg_Type *type,
177 [in,out,unique,size_is(*size),length_is(*length)] uint8 *value,
178 [in,out,unique] uint32 *size,
179 [in,out,unique] uint32 *length
182 /******************/
183 /* Function: 0x0b */
184 [public] WERROR winreg_FlushKey(
185 [in,ref] policy_handle *handle
188 /******************/
189 /* Function: 0x0c */
190 [public] WERROR winreg_GetKeySecurity(
191 [in,ref] policy_handle *handle,
192 [in] security_secinfo sec_info,
193 [in,out,ref] KeySecurityData *sd
196 /******************/
197 /* Function: 0x0d */
198 WERROR winreg_LoadKey(
199 [in,ref] policy_handle *handle,
200 [in,unique] winreg_String *keyname,
201 [in,unique] winreg_String *filename
204 /******************/
205 /* Function: 0x0e */
206 typedef [public,bitmap32bit] bitmap {
207 REG_NOTIFY_CHANGE_NAME = 0x00000001,
208 REG_NOTIFY_CHANGE_ATTRIBUTES = 0x00000002,
209 REG_NOTIFY_CHANGE_LAST_SET = 0x00000004,
210 REG_NOTIFY_CHANGE_SECURITY = 0x00000008
211 } winreg_NotifyChangeType;
213 [public] WERROR winreg_NotifyChangeKeyValue(
214 [in,ref] policy_handle *handle,
215 [in] boolean8 watch_subtree,
216 [in] winreg_NotifyChangeType notify_filter,
217 [in] uint32 unknown,
218 [in] winreg_String string1,
219 [in] winreg_String string2,
220 [in] uint32 unknown2
223 /******************/
224 /* Function: 0x0f */
225 [public] WERROR winreg_OpenKey(
226 [in,ref] policy_handle *parent_handle,
227 [in] winreg_String keyname,
228 [in] uint32 unknown,
229 [in] winreg_AccessMask access_mask,
230 [out,ref] policy_handle *handle
233 /******************/
234 /* Function: 0x10 */
235 [public] WERROR winreg_QueryInfoKey(
236 [in,ref] policy_handle *handle,
237 [in,out,ref] winreg_String *classname,
238 [out,ref] uint32 *num_subkeys,
239 [out,ref] uint32 *max_subkeylen,
240 [out,ref] uint32 *max_classlen,
241 [out,ref] uint32 *num_values,
242 [out,ref] uint32 *max_valnamelen,
243 [out,ref] uint32 *max_valbufsize,
244 [out,ref] uint32 *secdescsize,
245 [out,ref] NTTIME *last_changed_time
248 /******************/
249 /* Function: 0x11 */
250 [public] WERROR winreg_QueryValue(
251 [in,ref] policy_handle *handle,
252 [in,ref] winreg_String *value_name,
253 [in,out,unique] winreg_Type *type,
254 [in,out,unique,size_is(*data_size),length_is(*data_length)] uint8 *data,
255 [in,out,unique] uint32 *data_size,
256 [in,out,unique] uint32 *data_length
259 /******************/
260 /* Function: 0x12 */
261 [todo] WERROR winreg_ReplaceKey(
264 /******************/
265 /* Function: 0x13 */
266 WERROR winreg_RestoreKey(
267 [in,ref] policy_handle *handle,
268 [in,ref] winreg_String *filename,
269 [in] uint32 flags
272 /******************/
273 /* Function: 0x14 */
275 typedef struct {
276 uint32 data_size;
277 KeySecurityData sec_data;
278 uint8 inherit;
279 } KeySecurityAttribute;
281 WERROR winreg_SaveKey(
282 [in,ref] policy_handle *handle,
283 [in,ref] winreg_String *filename,
284 [in,unique] KeySecurityAttribute *sec_attrib
287 /******************/
288 /* Function: 0x15 */
289 WERROR winreg_SetKeySecurity(
290 [in,ref] policy_handle *handle,
291 [in] security_secinfo sec_info,
292 [in,ref] KeySecurityData *sd
295 /******************/
296 /* Function: 0x16 */
297 WERROR winreg_SetValue(
298 [in,ref] policy_handle *handle,
299 [in] winreg_String name,
300 [in] winreg_Type type,
301 [in,size_is(size),ref] uint8 *data,
302 [in] uint32 size
305 /******************/
306 /* Function: 0x17 */
307 [todo] WERROR winreg_UnLoadKey(
310 /******************/
311 /* Function: 0x18 */
312 WERROR winreg_InitiateSystemShutdown(
313 [in,unique] uint16 *hostname,
315 * Note: lsa_String and winreg_String both result
316 * in WERR_INVALID_PARAM
318 [in,unique] lsa_StringLarge *message,
319 [in] uint32 timeout,
320 [in] uint8 force_apps,
321 [in] uint8 do_reboot
324 /******************/
325 /* Function: 0x19 */
326 WERROR winreg_AbortSystemShutdown(
327 [in,unique] uint16 *server
330 /******************/
331 /* Function: 0x1a */
332 [public] WERROR winreg_GetVersion(
333 [in,ref] policy_handle *handle,
334 [out,ref] uint32 *version
337 /******************/
338 /* Function: 0x1b */
339 WERROR winreg_OpenHKCC(
340 [in,unique] uint16 *system_name,
341 [in] winreg_AccessMask access_mask,
342 [out,ref] policy_handle *handle
345 /******************/
346 /* Function: 0x1c */
347 WERROR winreg_OpenHKDD(
348 [in,unique] uint16 *system_name,
349 [in] winreg_AccessMask access_mask,
350 [out,ref] policy_handle *handle
353 typedef struct {
354 winreg_String *name;
355 winreg_Type type;
356 uint32 offset;
357 uint32 length;
358 } QueryMultipleValue;
360 /******************/
361 /* Function: 0x1d */
362 [public] WERROR winreg_QueryMultipleValues(
363 [in,ref] policy_handle *key_handle,
364 [in,out,ref,size_is(num_values),length_is(num_values)] QueryMultipleValue *values,
365 [in] uint32 num_values,
366 [in,out,unique,size_is(*buffer_size),length_is(*buffer_size)] uint8 *buffer,
367 [in,out,ref] uint32 *buffer_size
370 /******************/
371 /* Function: 0x1e */
372 WERROR winreg_InitiateSystemShutdownEx(
373 [in,unique] uint16 *hostname,
375 * Note: lsa_String and winreg_String both result
376 * in WERR_INVALID_PARAM
378 [in,unique] lsa_StringLarge *message,
379 [in] uint32 timeout,
380 [in] uint8 force_apps,
381 [in] uint8 do_reboot,
382 [in] uint32 reason
385 /******************/
386 /* Function: 0x1f */
387 [todo] WERROR winreg_SaveKeyEx(
390 /******************/
391 /* Function: 0x20 */
392 WERROR winreg_OpenHKPT(
393 [in,unique] uint16 *system_name,
394 [in] winreg_AccessMask access_mask,
395 [out,ref] policy_handle *handle
398 /******************/
399 /* Function: 0x21 */
400 WERROR winreg_OpenHKPN(
401 [in,unique] uint16 *system_name,
402 [in] winreg_AccessMask access_mask,
403 [out,ref] policy_handle *handle
406 /******************/
407 /* Function: 0x22 */
408 [todo] WERROR winreg_QueryMultipleValues2(