2 winreg interface definition
5 /*import "lsa.idl", "security.idl",*/
6 import
"misc/misc.idl";
9 uuid("338cd001-2244-31f1-aaaa-900038001003"),
11 endpoint("ncacn_np:[\\pipe\\winreg]","ncacn_ip_tcp:","ncalrpc:"),
12 pointer_default(unique),
13 helpstring("Remote Registry Service")
16 typedef bitmap security_secinfo security_secinfo
;
19 * Access Bits for registry ACLS
22 typedef [bitmap32bit
] bitmap
{
23 KEY_QUERY_VALUE
= 0x00000001,
24 KEY_SET_VALUE
= 0x00000002,
25 KEY_CREATE_SUB_KEY
= 0x00000004,
26 KEY_ENUMERATE_SUB_KEYS
= 0x00000008,
27 KEY_NOTIFY
= 0x00000010,
28 KEY_CREATE_LINK
= 0x00000020,
29 KEY_WOW64_64KEY
= 0x00000100,
30 KEY_WOW64_32KEY
= 0x00000200
33 const int REG_KEY_READ
= ( STANDARD_RIGHTS_READ_ACCESS |
35 KEY_ENUMERATE_SUB_KEYS |
38 const int REG_KEY_EXECUTE
= REG_KEY_READ
;
40 const int REG_KEY_WRITE
= ( STANDARD_RIGHTS_WRITE_ACCESS |
44 const int REG_KEY_ALL
= ( STANDARD_RIGHTS_REQUIRED_ACCESS |
49 typedef [public] struct {
50 [value
(strlen_m_term
(name
)*2)] uint16 name_len
;
51 [value
(strlen_m_term
(name
)*2)] uint16 name_size
;
52 [string,charset
(UTF16
)] uint16
*name
;
57 WERROR winreg_OpenHKCR
(
58 [in,unique] uint16
*system_name
,
59 [in] winreg_AccessMask access_mask
,
60 [out,ref] policy_handle
*handle
65 WERROR winreg_OpenHKCU
(
66 [in,unique] uint16
*system_name
,
67 [in] winreg_AccessMask access_mask
,
68 [out,ref] policy_handle
*handle
73 [public] WERROR winreg_OpenHKLM
(
74 [in,unique] uint16
*system_name
,
75 [in] winreg_AccessMask access_mask
,
76 [out,ref] policy_handle
*handle
81 WERROR winreg_OpenHKPD
(
82 [in,unique] uint16
*system_name
,
83 [in] winreg_AccessMask access_mask
,
84 [out,ref] policy_handle
*handle
89 WERROR winreg_OpenHKU
(
90 [in,unique] uint16
*system_name
,
91 [in] winreg_AccessMask access_mask
,
92 [out,ref] policy_handle
*handle
97 [public] WERROR winreg_CloseKey
(
98 [in,out,ref] policy_handle
*handle
105 [size_is(size
),length_is(len
)] uint8
*data
;
116 const int REG_OPTION_NON_VOLATILE
= 0x00000000;
118 typedef [bitmap32bit
] bitmap
{
119 REG_OPTION_VOLATILE
= 0x00000001,
120 REG_OPTION_CREATE_LINK
= 0x00000002,
121 REG_OPTION_BACKUP_RESTORE
= 0x00000004,
122 REG_OPTION_OPEN_LINK
= 0x00000008
125 typedef [v1_enum] enum {
126 REG_ACTION_NONE
= 0, /* used by caller */
127 REG_CREATED_NEW_KEY
= 1,
128 REG_OPENED_EXISTING_KEY
= 2
129 } winreg_CreateAction
;
131 [public] WERROR winreg_CreateKey
(
132 [in,ref] policy_handle
*handle,
133 [in] winreg_String name
,
134 [in] winreg_String keyclass
,
135 [in] winreg_KeyOptions options
,
136 [in] winreg_AccessMask access_mask
,
137 [in,unique] winreg_SecBuf
*secdesc
,
138 [out,ref] policy_handle
*new_handle
,
139 [in,out,unique] winreg_CreateAction
*action_taken
144 [public] WERROR winreg_DeleteKey
(
145 [in,ref] policy_handle
*handle,
146 [in] winreg_String key
151 WERROR winreg_DeleteValue
(
152 [in,ref] policy_handle
*handle,
153 [in] winreg_String value
157 [value
(strlen_m_term_null
(name
)*2)] uint16 length
;
158 /* size cannot be auto-set by value() as it is the
159 amount of space the server is allowed to use for this
160 string in the reply, not its current size */
162 [size_is(size
/2),length_is(length
/2),charset
(UTF16
)] uint16
*name
;
167 [public] WERROR winreg_EnumKey
(
168 [in,ref] policy_handle
*handle,
169 [in] uint32 enum_index
,
170 [in,out,ref] winreg_StringBuf
*name
,
171 [in,out,unique] winreg_StringBuf
*keyclass
,
172 [in,out,unique] NTTIME
*last_changed_time
176 [value
(strlen_m_term
(name
)*2)] uint16 length
;
177 /* size cannot be auto-set by value() as it is the
178 amount of space the server is allowed to use for this
179 string in the reply, not its current size */
181 [size_is(size
/2),length_is(length
/2),charset
(UTF16
)] uint16
*name
;
187 [public] WERROR winreg_EnumValue
(
188 [in,ref] policy_handle
*handle,
189 [in] uint32 enum_index
,
190 [in,out,ref] winreg_ValNameBuf
*name
,
191 [in,out,unique] winreg_Type
*type
,
192 [in,out,unique,size_is(size ?
*size
: 0),length_is(length ?
*length
: 0),range(0,0x4000000)] uint8
*value
,
193 [in,out,unique] uint32
*size
,
194 [in,out,unique] uint32
*length
199 [public] WERROR winreg_FlushKey
(
200 [in,ref] policy_handle
*handle
205 [public] WERROR winreg_GetKeySecurity
(
206 [in,ref] policy_handle
*handle,
207 [in] security_secinfo sec_info
,
208 [in,out,ref] KeySecurityData
*sd
213 WERROR winreg_LoadKey
(
214 [in,ref] policy_handle
*handle,
215 [in,unique] winreg_String
*keyname
,
216 [in,unique] winreg_String
*filename
221 typedef [public,bitmap32bit
] bitmap
{
222 REG_NOTIFY_CHANGE_NAME
= 0x00000001,
223 REG_NOTIFY_CHANGE_ATTRIBUTES
= 0x00000002,
224 REG_NOTIFY_CHANGE_LAST_SET
= 0x00000004,
225 REG_NOTIFY_CHANGE_SECURITY
= 0x00000008
226 } winreg_NotifyChangeType
;
228 [public] WERROR winreg_NotifyChangeKeyValue
(
229 [in,ref] policy_handle
*handle,
230 [in] boolean8 watch_subtree
,
231 [in] winreg_NotifyChangeType notify_filter
,
233 [in] winreg_String string1
,
234 [in] winreg_String string2
,
240 [public] WERROR winreg_OpenKey
(
241 [in,ref] policy_handle
*parent_handle
,
242 [in] winreg_String keyname
,
243 [in] winreg_KeyOptions options
,
244 [in] winreg_AccessMask access_mask
,
245 [out,ref] policy_handle
*handle
250 [public] WERROR winreg_QueryInfoKey
(
251 [in,ref] policy_handle
*handle,
252 [in,out,ref] winreg_String
*classname
,
253 [out,ref] uint32
*num_subkeys
,
254 [out,ref] uint32
*max_subkeylen
,
255 [out,ref] uint32
*max_classlen
,
256 [out,ref] uint32
*num_values
,
257 [out,ref] uint32
*max_valnamelen
,
258 [out,ref] uint32
*max_valbufsize
,
259 [out,ref] uint32
*secdescsize
,
260 [out,ref] NTTIME
*last_changed_time
265 [public] WERROR winreg_QueryValue
(
266 [in,ref] policy_handle
*handle,
267 [in,ref] winreg_String
*value_name
,
268 [in,out,unique] winreg_Type
*type
,
269 [in,out,unique,size_is(data_size ?
*data_size
: 0),length_is(data_length ?
*data_length
: 0),range(0,0x4000000)] uint8
*data
,
270 [in,out,unique] uint32
*data_size
,
271 [in,out,unique] uint32
*data_length
276 WERROR winreg_ReplaceKey
(
277 [in,ref] policy_handle
*handle,
278 [in,ref] winreg_String
*subkey
,
279 [in,ref] winreg_String
*new_file
,
280 [in,ref] winreg_String
*old_file
286 typedef [public,bitmap32bit
] bitmap
{
287 REG_WHOLE_HIVE_VOLATILE
= 0x00000001,
288 REG_REFRESH_HIVE
= 0x00000002,
289 REG_NO_LAZY_FLUSH
= 0x00000004,
290 REG_FORCE_RESTORE
= 0x00000008
291 } winreg_RestoreKeyFlags
;
293 WERROR winreg_RestoreKey
(
294 [in,ref] policy_handle
*handle,
295 [in,ref] winreg_String
*filename
,
296 [in] winreg_RestoreKeyFlags flags
304 KeySecurityData sec_data
;
306 } KeySecurityAttribute
;
308 WERROR winreg_SaveKey
(
309 [in,ref] policy_handle
*handle,
310 [in,ref] winreg_String
*filename
,
311 [in,unique] KeySecurityAttribute
*sec_attrib
316 WERROR winreg_SetKeySecurity
(
317 [in,ref] policy_handle
*handle,
318 [in] security_secinfo sec_info
,
319 [in,ref] KeySecurityData
*sd
324 WERROR winreg_SetValue
(
325 [in,ref] policy_handle
*handle,
326 [in] winreg_String name
,
327 [in] winreg_Type type
,
328 [in,size_is(size
),ref] uint8
*data
,
334 WERROR winreg_UnLoadKey
(
335 [in,ref] policy_handle
*handle,
336 [in,ref] winreg_String
*subkey
341 WERROR winreg_InitiateSystemShutdown
(
342 [in,unique] uint16
*hostname
,
344 * Note: lsa_String and winreg_String both result
345 * in WERR_INVALID_PARAM
347 [in,unique] lsa_StringLarge
*message,
349 [in] uint8 force_apps
,
355 WERROR winreg_AbortSystemShutdown
(
356 [in,unique] uint16
*server
361 [public] WERROR winreg_GetVersion
(
362 [in,ref] policy_handle
*handle,
363 [out,ref] uint32
*version
368 WERROR winreg_OpenHKCC
(
369 [in,unique] uint16
*system_name
,
370 [in] winreg_AccessMask access_mask
,
371 [out,ref] policy_handle
*handle
376 WERROR winreg_OpenHKDD
(
377 [in,unique] uint16
*system_name
,
378 [in] winreg_AccessMask access_mask
,
379 [out,ref] policy_handle
*handle
383 winreg_ValNameBuf
*ve_valuename
;
387 } QueryMultipleValue
;
391 [public] WERROR winreg_QueryMultipleValues
(
392 [in,ref] policy_handle
*key_handle
,
393 [in,ref,size_is(num_values
),length_is(num_values
)] QueryMultipleValue
*values_in
,
394 [out,ref,size_is(num_values
),length_is(num_values
)] QueryMultipleValue
*values_out
,
395 [in] uint32 num_values
,
396 [in,out,unique,size_is(*buffer_size
),length_is(*buffer_size
)] uint8
*buffer
,
397 [in,out,ref] uint32
*buffer_size
402 WERROR winreg_InitiateSystemShutdownEx
(
403 [in,unique] uint16
*hostname
,
405 * Note: lsa_String and winreg_String both result
406 * in WERR_INVALID_PARAM
408 [in,unique] lsa_StringLarge
*message,
410 [in] uint8 force_apps
,
411 [in] uint8 do_reboot
,
417 WERROR winreg_SaveKeyEx
(
418 [in,ref] policy_handle
*handle,
419 [in,ref] winreg_String
*filename
,
420 [in,unique] KeySecurityAttribute
*sec_attrib
,
426 WERROR winreg_OpenHKPT
(
427 [in,unique] uint16
*system_name
,
428 [in] winreg_AccessMask access_mask
,
429 [out,ref] policy_handle
*handle
434 WERROR winreg_OpenHKPN
(
435 [in,unique] uint16
*system_name
,
436 [in] winreg_AccessMask access_mask
,
437 [out,ref] policy_handle
*handle
442 [public] WERROR winreg_QueryMultipleValues2
(
443 [in,ref] policy_handle
*key_handle
,
444 [in,ref,size_is(num_values
),length_is(num_values
)] QueryMultipleValue
*values_in
,
445 [out,ref,size_is(num_values
),length_is(num_values
)] QueryMultipleValue
*values_out
,
446 [in] uint32 num_values
,
447 [in,out,unique,size_is(*offered
),length_is(*offered
)] uint8
*buffer
,
448 [in,ref] uint32
*offered
,
449 [out,ref] uint32
*needed
454 WERROR winreg_DeleteKeyEx
(
455 [in,ref] policy_handle
*handle,
456 [in,ref] winreg_String
*key
,
457 [in] winreg_AccessMask access_mask
,