2 winreg interface definition
5 import "lsa.idl", "security.idl", "misc.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] 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;
56 WERROR winreg_OpenHKCR(
57 [in,unique] uint16 *system_name,
58 [in] winreg_AccessMask access_mask,
59 [out,ref] policy_handle *handle
64 WERROR winreg_OpenHKCU(
65 [in,unique] uint16 *system_name,
66 [in] winreg_AccessMask access_mask,
67 [out,ref] policy_handle *handle
72 [public] WERROR winreg_OpenHKLM(
73 [in,unique] uint16 *system_name,
74 [in] winreg_AccessMask access_mask,
75 [out,ref] policy_handle *handle
80 WERROR winreg_OpenHKPD(
81 [in,unique] uint16 *system_name,
82 [in] winreg_AccessMask access_mask,
83 [out,ref] policy_handle *handle
88 WERROR winreg_OpenHKU(
89 [in,unique] uint16 *system_name,
90 [in] winreg_AccessMask access_mask,
91 [out,ref] policy_handle *handle
96 [public] WERROR winreg_CloseKey(
97 [in,out,ref] policy_handle *handle
104 [size_is(size),length_is(len)] uint8 *data;
115 typedef [v1_enum] enum {
116 REG_ACTION_NONE = 0, /* used by caller */
117 REG_CREATED_NEW_KEY = 1,
118 REG_OPENED_EXISTING_KEY = 2
119 } winreg_CreateAction;
121 [public] WERROR winreg_CreateKey(
122 [in,ref] policy_handle *handle,
123 [in] winreg_String name,
124 [in] winreg_String keyclass,
126 [in] winreg_AccessMask access_mask,
127 [in,unique] winreg_SecBuf *secdesc,
128 [out,ref] policy_handle *new_handle,
129 [in,out,unique] winreg_CreateAction *action_taken
134 [public] WERROR winreg_DeleteKey(
135 [in,ref] policy_handle *handle,
136 [in] winreg_String key
141 WERROR winreg_DeleteValue(
142 [in,ref] policy_handle *handle,
143 [in] winreg_String value
147 [value(strlen_m_term_null(name)*2)] uint16 length;
148 /* size cannot be auto-set by value() as it is the
149 amount of space the server is allowed to use for this
150 string in the reply, not its current size */
152 [size_is(size/2),length_is(length/2),charset(UTF16)] uint16 *name;
157 [public] WERROR winreg_EnumKey(
158 [in,ref] policy_handle *handle,
159 [in] uint32 enum_index,
160 [in,out,ref] winreg_StringBuf *name,
161 [in,out,unique] winreg_StringBuf *keyclass,
162 [in,out,unique] NTTIME *last_changed_time
166 [value(strlen_m_term(name)*2)] uint16 length;
167 /* size cannot be auto-set by value() as it is the
168 amount of space the server is allowed to use for this
169 string in the reply, not its current size */
171 [size_is(size/2),length_is(length/2),charset(UTF16)] uint16 *name;
177 [public] WERROR winreg_EnumValue(
178 [in,ref] policy_handle *handle,
179 [in] uint32 enum_index,
180 [in,out,ref] winreg_ValNameBuf *name,
181 [in,out,unique] winreg_Type *type,
182 [in,out,unique,size_is(*size),length_is(*length)] uint8 *value,
183 [in,out,unique] uint32 *size,
184 [in,out,unique] uint32 *length
189 [public] WERROR winreg_FlushKey(
190 [in,ref] policy_handle *handle
195 [public] WERROR winreg_GetKeySecurity(
196 [in,ref] policy_handle *handle,
197 [in] security_secinfo sec_info,
198 [in,out,ref] KeySecurityData *sd
203 WERROR winreg_LoadKey(
204 [in,ref] policy_handle *handle,
205 [in,unique] winreg_String *keyname,
206 [in,unique] winreg_String *filename
211 typedef [public,bitmap32bit] bitmap {
212 REG_NOTIFY_CHANGE_NAME = 0x00000001,
213 REG_NOTIFY_CHANGE_ATTRIBUTES = 0x00000002,
214 REG_NOTIFY_CHANGE_LAST_SET = 0x00000004,
215 REG_NOTIFY_CHANGE_SECURITY = 0x00000008
216 } winreg_NotifyChangeType;
218 [public] WERROR winreg_NotifyChangeKeyValue(
219 [in,ref] policy_handle *handle,
220 [in] boolean8 watch_subtree,
221 [in] winreg_NotifyChangeType notify_filter,
223 [in] winreg_String string1,
224 [in] winreg_String string2,
230 [public] WERROR winreg_OpenKey(
231 [in,ref] policy_handle *parent_handle,
232 [in] winreg_String keyname,
234 [in] winreg_AccessMask access_mask,
235 [out,ref] policy_handle *handle
240 [public] WERROR winreg_QueryInfoKey(
241 [in,ref] policy_handle *handle,
242 [in,out,ref] winreg_String *classname,
243 [out,ref] uint32 *num_subkeys,
244 [out,ref] uint32 *max_subkeylen,
245 [out,ref] uint32 *max_classlen,
246 [out,ref] uint32 *num_values,
247 [out,ref] uint32 *max_valnamelen,
248 [out,ref] uint32 *max_valbufsize,
249 [out,ref] uint32 *secdescsize,
250 [out,ref] NTTIME *last_changed_time
255 [public] WERROR winreg_QueryValue(
256 [in,ref] policy_handle *handle,
257 [in,ref] winreg_String *value_name,
258 [in,out,unique] winreg_Type *type,
259 [in,out,unique,size_is(*data_size),length_is(*data_length)] uint8 *data,
260 [in,out,unique] uint32 *data_size,
261 [in,out,unique] uint32 *data_length
266 [todo] WERROR winreg_ReplaceKey(
271 WERROR winreg_RestoreKey(
272 [in,ref] policy_handle *handle,
273 [in,ref] winreg_String *filename,
282 KeySecurityData sec_data;
284 } KeySecurityAttribute;
286 WERROR winreg_SaveKey(
287 [in,ref] policy_handle *handle,
288 [in,ref] winreg_String *filename,
289 [in,unique] KeySecurityAttribute *sec_attrib
294 WERROR winreg_SetKeySecurity(
295 [in,ref] policy_handle *handle,
296 [in] security_secinfo sec_info,
297 [in,ref] KeySecurityData *sd
302 WERROR winreg_SetValue(
303 [in,ref] policy_handle *handle,
304 [in] winreg_String name,
305 [in] winreg_Type type,
306 [in,size_is(size),ref] uint8 *data,
312 [todo] WERROR winreg_UnLoadKey(
317 WERROR winreg_InitiateSystemShutdown(
318 [in,unique] uint16 *hostname,
320 * Note: lsa_String and winreg_String both result
321 * in WERR_INVALID_PARAM
323 [in,unique] lsa_StringLarge *message,
325 [in] uint8 force_apps,
331 WERROR winreg_AbortSystemShutdown(
332 [in,unique] uint16 *server
337 [public] WERROR winreg_GetVersion(
338 [in,ref] policy_handle *handle,
339 [out,ref] uint32 *version
344 WERROR winreg_OpenHKCC(
345 [in,unique] uint16 *system_name,
346 [in] winreg_AccessMask access_mask,
347 [out,ref] policy_handle *handle
352 WERROR winreg_OpenHKDD(
353 [in,unique] uint16 *system_name,
354 [in] winreg_AccessMask access_mask,
355 [out,ref] policy_handle *handle
363 } QueryMultipleValue;
367 [public] WERROR winreg_QueryMultipleValues(
368 [in,ref] policy_handle *key_handle,
369 [in,out,ref,size_is(num_values),length_is(num_values)] QueryMultipleValue *values,
370 [in] uint32 num_values,
371 [in,out,unique,size_is(*buffer_size),length_is(*buffer_size)] uint8 *buffer,
372 [in,out,ref] uint32 *buffer_size
377 WERROR winreg_InitiateSystemShutdownEx(
378 [in,unique] uint16 *hostname,
380 * Note: lsa_String and winreg_String both result
381 * in WERR_INVALID_PARAM
383 [in,unique] lsa_StringLarge *message,
385 [in] uint8 force_apps,
386 [in] uint8 do_reboot,
392 [todo] WERROR winreg_SaveKeyEx(
397 WERROR winreg_OpenHKPT(
398 [in,unique] uint16 *system_name,
399 [in] winreg_AccessMask access_mask,
400 [out,ref] policy_handle *handle
405 WERROR winreg_OpenHKPN(
406 [in,unique] uint16 *system_name,
407 [in] winreg_AccessMask access_mask,
408 [out,ref] policy_handle *handle
413 [todo] WERROR winreg_QueryMultipleValues2(