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_KEYTYPE_NON_VOLATILE
= 0x00000000,
117 REG_KEYTYPE_VOLATILE
= 0x00000001,
118 REG_KEYTYPE_SYMLINK
= 0x00000002
121 typedef [v1_enum] enum {
122 REG_ACTION_NONE
= 0, /* used by caller */
123 REG_CREATED_NEW_KEY
= 1,
124 REG_OPENED_EXISTING_KEY
= 2
125 } winreg_CreateAction
;
127 [public] WERROR winreg_CreateKey
(
128 [in,ref] policy_handle
*handle,
129 [in] winreg_String name
,
130 [in] winreg_String keyclass
,
131 [in] winreg_KeyType options
,
132 [in] winreg_AccessMask access_mask
,
133 [in,unique] winreg_SecBuf
*secdesc
,
134 [out,ref] policy_handle
*new_handle
,
135 [in,out,unique] winreg_CreateAction
*action_taken
140 [public] WERROR winreg_DeleteKey
(
141 [in,ref] policy_handle
*handle,
142 [in] winreg_String key
147 WERROR winreg_DeleteValue
(
148 [in,ref] policy_handle
*handle,
149 [in] winreg_String value
153 [value
(strlen_m_term_null
(name
)*2)] uint16 length
;
154 /* size cannot be auto-set by value() as it is the
155 amount of space the server is allowed to use for this
156 string in the reply, not its current size */
158 [size_is(size
/2),length_is(length
/2),charset
(UTF16
)] uint16
*name
;
163 [public] WERROR winreg_EnumKey
(
164 [in,ref] policy_handle
*handle,
165 [in] uint32 enum_index
,
166 [in,out,ref] winreg_StringBuf
*name
,
167 [in,out,unique] winreg_StringBuf
*keyclass
,
168 [in,out,unique] NTTIME
*last_changed_time
172 [value
(strlen_m_term
(name
)*2)] uint16 length
;
173 /* size cannot be auto-set by value() as it is the
174 amount of space the server is allowed to use for this
175 string in the reply, not its current size */
177 [size_is(size
/2),length_is(length
/2),charset
(UTF16
)] uint16
*name
;
183 [public] WERROR winreg_EnumValue
(
184 [in,ref] policy_handle
*handle,
185 [in] uint32 enum_index
,
186 [in,out,ref] winreg_ValNameBuf
*name
,
187 [in,out,unique] winreg_Type
*type
,
188 [in,out,unique,size_is(*size
),length_is(*length
)] uint8
*value
,
189 [in,out,unique] uint32
*size
,
190 [in,out,unique] uint32
*length
195 [public] WERROR winreg_FlushKey
(
196 [in,ref] policy_handle
*handle
201 [public] WERROR winreg_GetKeySecurity
(
202 [in,ref] policy_handle
*handle,
203 [in] security_secinfo sec_info
,
204 [in,out,ref] KeySecurityData
*sd
209 WERROR winreg_LoadKey
(
210 [in,ref] policy_handle
*handle,
211 [in,unique] winreg_String
*keyname
,
212 [in,unique] winreg_String
*filename
217 typedef [public,bitmap32bit
] bitmap
{
218 REG_NOTIFY_CHANGE_NAME
= 0x00000001,
219 REG_NOTIFY_CHANGE_ATTRIBUTES
= 0x00000002,
220 REG_NOTIFY_CHANGE_LAST_SET
= 0x00000004,
221 REG_NOTIFY_CHANGE_SECURITY
= 0x00000008
222 } winreg_NotifyChangeType
;
224 [public] WERROR winreg_NotifyChangeKeyValue
(
225 [in,ref] policy_handle
*handle,
226 [in] boolean8 watch_subtree
,
227 [in] winreg_NotifyChangeType notify_filter
,
229 [in] winreg_String string1
,
230 [in] winreg_String string2
,
236 [public] WERROR winreg_OpenKey
(
237 [in,ref] policy_handle
*parent_handle
,
238 [in] winreg_String keyname
,
239 [in] winreg_KeyType options
,
240 [in] winreg_AccessMask access_mask
,
241 [out,ref] policy_handle
*handle
246 [public] WERROR winreg_QueryInfoKey
(
247 [in,ref] policy_handle
*handle,
248 [in,out,ref] winreg_String
*classname
,
249 [out,ref] uint32
*num_subkeys
,
250 [out,ref] uint32
*max_subkeylen
,
251 [out,ref] uint32
*max_classlen
,
252 [out,ref] uint32
*num_values
,
253 [out,ref] uint32
*max_valnamelen
,
254 [out,ref] uint32
*max_valbufsize
,
255 [out,ref] uint32
*secdescsize
,
256 [out,ref] NTTIME
*last_changed_time
261 [public] WERROR winreg_QueryValue
(
262 [in,ref] policy_handle
*handle,
263 [in,ref] winreg_String
*value_name
,
264 [in,out,unique] winreg_Type
*type
,
265 [in,out,unique,size_is(data_size ?
*data_size
: 0),length_is(data_length ?
*data_length
: 0),range(0,0x4000000)] uint8
*data
,
266 [in,out,unique] uint32
*data_size
,
267 [in,out,unique] uint32
*data_length
272 [todo
] WERROR winreg_ReplaceKey
(
277 WERROR winreg_RestoreKey
(
278 [in,ref] policy_handle
*handle,
279 [in,ref] winreg_String
*filename
,
288 KeySecurityData sec_data
;
290 } KeySecurityAttribute
;
292 WERROR winreg_SaveKey
(
293 [in,ref] policy_handle
*handle,
294 [in,ref] winreg_String
*filename
,
295 [in,unique] KeySecurityAttribute
*sec_attrib
300 WERROR winreg_SetKeySecurity
(
301 [in,ref] policy_handle
*handle,
302 [in] security_secinfo sec_info
,
303 [in,ref] KeySecurityData
*sd
308 WERROR winreg_SetValue
(
309 [in,ref] policy_handle
*handle,
310 [in] winreg_String name
,
311 [in] winreg_Type type
,
312 [in,size_is(size
),ref] uint8
*data
,
318 [todo
] WERROR winreg_UnLoadKey
(
323 WERROR winreg_InitiateSystemShutdown
(
324 [in,unique] uint16
*hostname
,
326 * Note: lsa_String and winreg_String both result
327 * in WERR_INVALID_PARAM
329 [in,unique] lsa_StringLarge
*message,
331 [in] uint8 force_apps
,
337 WERROR winreg_AbortSystemShutdown
(
338 [in,unique] uint16
*server
343 [public] WERROR winreg_GetVersion
(
344 [in,ref] policy_handle
*handle,
345 [out,ref] uint32
*version
350 WERROR winreg_OpenHKCC
(
351 [in,unique] uint16
*system_name
,
352 [in] winreg_AccessMask access_mask
,
353 [out,ref] policy_handle
*handle
358 WERROR winreg_OpenHKDD
(
359 [in,unique] uint16
*system_name
,
360 [in] winreg_AccessMask access_mask
,
361 [out,ref] policy_handle
*handle
369 } QueryMultipleValue
;
373 [public] WERROR winreg_QueryMultipleValues
(
374 [in,ref] policy_handle
*key_handle
,
375 [in,out,ref,size_is(num_values
),length_is(num_values
)] QueryMultipleValue
*values
,
376 [in] uint32 num_values
,
377 [in,out,unique,size_is(*buffer_size
),length_is(*buffer_size
)] uint8
*buffer
,
378 [in,out,ref] uint32
*buffer_size
383 WERROR winreg_InitiateSystemShutdownEx
(
384 [in,unique] uint16
*hostname
,
386 * Note: lsa_String and winreg_String both result
387 * in WERR_INVALID_PARAM
389 [in,unique] lsa_StringLarge
*message,
391 [in] uint8 force_apps
,
392 [in] uint8 do_reboot
,
398 [todo
] WERROR winreg_SaveKeyEx
(
403 WERROR winreg_OpenHKPT
(
404 [in,unique] uint16
*system_name
,
405 [in] winreg_AccessMask access_mask
,
406 [out,ref] policy_handle
*handle
411 WERROR winreg_OpenHKPN
(
412 [in,unique] uint16
*system_name
,
413 [in] winreg_AccessMask access_mask
,
414 [out,ref] policy_handle
*handle
419 [todo
] WERROR winreg_QueryMultipleValues2
(