r21348: Fix the build.
[Samba/ekacnet.git] / source4 / librpc / idl / winreg.idl
blob58da3a5d56350f2c9ed82716e9bf91d652f49329
1 /*
2 winreg interface definition
3 */
5 import "lsa.idl", "initshutdown.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 pointer_default_top(unique),
13 helpstring("Remote Registry Service")
14 ] interface winreg
16 declare bitmap security_secinfo;
18 typedef [bitmap32bit] bitmap {
19 KEY_QUERY_VALUE = 0x00001,
20 KEY_SET_VALUE = 0x00002,
21 KEY_CREATE_SUB_KEY = 0x00004,
22 KEY_ENUMERATE_SUB_KEYS = 0x00008,
23 KEY_NOTIFY = 0x00010,
24 KEY_CREATE_LINK = 0x00020,
25 KEY_WOW64_64KEY = 0x00100,
26 KEY_WOW64_32KEY = 0x00200
27 } winreg_AccessMask;
29 typedef [v1_enum] enum {
30 REG_NONE = 0,
31 REG_SZ = 1,
32 REG_EXPAND_SZ = 2,
33 REG_BINARY = 3,
34 REG_DWORD = 4,
35 REG_DWORD_BIG_ENDIAN = 5,
36 REG_LINK = 6,
37 REG_MULTI_SZ = 7,
38 REG_RESOURCE_LIST = 8,
39 REG_FULL_RESOURCE_DESCRIPTOR = 9,
40 REG_RESOURCE_REQUIREMENTS_LIST = 10,
41 REG_QWORD = 11
42 } winreg_Type;
44 typedef [public,noejs] struct {
45 [value(strlen_m_term(name)*2)] uint16 name_len;
46 [value(strlen_m_term(name)*2)] uint16 name_size;
47 [string,charset(UTF16)] uint16 *name;
48 } winreg_String;
50 /******************/
51 /* Function: 0x00 */
52 WERROR winreg_OpenHKCR(
53 [in] uint16 *system_name,
54 [in] winreg_AccessMask access_mask,
55 [out,ref] policy_handle *handle
58 /******************/
59 /* Function: 0x01 */
60 WERROR winreg_OpenHKCU(
61 [in] uint16 *system_name,
62 [in] winreg_AccessMask access_mask,
63 [out,ref] policy_handle *handle
66 /******************/
67 /* Function: 0x02 */
68 WERROR winreg_OpenHKLM(
69 [in] uint16 *system_name,
70 [in] winreg_AccessMask access_mask,
71 [out,ref] policy_handle *handle
74 /******************/
75 /* Function: 0x03 */
76 WERROR winreg_OpenHKPD(
77 [in] uint16 *system_name,
78 [in] winreg_AccessMask access_mask,
79 [out,ref] policy_handle *handle
82 /******************/
83 /* Function: 0x04 */
84 WERROR winreg_OpenHKU(
85 [in] uint16 *system_name,
86 [in] winreg_AccessMask access_mask,
87 [out,ref] policy_handle *handle
90 /******************/
91 /* Function: 0x05 */
92 [public] WERROR winreg_CloseKey(
93 [in,out,ref] policy_handle *handle
96 /******************/
97 /* Function: 0x06 */
99 typedef struct {
100 [size_is(size),length_is(len)] uint8 *data;
101 uint32 size;
102 uint32 len;
103 } KeySecurityData;
105 typedef struct {
106 uint32 length;
107 KeySecurityData sd;
108 boolean8 inherit;
109 } winreg_SecBuf;
111 typedef [v1_enum] enum {
112 REG_ACTION_NONE = 0, /* used by caller */
113 REG_CREATED_NEW_KEY = 1,
114 REG_OPENED_EXISTING_KEY = 2
115 } winreg_CreateAction;
117 WERROR winreg_CreateKey(
118 [in,ref] policy_handle *handle,
119 [in] winreg_String name,
120 [in] winreg_String keyclass,
121 [in] uint32 options,
122 [in] winreg_AccessMask access_mask,
123 [in,unique] winreg_SecBuf *secdesc,
124 [out,ref] policy_handle *new_handle,
125 [in,out,unique] winreg_CreateAction *action_taken
128 /******************/
129 /* Function: 0x07 */
130 WERROR winreg_DeleteKey(
131 [in,ref] policy_handle *handle,
132 [in] winreg_String key
135 /******************/
136 /* Function: 0x08 */
137 WERROR winreg_DeleteValue(
138 [in,ref] policy_handle *handle,
139 [in] winreg_String value
142 typedef struct {
143 [value(strlen_m_term(name)*2)] uint16 length;
144 /* size cannot be auto-set by value() as it is the
145 amount of space the server is allowed to use for this
146 string in the reply, not its current size */
147 uint16 size;
148 [size_is(size/2),length_is(length/2),charset(UTF16)] uint16 *name;
149 } winreg_StringBuf;
151 WERROR winreg_EnumKey(
152 [in,ref] policy_handle *handle,
153 [in] uint32 enum_index,
154 [in,out,ref] winreg_StringBuf *name,
155 [in,out,unique] winreg_StringBuf *keyclass,
156 [in,out,unique] NTTIME *last_changed_time
159 /******************/
160 /* Function: 0x0a */
162 WERROR winreg_EnumValue(
163 [in,ref] policy_handle *handle,
164 [in] uint32 enum_index,
165 [in,out,ref] winreg_StringBuf *name,
166 [in,out,unique] winreg_Type *type,
167 [in,out,unique,size_is(*size),length_is(*length)] uint8 *value,
168 [in,out,unique] uint32 *size,
169 [in,out,unique] uint32 *length
172 /******************/
173 /* Function: 0x0b */
174 WERROR winreg_FlushKey(
175 [in,ref] policy_handle *handle
178 /******************/
179 /* Function: 0x0c */
180 WERROR winreg_GetKeySecurity(
181 [in,ref] policy_handle *handle,
182 [in] security_secinfo sec_info,
183 [in,out,ref] KeySecurityData *sd
186 /******************/
187 /* Function: 0x0d */
188 WERROR winreg_LoadKey(
189 [in,ref] policy_handle *handle,
190 [in] winreg_String *keyname,
191 [in] winreg_String *filename
194 /******************/
195 /* Function: 0x0e */
196 WERROR winreg_NotifyChangeKeyValue(
197 [in,ref] policy_handle *handle,
198 [in] uint8 watch_subtree,
199 [in] uint32 notify_filter,
200 [in] uint32 unknown,
201 [in] winreg_String string1,
202 [in] winreg_String string2,
203 [in] uint32 unknown2
206 /******************/
207 /* Function: 0x0f */
208 WERROR winreg_OpenKey(
209 [in,ref] policy_handle *parent_handle,
210 [in] winreg_String keyname,
211 [in] uint32 unknown,
212 [in] winreg_AccessMask access_mask,
213 [out,ref] policy_handle *handle
216 /******************/
217 /* Function: 0x10 */
218 WERROR winreg_QueryInfoKey(
219 [in,ref] policy_handle *handle,
220 [in,out,ref] winreg_String *class_in,
221 [out,ref] uint32 *num_subkeys,
222 [out,ref] uint32 *max_subkeylen,
223 [out,ref] uint32 *max_subkeysize,
224 [out,ref] uint32 *num_values,
225 [out,ref] uint32 *max_valnamelen,
226 [out,ref] uint32 *max_valbufsize,
227 [out,ref] uint32 *secdescsize,
228 [out,ref] NTTIME *last_changed_time
231 /******************/
232 /* Function: 0x11 */
233 WERROR winreg_QueryValue(
234 [in,ref] policy_handle *handle,
235 [in] winreg_String value_name,
236 [in,out] winreg_Type *type,
237 [in,out,size_is(*size),length_is(*length)] uint8 *data,
238 [in,out] uint32 *size,
239 [in,out] uint32 *length
242 /******************/
243 /* Function: 0x12 */
244 WERROR winreg_ReplaceKey(
247 /******************/
248 /* Function: 0x13 */
249 WERROR winreg_RestoreKey(
252 /******************/
253 /* Function: 0x14 */
254 WERROR winreg_SaveKey(
257 /******************/
258 /* Function: 0x15 */
259 WERROR winreg_SetKeySecurity(
260 [in,ref] policy_handle *handle,
261 [in] winreg_AccessMask access_mask,
262 [in,out,ref] KeySecurityData *sd
265 /******************/
266 /* Function: 0x16 */
267 WERROR winreg_SetValue(
268 [in,ref] policy_handle *handle,
269 [in] winreg_String name,
270 [in] winreg_Type type,
271 [in,size_is(size),ref] uint8 *data,
272 [in] uint32 size
275 /******************/
276 /* Function: 0x17 */
277 WERROR winreg_UnLoadKey(
280 /******************/
281 /* Function: 0x18 */
282 WERROR winreg_InitiateSystemShutdown(
283 [in] uint16 *hostname,
284 [in] initshutdown_String *message,
285 [in] uint32 timeout,
286 [in] uint8 force_apps,
287 [in] uint8 reboot
290 /******************/
291 /* Function: 0x19 */
292 WERROR winreg_AbortSystemShutdown(
293 [in] uint16 *server
296 /******************/
297 /* Function: 0x1a */
298 WERROR winreg_GetVersion(
299 [in,ref] policy_handle *handle,
300 [out,ref] uint32 *version
303 /******************/
304 /* Function: 0x1b */
305 WERROR winreg_OpenHKCC(
306 [in] uint16 *system_name,
307 [in] winreg_AccessMask access_mask,
308 [out,ref] policy_handle *handle
311 /******************/
312 /* Function: 0x1c */
313 WERROR winreg_OpenHKDD(
314 [in] uint16 *system_name,
315 [in] winreg_AccessMask access_mask,
316 [out,ref] policy_handle *handle
319 typedef struct {
320 winreg_String *name;
321 winreg_Type type;
322 uint32 offset;
323 uint32 length;
324 } QueryMultipleValue;
326 /******************/
327 /* Function: 0x1d */
328 WERROR winreg_QueryMultipleValues(
329 [in,ref] policy_handle *key_handle,
330 [in,out,ref,size_is(num_values),length_is(num_values)] QueryMultipleValue *values,
331 [in] uint32 num_values,
332 [in,out,size_is(*buffer_size),length_is(*buffer_size)] uint8 *buffer,
333 [in,out,ref] uint32 *buffer_size
336 /******************/
337 /* Function: 0x1e */
338 WERROR winreg_InitiateSystemShutdownEx(
339 [in] uint16 *hostname,
340 [in] initshutdown_String *message,
341 [in] uint32 timeout,
342 [in] uint8 force_apps,
343 [in] uint8 reboot,
344 [in] uint32 reason
347 /******************/
348 /* Function: 0x1f */
349 WERROR winreg_SaveKeyEx(
352 /******************/
353 /* Function: 0x20 */
354 WERROR winreg_OpenHKPT(
355 [in] uint16 *system_name,
356 [in] winreg_AccessMask access_mask,
357 [out,ref] policy_handle *handle
360 /******************/
361 /* Function: 0x21 */
362 WERROR winreg_OpenHKPN(
363 [in] uint16 *system_name,
364 [in] winreg_AccessMask access_mask,
365 [out,ref] policy_handle *handle
368 /******************/
369 /* Function: 0x22 */
370 WERROR winreg_QueryMultipleValues2(