2 winreg interface definition
5 import "lsa.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;
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,
27 KEY_CREATE_LINK = 0x00020,
28 KEY_WOW64_64KEY = 0x00100,
29 KEY_WOW64_32KEY = 0x00200
32 const int REG_KEY_READ = ( STANDARD_RIGHTS_READ_ACCESS |
34 KEY_ENUMERATE_SUB_KEYS |
37 const int REG_KEY_EXECUTE = REG_KEY_READ;
39 const int REG_KEY_WRITE = ( STANDARD_RIGHTS_WRITE_ACCESS |
43 const int REG_KEY_ALL = ( STANDARD_RIGHTS_REQUIRED_ACCESS |
48 typedef [public,v1_enum] enum {
54 REG_DWORD_BIG_ENDIAN = 5,
57 REG_RESOURCE_LIST = 8,
58 REG_FULL_RESOURCE_DESCRIPTOR = 9,
59 REG_RESOURCE_REQUIREMENTS_LIST = 10,
63 typedef [public] struct {
64 [value(strlen_m_term(name)*2)] uint16 name_len;
65 [value(strlen_m_term(name)*2)] uint16 name_size;
66 [string,charset(UTF16)] uint16 *name;
71 WERROR winreg_OpenHKCR(
72 [in,unique] uint16 *system_name,
73 [in] winreg_AccessMask access_mask,
74 [out,ref] policy_handle *handle
79 WERROR winreg_OpenHKCU(
80 [in,unique] uint16 *system_name,
81 [in] winreg_AccessMask access_mask,
82 [out,ref] policy_handle *handle
87 [public] WERROR winreg_OpenHKLM(
88 [in,unique] uint16 *system_name,
89 [in] winreg_AccessMask access_mask,
90 [out,ref] policy_handle *handle
95 WERROR winreg_OpenHKPD(
96 [in,unique] uint16 *system_name,
97 [in] winreg_AccessMask access_mask,
98 [out,ref] policy_handle *handle
103 WERROR winreg_OpenHKU(
104 [in,unique] uint16 *system_name,
105 [in] winreg_AccessMask access_mask,
106 [out,ref] policy_handle *handle
111 [public] WERROR winreg_CloseKey(
112 [in,out,ref] policy_handle *handle
119 [size_is(size),length_is(len)] uint8 *data;
130 typedef [v1_enum] enum {
131 REG_ACTION_NONE = 0, /* used by caller */
132 REG_CREATED_NEW_KEY = 1,
133 REG_OPENED_EXISTING_KEY = 2
134 } winreg_CreateAction;
136 [public] WERROR winreg_CreateKey(
137 [in,ref] policy_handle *handle,
138 [in] winreg_String name,
139 [in] winreg_String keyclass,
141 [in] winreg_AccessMask access_mask,
142 [in,unique] winreg_SecBuf *secdesc,
143 [out,ref] policy_handle *new_handle,
144 [in,out,unique] winreg_CreateAction *action_taken
149 [public] WERROR winreg_DeleteKey(
150 [in,ref] policy_handle *handle,
151 [in] winreg_String key
156 WERROR winreg_DeleteValue(
157 [in,ref] policy_handle *handle,
158 [in] winreg_String value
162 [value(strlen_m_term_null(name)*2)] uint16 length;
163 /* size cannot be auto-set by value() as it is the
164 amount of space the server is allowed to use for this
165 string in the reply, not its current size */
167 [size_is(size/2),length_is(length/2),charset(UTF16)] uint16 *name;
172 [public] WERROR winreg_EnumKey(
173 [in,ref] policy_handle *handle,
174 [in] uint32 enum_index,
175 [in,out,ref] winreg_StringBuf *name,
176 [in,out,unique] winreg_StringBuf *keyclass,
177 [in,out,unique] NTTIME *last_changed_time
181 [value(strlen_m_term(name)*2)] uint16 length;
182 /* size cannot be auto-set by value() as it is the
183 amount of space the server is allowed to use for this
184 string in the reply, not its current size */
186 [size_is(size/2),length_is(length/2),charset(UTF16)] uint16 *name;
192 [public] WERROR winreg_EnumValue(
193 [in,ref] policy_handle *handle,
194 [in] uint32 enum_index,
195 [in,out,ref] winreg_ValNameBuf *name,
196 [in,out,unique] winreg_Type *type,
197 [in,out,unique,size_is(*size),length_is(*length)] uint8 *value,
198 [in,out,unique] uint32 *size,
199 [in,out,unique] uint32 *length
204 [public] WERROR winreg_FlushKey(
205 [in,ref] policy_handle *handle
210 [public] WERROR winreg_GetKeySecurity(
211 [in,ref] policy_handle *handle,
212 [in] security_secinfo sec_info,
213 [in,out,ref] KeySecurityData *sd
218 WERROR winreg_LoadKey(
219 [in,ref] policy_handle *handle,
220 [in,unique] winreg_String *keyname,
221 [in,unique] winreg_String *filename
226 typedef [public,bitmap32bit] bitmap {
227 REG_NOTIFY_CHANGE_NAME = 0x00000001,
228 REG_NOTIFY_CHANGE_ATTRIBUTES = 0x00000002,
229 REG_NOTIFY_CHANGE_LAST_SET = 0x00000004,
230 REG_NOTIFY_CHANGE_SECURITY = 0x00000008
231 } winreg_NotifyChangeType;
233 [public] WERROR winreg_NotifyChangeKeyValue(
234 [in,ref] policy_handle *handle,
235 [in] boolean8 watch_subtree,
236 [in] winreg_NotifyChangeType notify_filter,
238 [in] winreg_String string1,
239 [in] winreg_String string2,
245 [public] WERROR winreg_OpenKey(
246 [in,ref] policy_handle *parent_handle,
247 [in] winreg_String keyname,
249 [in] winreg_AccessMask access_mask,
250 [out,ref] policy_handle *handle
255 [public] WERROR winreg_QueryInfoKey(
256 [in,ref] policy_handle *handle,
257 [in,out,ref] winreg_String *classname,
258 [out,ref] uint32 *num_subkeys,
259 [out,ref] uint32 *max_subkeylen,
260 [out,ref] uint32 *max_classlen,
261 [out,ref] uint32 *num_values,
262 [out,ref] uint32 *max_valnamelen,
263 [out,ref] uint32 *max_valbufsize,
264 [out,ref] uint32 *secdescsize,
265 [out,ref] NTTIME *last_changed_time
270 [public] WERROR winreg_QueryValue(
271 [in,ref] policy_handle *handle,
272 [in,ref] winreg_String *value_name,
273 [in,out,unique] winreg_Type *type,
274 [in,out,unique,size_is(*data_size),length_is(*data_length)] uint8 *data,
275 [in,out,unique] uint32 *data_size,
276 [in,out,unique] uint32 *data_length
281 [todo] WERROR winreg_ReplaceKey(
286 WERROR winreg_RestoreKey(
287 [in,ref] policy_handle *handle,
288 [in,ref] winreg_String *filename,
297 KeySecurityData sec_data;
299 } KeySecurityAttribute;
301 WERROR winreg_SaveKey(
302 [in,ref] policy_handle *handle,
303 [in,ref] winreg_String *filename,
304 [in,unique] KeySecurityAttribute *sec_attrib
309 WERROR winreg_SetKeySecurity(
310 [in,ref] policy_handle *handle,
311 [in] security_secinfo sec_info,
312 [in,ref] KeySecurityData *sd
317 WERROR winreg_SetValue(
318 [in,ref] policy_handle *handle,
319 [in] winreg_String name,
320 [in] winreg_Type type,
321 [in,size_is(size),ref] uint8 *data,
327 [todo] WERROR winreg_UnLoadKey(
332 WERROR winreg_InitiateSystemShutdown(
333 [in,unique] uint16 *hostname,
335 * Note: lsa_String and winreg_String both result
336 * in WERR_INVALID_PARAM
338 [in,unique] lsa_StringLarge *message,
340 [in] uint8 force_apps,
346 WERROR winreg_AbortSystemShutdown(
347 [in,unique] uint16 *server
352 [public] WERROR winreg_GetVersion(
353 [in,ref] policy_handle *handle,
354 [out,ref] uint32 *version
359 WERROR winreg_OpenHKCC(
360 [in,unique] uint16 *system_name,
361 [in] winreg_AccessMask access_mask,
362 [out,ref] policy_handle *handle
367 WERROR winreg_OpenHKDD(
368 [in,unique] uint16 *system_name,
369 [in] winreg_AccessMask access_mask,
370 [out,ref] policy_handle *handle
378 } QueryMultipleValue;
382 [public] WERROR winreg_QueryMultipleValues(
383 [in,ref] policy_handle *key_handle,
384 [in,out,ref,size_is(num_values),length_is(num_values)] QueryMultipleValue *values,
385 [in] uint32 num_values,
386 [in,out,unique,size_is(*buffer_size),length_is(*buffer_size)] uint8 *buffer,
387 [in,out,ref] uint32 *buffer_size
392 WERROR winreg_InitiateSystemShutdownEx(
393 [in,unique] uint16 *hostname,
395 * Note: lsa_String and winreg_String both result
396 * in WERR_INVALID_PARAM
398 [in,unique] lsa_StringLarge *message,
400 [in] uint8 force_apps,
401 [in] uint8 do_reboot,
407 [todo] WERROR winreg_SaveKeyEx(
412 WERROR winreg_OpenHKPT(
413 [in,unique] uint16 *system_name,
414 [in] winreg_AccessMask access_mask,
415 [out,ref] policy_handle *handle
420 WERROR winreg_OpenHKPN(
421 [in,unique] uint16 *system_name,
422 [in] winreg_AccessMask access_mask,
423 [out,ref] policy_handle *handle
428 [todo] WERROR winreg_QueryMultipleValues2(