2 winreg interface definition
5 import "lsa.idl", "initshutdown.idl", "security.idl";
8 uuid("338cd001-2244-31f1-aaaa-900038001003"),
10 endpoint("ncacn_np:[\\pipe\\winreg]","ncacn_ip_tcp:","ncalrpc:"),
11 pointer_default(unique),
12 helpstring("Remote Registry Service")
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,
23 KEY_CREATE_LINK = 0x00020,
24 KEY_WOW64_64KEY = 0x00100,
25 KEY_WOW64_32KEY = 0x00200
28 typedef [v1_enum] enum {
34 REG_DWORD_BIG_ENDIAN = 5,
37 REG_RESOURCE_LIST = 8,
38 REG_FULL_RESOURCE_DESCRIPTOR = 9,
39 REG_RESOURCE_REQUIREMENTS_LIST = 10,
43 typedef [public,noejs] 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;
51 WERROR winreg_OpenHKCR(
52 [in,unique] uint16 *system_name,
53 [in] winreg_AccessMask access_mask,
54 [out,ref] policy_handle *handle
59 WERROR winreg_OpenHKCU(
60 [in,unique] uint16 *system_name,
61 [in] winreg_AccessMask access_mask,
62 [out,ref] policy_handle *handle
67 WERROR winreg_OpenHKLM(
68 [in,unique] uint16 *system_name,
69 [in] winreg_AccessMask access_mask,
70 [out,ref] policy_handle *handle
75 WERROR winreg_OpenHKPD(
76 [in,unique] uint16 *system_name,
77 [in] winreg_AccessMask access_mask,
78 [out,ref] policy_handle *handle
83 WERROR winreg_OpenHKU(
84 [in,unique] uint16 *system_name,
85 [in] winreg_AccessMask access_mask,
86 [out,ref] policy_handle *handle
91 WERROR winreg_CloseKey(
92 [in,out,ref] policy_handle *handle
99 [size_is(size),length_is(len)] uint8 *data;
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 WERROR winreg_CreateKey(
117 [in,ref] policy_handle *handle,
118 [in] winreg_String name,
119 [in] winreg_String keyclass,
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
129 WERROR winreg_DeleteKey(
130 [in,ref] policy_handle *handle,
131 [in] winreg_String key
136 WERROR winreg_DeleteValue(
137 [in,ref] policy_handle *handle,
138 [in] winreg_String value
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 */
147 [size_is(size/2),length_is(length/2),charset(UTF16)] uint16 *name;
152 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
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 */
166 [size_is(size/2),length_is(length/2),charset(UTF16)] uint16 *name;
172 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
184 WERROR winreg_FlushKey(
185 [in,ref] policy_handle *handle
190 WERROR winreg_GetKeySecurity(
191 [in,ref] policy_handle *handle,
192 [in] security_secinfo sec_info,
193 [in,out,ref] KeySecurityData *sd
198 WERROR winreg_LoadKey(
199 [in,ref] policy_handle *handle,
200 [in,unique] winreg_String *keyname,
201 [in,unique] winreg_String *filename
206 WERROR winreg_NotifyChangeKeyValue(
207 [in,ref] policy_handle *handle,
208 [in] uint8 watch_subtree,
209 [in] uint32 notify_filter,
211 [in] winreg_String string1,
212 [in] winreg_String string2,
218 WERROR winreg_OpenKey(
219 [in,ref] policy_handle *parent_handle,
220 [in] winreg_String keyname,
222 [in] winreg_AccessMask access_mask,
223 [out,ref] policy_handle *handle
228 WERROR winreg_QueryInfoKey(
229 [in,ref] policy_handle *handle,
230 [in,out,ref] winreg_String *classname,
231 [out,ref] uint32 *num_subkeys,
232 [out,ref] uint32 *max_subkeylen,
233 [out,ref] uint32 *max_classlen,
234 [out,ref] uint32 *num_values,
235 [out,ref] uint32 *max_valnamelen,
236 [out,ref] uint32 *max_valbufsize,
237 [out,ref] uint32 *secdescsize,
238 [out,ref] NTTIME *last_changed_time
243 WERROR winreg_QueryValue(
244 [in,ref] policy_handle *handle,
245 [in,ref] winreg_String *value_name,
246 [in,out,unique] winreg_Type *type,
247 [in,out,unique,size_is(*data_size),length_is(*value_length)] uint8 *data,
248 [in,out,unique] uint32 *data_size,
249 [in,out,unique] uint32 *value_length
254 WERROR winreg_ReplaceKey(
259 WERROR winreg_RestoreKey(
260 [in,ref] policy_handle *handle,
261 [in,ref] winreg_String *filename,
270 KeySecurityData sec_data;
272 } KeySecurityAttribute;
274 WERROR winreg_SaveKey(
275 [in,ref] policy_handle *handle,
276 [in,ref] winreg_String *filename,
277 [in,unique] KeySecurityAttribute *sec_attrib
282 WERROR winreg_SetKeySecurity(
283 [in,ref] policy_handle *handle,
284 [in] winreg_AccessMask access_mask,
285 [in,ref] KeySecurityData *sd
290 WERROR winreg_SetValue(
291 [in,ref] policy_handle *handle,
292 [in] winreg_String name,
293 [in] winreg_Type type,
294 [in,size_is(size),ref] uint8 *data,
300 [todo] WERROR winreg_UnLoadKey(
305 WERROR winreg_InitiateSystemShutdown(
306 [in,unique] uint16 *hostname,
307 [in,unique] initshutdown_String *message,
309 [in] uint8 force_apps,
315 WERROR winreg_AbortSystemShutdown(
316 [in,unique] uint16 *server
321 WERROR winreg_GetVersion(
322 [in,ref] policy_handle *handle,
323 [out,ref] uint32 *version
328 WERROR winreg_OpenHKCC(
329 [in,unique] uint16 *system_name,
330 [in] winreg_AccessMask access_mask,
331 [out,ref] policy_handle *handle
336 WERROR winreg_OpenHKDD(
337 [in,unique] uint16 *system_name,
338 [in] winreg_AccessMask access_mask,
339 [out,ref] policy_handle *handle
347 } QueryMultipleValue;
351 WERROR winreg_QueryMultipleValues(
352 [in,ref] policy_handle *key_handle,
353 [in,out,ref,size_is(num_values),length_is(num_values)] QueryMultipleValue *values,
354 [in] uint32 num_values,
355 [in,out,unique,size_is(*buffer_size),length_is(*buffer_size)] uint8 *buffer,
356 [in,out,ref] uint32 *buffer_size
361 WERROR winreg_InitiateSystemShutdownEx(
362 [in,unique] uint16 *hostname,
363 [in,unique] initshutdown_String *message,
365 [in] uint8 force_apps,
366 [in] uint8 do_reboot,
372 [todo] WERROR winreg_SaveKeyEx(
377 WERROR winreg_OpenHKPT(
378 [in,unique] uint16 *system_name,
379 [in] winreg_AccessMask access_mask,
380 [out,ref] policy_handle *handle
385 WERROR winreg_OpenHKPN(
386 [in,unique] uint16 *system_name,
387 [in] winreg_AccessMask access_mask,
388 [out,ref] policy_handle *handle
393 [todo] WERROR winreg_QueryMultipleValues2(