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 [public,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 ?
*size
: 0),length_is(length ?
*length
: 0),range(0,0x4000000)] 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
285 typedef [public,bitmap32bit
] bitmap
{
286 REG_WHOLE_HIVE_VOLATILE
= 0x00000001,
287 REG_REFRESH_HIVE
= 0x00000002,
288 REG_NO_LAZY_FLUSH
= 0x00000004,
289 REG_FORCE_RESTORE
= 0x00000008
290 } winreg_RestoreKeyFlags
;
292 WERROR winreg_RestoreKey
(
293 [in,ref] policy_handle
*handle,
294 [in,ref] winreg_String
*filename
,
295 [in] winreg_RestoreKeyFlags flags
303 KeySecurityData sec_data
;
305 } KeySecurityAttribute
;
307 WERROR winreg_SaveKey
(
308 [in,ref] policy_handle
*handle,
309 [in,ref] winreg_String
*filename
,
310 [in,unique] KeySecurityAttribute
*sec_attrib
315 WERROR winreg_SetKeySecurity
(
316 [in,ref] policy_handle
*handle,
317 [in] security_secinfo sec_info
,
318 [in,ref] KeySecurityData
*sd
323 WERROR winreg_SetValue
(
324 [in,ref] policy_handle
*handle,
325 [in] winreg_String name
,
326 [in] winreg_Type type
,
327 [in,size_is(size
),ref] uint8
*data
,
333 WERROR winreg_UnLoadKey
(
334 [in,ref] policy_handle
*handle,
335 [in,ref] winreg_String
*subkey
340 WERROR winreg_InitiateSystemShutdown
(
341 [in,unique] uint16
*hostname
,
343 * Note: lsa_String and winreg_String both result
344 * in WERR_INVALID_PARAMETER
346 [in,unique] lsa_StringLarge
*message,
348 [in] uint8 force_apps
,
354 WERROR winreg_AbortSystemShutdown
(
355 [in,unique] uint16
*server
360 [public] WERROR winreg_GetVersion
(
361 [in,ref] policy_handle
*handle,
362 [out,ref] uint32
*version
367 WERROR winreg_OpenHKCC
(
368 [in,unique] uint16
*system_name
,
369 [in] winreg_AccessMask access_mask
,
370 [out,ref] policy_handle
*handle
375 WERROR winreg_OpenHKDD
(
376 [in,unique] uint16
*system_name
,
377 [in] winreg_AccessMask access_mask
,
378 [out,ref] policy_handle
*handle
382 winreg_ValNameBuf
*ve_valuename
;
386 } QueryMultipleValue
;
390 [public] WERROR winreg_QueryMultipleValues
(
391 [in,ref] policy_handle
*key_handle
,
392 [in,ref,size_is(num_values
),length_is(num_values
)] QueryMultipleValue
*values_in
,
393 [out,ref,size_is(num_values
),length_is(num_values
)] QueryMultipleValue
*values_out
,
394 [in] uint32 num_values
,
395 [in,out,unique,size_is(*buffer_size
),length_is(*buffer_size
)] uint8
*buffer
,
396 [in,out,ref] uint32
*buffer_size
401 WERROR winreg_InitiateSystemShutdownEx
(
402 [in,unique] uint16
*hostname
,
404 * Note: lsa_String and winreg_String both result
405 * in WERR_INVALID_PARAMETER
407 [in,unique] lsa_StringLarge
*message,
409 [in] uint8 force_apps
,
410 [in] uint8 do_reboot
,
416 WERROR winreg_SaveKeyEx
(
417 [in,ref] policy_handle
*handle,
418 [in,ref] winreg_String
*filename
,
419 [in,unique] KeySecurityAttribute
*sec_attrib
,
425 WERROR winreg_OpenHKPT
(
426 [in,unique] uint16
*system_name
,
427 [in] winreg_AccessMask access_mask
,
428 [out,ref] policy_handle
*handle
433 WERROR winreg_OpenHKPN
(
434 [in,unique] uint16
*system_name
,
435 [in] winreg_AccessMask access_mask
,
436 [out,ref] policy_handle
*handle
441 [public] WERROR winreg_QueryMultipleValues2
(
442 [in,ref] policy_handle
*key_handle
,
443 [in,ref,size_is(num_values
),length_is(num_values
)] QueryMultipleValue
*values_in
,
444 [out,ref,size_is(num_values
),length_is(num_values
)] QueryMultipleValue
*values_out
,
445 [in] uint32 num_values
,
446 [in,out,unique,size_is(*offered
),length_is(*offered
)] uint8
*buffer
,
447 [in,ref] uint32
*offered
,
448 [out,ref] uint32
*needed
453 WERROR winreg_DeleteKeyEx
(
454 [in,ref] policy_handle
*handle,
455 [in,ref] winreg_String
*key
,
456 [in] winreg_AccessMask access_mask
,