2 winreg interface definition
5 import
"lsa.idl", "initshutdown.idl", "security.idl";
8 uuid("338cd001-2244-31f1-aaaa-900038001003"),
10 endpoint("ncacn_np:[\\pipe\\winreg]","ncacn_ip_tcp:","ncalrpc:"),
11 pointer_default(unique),
12 pointer_default_top
(unique),
13 helpstring("Remote Registry Service")
16 declare bitmap security_secinfo
;
18 typedef [bitmap32bit
] bitmap
{
19 KEY_QUERY_VALUE
= 0x00001,
20 KEY_SET_VALUE
= 0x00002,
21 KEY_CREATE_SUB_KEY
= 0x00004,
22 KEY_ENUMERATE_SUB_KEYS
= 0x00008,
24 KEY_CREATE_LINK
= 0x00020,
25 KEY_WOW64_64KEY
= 0x00100,
26 KEY_WOW64_32KEY
= 0x00200
29 typedef [v1_enum] enum {
35 REG_DWORD_BIG_ENDIAN
= 5,
38 REG_RESOURCE_LIST
= 8,
39 REG_FULL_RESOURCE_DESCRIPTOR
= 9,
40 REG_RESOURCE_REQUIREMENTS_LIST
= 10,
44 typedef [public,noejs
] struct {
45 [value
(strlen_m_term
(name
)*2)] uint16 name_len
;
46 [value
(strlen_m_term
(name
)*2)] uint16 name_size
;
47 [string,charset
(UTF16
)] uint16
*name
;
52 WERROR winreg_OpenHKCR
(
53 [in] uint16
*system_name
,
54 [in] winreg_AccessMask access_mask
,
55 [out,ref] policy_handle
*handle
60 WERROR winreg_OpenHKCU
(
61 [in] uint16
*system_name
,
62 [in] winreg_AccessMask access_mask
,
63 [out,ref] policy_handle
*handle
68 WERROR winreg_OpenHKLM
(
69 [in] uint16
*system_name
,
70 [in] winreg_AccessMask access_mask
,
71 [out,ref] policy_handle
*handle
76 WERROR winreg_OpenHKPD
(
77 [in] uint16
*system_name
,
78 [in] winreg_AccessMask access_mask
,
79 [out,ref] policy_handle
*handle
84 WERROR winreg_OpenHKU
(
85 [in] uint16
*system_name
,
86 [in] winreg_AccessMask access_mask
,
87 [out,ref] policy_handle
*handle
92 [public] WERROR winreg_CloseKey
(
93 [in,out,ref] policy_handle
*handle
100 [size_is(size
),length_is(len
)] uint8
*data
;
111 typedef [v1_enum] enum {
112 REG_ACTION_NONE
= 0, /* used by caller */
113 REG_CREATED_NEW_KEY
= 1,
114 REG_OPENED_EXISTING_KEY
= 2
115 } winreg_CreateAction
;
117 WERROR winreg_CreateKey
(
118 [in,ref] policy_handle
*handle,
119 [in] winreg_String name
,
120 [in] winreg_String keyclass
,
122 [in] winreg_AccessMask access_mask
,
123 [in,unique] winreg_SecBuf
*secdesc
,
124 [out,ref] policy_handle
*new_handle
,
125 [in,out,unique] winreg_CreateAction
*action_taken
130 WERROR winreg_DeleteKey
(
131 [in,ref] policy_handle
*handle,
132 [in] winreg_String key
137 WERROR winreg_DeleteValue
(
138 [in,ref] policy_handle
*handle,
139 [in] winreg_String value
143 [value
(strlen_m_term
(name
)*2)] uint16 length
;
144 /* size cannot be auto-set by value() as it is the
145 amount of space the server is allowed to use for this
146 string in the reply, not its current size */
148 [size_is(size
/2),length_is(length
/2),charset
(UTF16
)] uint16
*name
;
151 WERROR winreg_EnumKey
(
152 [in,ref] policy_handle
*handle,
153 [in] uint32 enum_index
,
154 [in,out,ref] winreg_StringBuf
*name
,
155 [in,out,unique] winreg_StringBuf
*keyclass
,
156 [in,out,unique] NTTIME
*last_changed_time
162 WERROR winreg_EnumValue
(
163 [in,ref] policy_handle
*handle,
164 [in] uint32 enum_index
,
165 [in,out,ref] winreg_StringBuf
*name
,
166 [in,out,unique] winreg_Type
*type
,
167 [in,out,unique,size_is(*size
),length_is(*length
)] uint8
*value
,
168 [in,out,unique] uint32
*size
,
169 [in,out,unique] uint32
*length
174 WERROR winreg_FlushKey
(
175 [in,ref] policy_handle
*handle
180 WERROR winreg_GetKeySecurity
(
181 [in,ref] policy_handle
*handle,
182 [in] security_secinfo sec_info
,
183 [in,out,ref] KeySecurityData
*sd
188 WERROR winreg_LoadKey
(
189 [in,ref] policy_handle
*handle,
190 [in] winreg_String
*keyname
,
191 [in] winreg_String
*filename
196 WERROR winreg_NotifyChangeKeyValue
(
197 [in,ref] policy_handle
*handle,
198 [in] uint8 watch_subtree
,
199 [in] uint32 notify_filter
,
201 [in] winreg_String string1
,
202 [in] winreg_String string2
,
208 WERROR winreg_OpenKey
(
209 [in,ref] policy_handle
*parent_handle
,
210 [in] winreg_String keyname
,
212 [in] winreg_AccessMask access_mask
,
213 [out,ref] policy_handle
*handle
218 WERROR winreg_QueryInfoKey
(
219 [in,ref] policy_handle
*handle,
220 [in,out,ref] winreg_String
*class_in
,
221 [out,ref] uint32
*num_subkeys
,
222 [out,ref] uint32
*max_subkeylen
,
223 [out,ref] uint32
*max_subkeysize
,
224 [out,ref] uint32
*num_values
,
225 [out,ref] uint32
*max_valnamelen
,
226 [out,ref] uint32
*max_valbufsize
,
227 [out,ref] uint32
*secdescsize
,
228 [out,ref] NTTIME
*last_changed_time
233 WERROR winreg_QueryValue
(
234 [in,ref] policy_handle
*handle,
235 [in] winreg_String value_name
,
236 [in,out] winreg_Type
*type
,
237 [in,out,size_is(*size
),length_is(*length
)] uint8
*data
,
238 [in,out] uint32
*size
,
239 [in,out] uint32
*length
244 WERROR winreg_ReplaceKey
(
249 WERROR winreg_RestoreKey
(
254 WERROR winreg_SaveKey
(
259 WERROR winreg_SetKeySecurity
(
260 [in,ref] policy_handle
*handle,
261 [in] winreg_AccessMask access_mask
,
262 [in,out,ref] KeySecurityData
*sd
267 WERROR winreg_SetValue
(
268 [in,ref] policy_handle
*handle,
269 [in] winreg_String name
,
270 [in] winreg_Type type
,
271 [in,size_is(size
),ref] uint8
*data
,
277 WERROR winreg_UnLoadKey
(
282 WERROR winreg_InitiateSystemShutdown
(
283 [in] uint16
*hostname
,
284 [in] initshutdown_String
*message,
286 [in] uint8 force_apps
,
292 WERROR winreg_AbortSystemShutdown
(
298 WERROR winreg_GetVersion
(
299 [in,ref] policy_handle
*handle,
300 [out,ref] uint32
*version
305 WERROR winreg_OpenHKCC
(
306 [in] uint16
*system_name
,
307 [in] winreg_AccessMask access_mask
,
308 [out,ref] policy_handle
*handle
313 WERROR winreg_OpenHKDD
(
314 [in] uint16
*system_name
,
315 [in] winreg_AccessMask access_mask
,
316 [out,ref] policy_handle
*handle
324 } QueryMultipleValue
;
328 WERROR winreg_QueryMultipleValues
(
329 [in,ref] policy_handle
*key_handle
,
330 [in,out,ref,size_is(num_values
),length_is(num_values
)] QueryMultipleValue
*values
,
331 [in] uint32 num_values
,
332 [in,out,size_is(*buffer_size
),length_is(*buffer_size
)] uint8
*buffer
,
333 [in,out,ref] uint32
*buffer_size
338 WERROR winreg_InitiateSystemShutdownEx
(
339 [in] uint16
*hostname
,
340 [in] initshutdown_String
*message,
342 [in] uint8 force_apps
,
349 WERROR winreg_SaveKeyEx
(
354 WERROR winreg_OpenHKPT
(
355 [in] uint16
*system_name
,
356 [in] winreg_AccessMask access_mask
,
357 [out,ref] policy_handle
*handle
362 WERROR winreg_OpenHKPN
(
363 [in] uint16
*system_name
,
364 [in] winreg_AccessMask access_mask
,
365 [out,ref] policy_handle
*handle
370 WERROR winreg_QueryMultipleValues2
(