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 typedef bitmap security_secinfo 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 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_null(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;
153 WERROR winreg_EnumKey(
154 [in,ref] policy_handle *handle,
155 [in] uint32 enum_index,
156 [in,out,ref] winreg_StringBuf *name,
157 [in,out,unique] winreg_StringBuf *keyclass,
158 [in,out,unique] NTTIME *last_changed_time
162 [value(strlen_m_term(name)*2)] uint16 length;
163 /* size cannot be auto-set by value() as it is the
164 amount of space the server is allowed to use for this
165 string in the reply, not its current size */
167 [size_is(size/2),length_is(length/2),charset(UTF16)] uint16 *name;
173 WERROR winreg_EnumValue(
174 [in,ref] policy_handle *handle,
175 [in] uint32 enum_index,
176 [in,out,ref] winreg_ValNameBuf *name,
177 [in,out,unique] winreg_Type *type,
178 [in,out,unique,size_is(*size),length_is(*length)] uint8 *value,
179 [in,out,unique] uint32 *size,
180 [in,out,unique] uint32 *length
185 WERROR winreg_FlushKey(
186 [in,ref] policy_handle *handle
191 WERROR winreg_GetKeySecurity(
192 [in,ref] policy_handle *handle,
193 [in] security_secinfo sec_info,
194 [in,out,ref] KeySecurityData *sd
199 WERROR winreg_LoadKey(
200 [in,ref] policy_handle *handle,
201 [in] winreg_String *keyname,
202 [in] winreg_String *filename
207 WERROR winreg_NotifyChangeKeyValue(
208 [in,ref] policy_handle *handle,
209 [in] uint8 watch_subtree,
210 [in] uint32 notify_filter,
212 [in] winreg_String string1,
213 [in] winreg_String string2,
219 WERROR winreg_OpenKey(
220 [in,ref] policy_handle *parent_handle,
221 [in] winreg_String keyname,
223 [in] winreg_AccessMask access_mask,
224 [out,ref] policy_handle *handle
229 WERROR winreg_QueryInfoKey(
230 [in,ref] policy_handle *handle,
231 [in,out,ref] winreg_String *classname,
232 [out,ref] uint32 *num_subkeys,
233 [out,ref] uint32 *max_subkeylen,
234 [out,ref] uint32 *max_classlen,
235 [out,ref] uint32 *num_values,
236 [out,ref] uint32 *max_valnamelen,
237 [out,ref] uint32 *max_valbufsize,
238 [out,ref] uint32 *secdescsize,
239 [out,ref] NTTIME *last_changed_time
244 WERROR winreg_QueryValue(
245 [in,ref] policy_handle *handle,
246 [in] winreg_String value_name,
247 [in,out] winreg_Type *type,
248 [in,out,size_is(*data_size),length_is(*value_length)] uint8 *data,
249 [in,out] uint32 *data_size,
250 [in,out] uint32 *value_length
255 WERROR winreg_ReplaceKey(
260 WERROR winreg_RestoreKey(
261 [in,ref] policy_handle *handle,
262 [in,ref] winreg_String *filename,
271 KeySecurityData sec_data;
273 } KeySecurityAttribute;
275 WERROR winreg_SaveKey(
276 [in,ref] policy_handle *handle,
277 [in,ref] winreg_String *filename,
278 [in,unique] KeySecurityAttribute *sec_attrib
283 WERROR winreg_SetKeySecurity(
284 [in,ref] policy_handle *handle,
285 [in] winreg_AccessMask access_mask,
286 [in,ref] KeySecurityData *sd
291 WERROR winreg_SetValue(
292 [in,ref] policy_handle *handle,
293 [in] winreg_String name,
294 [in] winreg_Type type,
295 [in,size_is(size),ref] uint8 *data,
301 WERROR winreg_UnLoadKey(
306 WERROR winreg_InitiateSystemShutdown(
307 [in] uint16 *hostname,
308 [in] initshutdown_String *message,
310 [in] uint8 force_apps,
316 WERROR winreg_AbortSystemShutdown(
322 WERROR winreg_GetVersion(
323 [in,ref] policy_handle *handle,
324 [out,ref] uint32 *version
329 WERROR winreg_OpenHKCC(
330 [in] uint16 *system_name,
331 [in] winreg_AccessMask access_mask,
332 [out,ref] policy_handle *handle
337 WERROR winreg_OpenHKDD(
338 [in] uint16 *system_name,
339 [in] winreg_AccessMask access_mask,
340 [out,ref] policy_handle *handle
348 } QueryMultipleValue;
352 WERROR winreg_QueryMultipleValues(
353 [in,ref] policy_handle *key_handle,
354 [in,out,ref,size_is(num_values),length_is(num_values)] QueryMultipleValue *values,
355 [in] uint32 num_values,
356 [in,out,size_is(*buffer_size),length_is(*buffer_size)] uint8 *buffer,
357 [in,out,ref] uint32 *buffer_size
362 WERROR winreg_InitiateSystemShutdownEx(
363 [in] uint16 *hostname,
364 [in] initshutdown_String *message,
366 [in] uint8 force_apps,
373 WERROR winreg_SaveKeyEx(
378 WERROR winreg_OpenHKPT(
379 [in] uint16 *system_name,
380 [in] winreg_AccessMask access_mask,
381 [out,ref] policy_handle *handle
386 WERROR winreg_OpenHKPN(
387 [in] uint16 *system_name,
388 [in] winreg_AccessMask access_mask,
389 [out,ref] policy_handle *handle
394 WERROR winreg_QueryMultipleValues2(