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 const int REG_OPTION_NON_VOLATILE
= 0x00000000;
117 typedef [bitmap32bit
] bitmap
{
118 REG_OPTION_VOLATILE
= 0x00000001,
119 REG_OPTION_CREATE_LINK
= 0x00000002,
120 REG_OPTION_BACKUP_RESTORE
= 0x00000004,
121 REG_OPTION_OPEN_LINK
= 0x00000008
124 typedef [v1_enum] enum {
125 REG_ACTION_NONE
= 0, /* used by caller */
126 REG_CREATED_NEW_KEY
= 1,
127 REG_OPENED_EXISTING_KEY
= 2
128 } winreg_CreateAction
;
130 [public] WERROR winreg_CreateKey
(
131 [in,ref] policy_handle
*handle,
132 [in] winreg_String name
,
133 [in] winreg_String keyclass
,
134 [in] winreg_KeyOptions options
,
135 [in] winreg_AccessMask access_mask
,
136 [in,unique] winreg_SecBuf
*secdesc
,
137 [out,ref] policy_handle
*new_handle
,
138 [in,out,unique] winreg_CreateAction
*action_taken
143 [public] WERROR winreg_DeleteKey
(
144 [in,ref] policy_handle
*handle,
145 [in] winreg_String key
150 WERROR winreg_DeleteValue
(
151 [in,ref] policy_handle
*handle,
152 [in] winreg_String value
156 [value
(strlen_m_term_null
(name
)*2)] uint16 length
;
157 /* size cannot be auto-set by value() as it is the
158 amount of space the server is allowed to use for this
159 string in the reply, not its current size */
161 [size_is(size
/2),length_is(length
/2),charset
(UTF16
)] uint16
*name
;
166 [public] WERROR winreg_EnumKey
(
167 [in,ref] policy_handle
*handle,
168 [in] uint32 enum_index
,
169 [in,out,ref] winreg_StringBuf
*name
,
170 [in,out,unique] winreg_StringBuf
*keyclass
,
171 [in,out,unique] NTTIME
*last_changed_time
175 [value
(strlen_m_term
(name
)*2)] uint16 length
;
176 /* size cannot be auto-set by value() as it is the
177 amount of space the server is allowed to use for this
178 string in the reply, not its current size */
180 [size_is(size
/2),length_is(length
/2),charset
(UTF16
)] uint16
*name
;
186 [public] WERROR winreg_EnumValue
(
187 [in,ref] policy_handle
*handle,
188 [in] uint32 enum_index
,
189 [in,out,ref] winreg_ValNameBuf
*name
,
190 [in,out,unique] winreg_Type
*type
,
191 [in,out,unique,size_is(*size
),length_is(*length
)] uint8
*value
,
192 [in,out,unique] uint32
*size
,
193 [in,out,unique] uint32
*length
198 [public] WERROR winreg_FlushKey
(
199 [in,ref] policy_handle
*handle
204 [public] WERROR winreg_GetKeySecurity
(
205 [in,ref] policy_handle
*handle,
206 [in] security_secinfo sec_info
,
207 [in,out,ref] KeySecurityData
*sd
212 WERROR winreg_LoadKey
(
213 [in,ref] policy_handle
*handle,
214 [in,unique] winreg_String
*keyname
,
215 [in,unique] winreg_String
*filename
220 typedef [public,bitmap32bit
] bitmap
{
221 REG_NOTIFY_CHANGE_NAME
= 0x00000001,
222 REG_NOTIFY_CHANGE_ATTRIBUTES
= 0x00000002,
223 REG_NOTIFY_CHANGE_LAST_SET
= 0x00000004,
224 REG_NOTIFY_CHANGE_SECURITY
= 0x00000008
225 } winreg_NotifyChangeType
;
227 [public] WERROR winreg_NotifyChangeKeyValue
(
228 [in,ref] policy_handle
*handle,
229 [in] boolean8 watch_subtree
,
230 [in] winreg_NotifyChangeType notify_filter
,
232 [in] winreg_String string1
,
233 [in] winreg_String string2
,
239 [public] WERROR winreg_OpenKey
(
240 [in,ref] policy_handle
*parent_handle
,
241 [in] winreg_String keyname
,
242 [in] winreg_KeyOptions options
,
243 [in] winreg_AccessMask access_mask
,
244 [out,ref] policy_handle
*handle
249 [public] WERROR winreg_QueryInfoKey
(
250 [in,ref] policy_handle
*handle,
251 [in,out,ref] winreg_String
*classname
,
252 [out,ref] uint32
*num_subkeys
,
253 [out,ref] uint32
*max_subkeylen
,
254 [out,ref] uint32
*max_classlen
,
255 [out,ref] uint32
*num_values
,
256 [out,ref] uint32
*max_valnamelen
,
257 [out,ref] uint32
*max_valbufsize
,
258 [out,ref] uint32
*secdescsize
,
259 [out,ref] NTTIME
*last_changed_time
264 [public] WERROR winreg_QueryValue
(
265 [in,ref] policy_handle
*handle,
266 [in,ref] winreg_String
*value_name
,
267 [in,out,unique] winreg_Type
*type
,
268 [in,out,unique,size_is(data_size ?
*data_size
: 0),length_is(data_length ?
*data_length
: 0),range(0,0x4000000)] uint8
*data
,
269 [in,out,unique] uint32
*data_size
,
270 [in,out,unique] uint32
*data_length
275 WERROR winreg_ReplaceKey
(
276 [in,ref] policy_handle
*handle,
277 [in,ref] winreg_String
*subkey
,
278 [in,ref] winreg_String
*new_file
,
279 [in,ref] winreg_String
*old_file
284 WERROR winreg_RestoreKey
(
285 [in,ref] policy_handle
*handle,
286 [in,ref] winreg_String
*filename
,
295 KeySecurityData sec_data
;
297 } KeySecurityAttribute
;
299 WERROR winreg_SaveKey
(
300 [in,ref] policy_handle
*handle,
301 [in,ref] winreg_String
*filename
,
302 [in,unique] KeySecurityAttribute
*sec_attrib
307 WERROR winreg_SetKeySecurity
(
308 [in,ref] policy_handle
*handle,
309 [in] security_secinfo sec_info
,
310 [in,ref] KeySecurityData
*sd
315 WERROR winreg_SetValue
(
316 [in,ref] policy_handle
*handle,
317 [in] winreg_String name
,
318 [in] winreg_Type type
,
319 [in,size_is(size
),ref] uint8
*data
,
325 WERROR winreg_UnLoadKey
(
326 [in,ref] policy_handle
*handle,
327 [in,ref] winreg_String
*subkey
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 WERROR winreg_SaveKeyEx
(
408 [in,ref] policy_handle
*handle,
409 [in,ref] winreg_String
*filename
,
410 [in,unique] KeySecurityAttribute
*sec_attrib
,
416 WERROR winreg_OpenHKPT
(
417 [in,unique] uint16
*system_name
,
418 [in] winreg_AccessMask access_mask
,
419 [out,ref] policy_handle
*handle
424 WERROR winreg_OpenHKPN
(
425 [in,unique] uint16
*system_name
,
426 [in] winreg_AccessMask access_mask
,
427 [out,ref] policy_handle
*handle
432 WERROR winreg_QueryMultipleValues2
(
433 [in,ref] policy_handle
*key_handle
,
434 [in,out,ref,size_is(num_values
),length_is(num_values
)] QueryMultipleValue
*values
,
435 [in] uint32 num_values
,
436 [in,out,unique,size_is(offered
),length_is(offered
)] uint8
*buffer
,
438 [out,ref] uint32
*needed
443 WERROR winreg_DeleteKeyEx
(
444 [in,ref] policy_handle
*handle,
445 [in,ref] winreg_String
*key
,
446 [in] winreg_AccessMask access_mask
,