2006-09-18 23:02:06 +04:00
/*
winreg interface definition
*/
2008-10-15 19:34:55 +04:00
import "lsa.idl", "security.idl";
2006-11-07 02:20:35 +03:00
2006-09-18 23:02:06 +04:00
[
uuid("338cd001-2244-31f1-aaaa-900038001003"),
version(1.0),
endpoint("ncacn_np:[\\pipe\\winreg]","ncacn_ip_tcp:","ncalrpc:"),
pointer_default(unique),
2006-11-07 02:20:35 +03:00
helpstring("Remote Registry Service")
2006-09-18 23:02:06 +04:00
] interface winreg
{
2008-01-13 03:22:23 +03:00
typedef bitmap security_secinfo security_secinfo;
2006-09-18 23:02:06 +04:00
typedef [bitmap32bit] bitmap {
2007-02-16 17:50:57 +03:00
KEY_QUERY_VALUE = 0x00001,
KEY_SET_VALUE = 0x00002,
KEY_CREATE_SUB_KEY = 0x00004,
2008-10-15 18:13:02 +04:00
KEY_ENUMERATE_SUB_KEYS = 0x00008,
KEY_NOTIFY = 0x00010,
2007-02-16 17:50:57 +03:00
KEY_CREATE_LINK = 0x00020,
KEY_WOW64_64KEY = 0x00100,
KEY_WOW64_32KEY = 0x00200
2006-09-18 23:02:06 +04:00
} winreg_AccessMask;
2008-10-15 18:13:02 +04:00
typedef [public,v1_enum] enum {
2006-09-18 23:02:06 +04:00
REG_NONE = 0,
REG_SZ = 1,
REG_EXPAND_SZ = 2,
REG_BINARY = 3,
REG_DWORD = 4,
REG_DWORD_BIG_ENDIAN = 5,
REG_LINK = 6,
REG_MULTI_SZ = 7,
REG_RESOURCE_LIST = 8,
REG_FULL_RESOURCE_DESCRIPTOR = 9,
REG_RESOURCE_REQUIREMENTS_LIST = 10,
REG_QWORD = 11
} winreg_Type;
typedef [public,noejs] struct {
[value(strlen_m_term(name)*2)] uint16 name_len;
[value(strlen_m_term(name)*2)] uint16 name_size;
[string,charset(UTF16)] uint16 *name;
} winreg_String;
/******************/
/* Function: 0x00 */
WERROR winreg_OpenHKCR(
2008-02-04 15:07:14 +03:00
[in,unique] uint16 *system_name,
2006-09-18 23:02:06 +04:00
[in] winreg_AccessMask access_mask,
[out,ref] policy_handle *handle
);
/******************/
/* Function: 0x01 */
WERROR winreg_OpenHKCU(
2008-02-04 15:07:14 +03:00
[in,unique] uint16 *system_name,
2006-09-18 23:02:06 +04:00
[in] winreg_AccessMask access_mask,
[out,ref] policy_handle *handle
);
/******************/
/* Function: 0x02 */
2008-10-15 18:13:02 +04:00
[public] WERROR winreg_OpenHKLM(
2008-02-04 15:07:14 +03:00
[in,unique] uint16 *system_name,
2006-09-18 23:02:06 +04:00
[in] winreg_AccessMask access_mask,
[out,ref] policy_handle *handle
);
/******************/
/* Function: 0x03 */
WERROR winreg_OpenHKPD(
2008-02-04 15:07:14 +03:00
[in,unique] uint16 *system_name,
2006-09-18 23:02:06 +04:00
[in] winreg_AccessMask access_mask,
[out,ref] policy_handle *handle
);
/******************/
/* Function: 0x04 */
WERROR winreg_OpenHKU(
2008-02-04 15:07:14 +03:00
[in,unique] uint16 *system_name,
2006-09-18 23:02:06 +04:00
[in] winreg_AccessMask access_mask,
[out,ref] policy_handle *handle
);
/******************/
/* Function: 0x05 */
2008-10-15 18:13:02 +04:00
[public] WERROR winreg_CloseKey(
2006-09-18 23:02:06 +04:00
[in,out,ref] policy_handle *handle
);
/******************/
/* Function: 0x06 */
typedef struct {
[size_is(size),length_is(len)] uint8 *data;
uint32 size;
uint32 len;
} KeySecurityData;
typedef struct {
uint32 length;
KeySecurityData sd;
boolean8 inherit;
} winreg_SecBuf;
typedef [v1_enum] enum {
REG_ACTION_NONE = 0, /* used by caller */
REG_CREATED_NEW_KEY = 1,
REG_OPENED_EXISTING_KEY = 2
} winreg_CreateAction;
2008-10-15 18:13:02 +04:00
[public] WERROR winreg_CreateKey(
2006-09-18 23:02:06 +04:00
[in,ref] policy_handle *handle,
[in] winreg_String name,
[in] winreg_String keyclass,
[in] uint32 options,
[in] winreg_AccessMask access_mask,
[in,unique] winreg_SecBuf *secdesc,
[out,ref] policy_handle *new_handle,
2006-11-28 16:09:32 +03:00
[in,out,unique] winreg_CreateAction *action_taken
2006-09-18 23:02:06 +04:00
);
/******************/
/* Function: 0x07 */
2008-10-15 18:13:02 +04:00
[public] WERROR winreg_DeleteKey(
2006-09-18 23:02:06 +04:00
[in,ref] policy_handle *handle,
[in] winreg_String key
);
/******************/
/* Function: 0x08 */
WERROR winreg_DeleteValue(
[in,ref] policy_handle *handle,
[in] winreg_String value
);
typedef struct {
2006-11-19 20:07:59 +03:00
[value(strlen_m_term_null(name)*2)] uint16 length;
2006-09-18 23:02:06 +04:00
/* size cannot be auto-set by value() as it is the
amount of space the server is allowed to use for this
string in the reply, not its current size */
uint16 size;
[size_is(size/2),length_is(length/2),charset(UTF16)] uint16 *name;
} winreg_StringBuf;
2006-09-29 01:19:08 +04:00
/******************/
/* Function: 0x09 */
2008-10-15 18:13:02 +04:00
[public] WERROR winreg_EnumKey(
2006-09-18 23:02:06 +04:00
[in,ref] policy_handle *handle,
[in] uint32 enum_index,
[in,out,ref] winreg_StringBuf *name,
2006-11-28 16:09:32 +03:00
[in,out,unique] winreg_StringBuf *keyclass,
[in,out,unique] NTTIME *last_changed_time
2006-09-18 23:02:06 +04:00
);
2006-11-27 10:52:46 +03:00
typedef struct {
[value(strlen_m_term(name)*2)] uint16 length;
/* size cannot be auto-set by value() as it is the
amount of space the server is allowed to use for this
string in the reply, not its current size */
uint16 size;
[size_is(size/2),length_is(length/2),charset(UTF16)] uint16 *name;
} winreg_ValNameBuf;
2006-09-18 23:02:06 +04:00
/******************/
/* Function: 0x0a */
2008-10-15 18:15:20 +04:00
[public] WERROR winreg_EnumValue(
2006-09-18 23:02:06 +04:00
[in,ref] policy_handle *handle,
[in] uint32 enum_index,
2006-11-27 10:52:46 +03:00
[in,out,ref] winreg_ValNameBuf *name,
2006-09-18 23:02:06 +04:00
[in,out,unique] winreg_Type *type,
2007-02-20 16:43:41 +03:00
[in,out,unique,size_is(*size),length_is(*length)] uint8 *value,
2007-02-16 17:50:57 +03:00
[in,out,unique] uint32 *size,
[in,out,unique] uint32 *length
2006-09-18 23:02:06 +04:00
);
/******************/
/* Function: 0x0b */
2008-10-15 18:13:02 +04:00
[public] WERROR winreg_FlushKey(
2006-09-18 23:02:06 +04:00
[in,ref] policy_handle *handle
);
/******************/
/* Function: 0x0c */
2008-10-15 18:13:02 +04:00
[public] WERROR winreg_GetKeySecurity(
2006-09-18 23:02:06 +04:00
[in,ref] policy_handle *handle,
[in] security_secinfo sec_info,
[in,out,ref] KeySecurityData *sd
);
/******************/
/* Function: 0x0d */
WERROR winreg_LoadKey(
[in,ref] policy_handle *handle,
2008-02-04 15:07:14 +03:00
[in,unique] winreg_String *keyname,
[in,unique] winreg_String *filename
2006-09-18 23:02:06 +04:00
);
/******************/
/* Function: 0x0e */
2008-10-15 18:13:02 +04:00
typedef [public,bitmap32bit] bitmap {
REG_NOTIFY_CHANGE_NAME = 0x00000001,
REG_NOTIFY_CHANGE_ATTRIBUTES = 0x00000002,
REG_NOTIFY_CHANGE_LAST_SET = 0x00000004,
REG_NOTIFY_CHANGE_SECURITY = 0x00000008
} winreg_NotifyChangeType;
[public] WERROR winreg_NotifyChangeKeyValue(
2006-09-18 23:02:06 +04:00
[in,ref] policy_handle *handle,
2008-10-15 18:13:02 +04:00
[in] boolean8 watch_subtree,
[in] winreg_NotifyChangeType notify_filter,
2006-09-18 23:02:06 +04:00
[in] uint32 unknown,
[in] winreg_String string1,
2008-10-15 18:13:02 +04:00
[in] winreg_String string2,
2006-09-18 23:02:06 +04:00
[in] uint32 unknown2
);
/******************/
/* Function: 0x0f */
2008-10-15 18:13:02 +04:00
[public] WERROR winreg_OpenKey(
2006-09-18 23:02:06 +04:00
[in,ref] policy_handle *parent_handle,
[in] winreg_String keyname,
[in] uint32 unknown,
[in] winreg_AccessMask access_mask,
[out,ref] policy_handle *handle
);
/******************/
/* Function: 0x10 */
2008-10-15 18:15:20 +04:00
[public] WERROR winreg_QueryInfoKey(
2006-09-18 23:02:06 +04:00
[in,ref] policy_handle *handle,
2006-09-27 01:01:57 +04:00
[in,out,ref] winreg_String *classname,
2006-09-18 23:02:06 +04:00
[out,ref] uint32 *num_subkeys,
[out,ref] uint32 *max_subkeylen,
2006-09-29 01:19:08 +04:00
[out,ref] uint32 *max_classlen,
2006-09-18 23:02:06 +04:00
[out,ref] uint32 *num_values,
[out,ref] uint32 *max_valnamelen,
[out,ref] uint32 *max_valbufsize,
[out,ref] uint32 *secdescsize,
[out,ref] NTTIME *last_changed_time
);
/******************/
/* Function: 0x11 */
2008-10-15 18:15:20 +04:00
[public] WERROR winreg_QueryValue(
2006-09-18 23:02:06 +04:00
[in,ref] policy_handle *handle,
2008-03-24 13:46:51 +03:00
[in,ref] winreg_String *value_name,
2008-02-04 15:07:14 +03:00
[in,out,unique] winreg_Type *type,
2008-10-15 19:38:51 +04:00
[in,out,unique,size_is(*data_size),length_is(*data_length)] uint8 *data,
2008-02-04 15:07:14 +03:00
[in,out,unique] uint32 *data_size,
2008-10-15 19:38:51 +04:00
[in,out,unique] uint32 *data_length
2006-09-18 23:02:06 +04:00
);
/******************/
/* Function: 0x12 */
2008-10-15 18:15:20 +04:00
[todo] WERROR winreg_ReplaceKey(
2006-09-18 23:02:06 +04:00
);
/******************/
/* Function: 0x13 */
WERROR winreg_RestoreKey(
2006-09-27 20:05:25 +04:00
[in,ref] policy_handle *handle,
[in,ref] winreg_String *filename,
[in] uint32 flags
2006-09-18 23:02:06 +04:00
);
/******************/
/* Function: 0x14 */
2006-09-27 20:05:25 +04:00
typedef struct {
uint32 data_size;
KeySecurityData sec_data;
uint8 inherit;
} KeySecurityAttribute;
2006-09-18 23:02:06 +04:00
WERROR winreg_SaveKey(
2006-09-27 20:05:25 +04:00
[in,ref] policy_handle *handle,
[in,ref] winreg_String *filename,
[in,unique] KeySecurityAttribute *sec_attrib
2006-09-18 23:02:06 +04:00
);
/******************/
/* Function: 0x15 */
WERROR winreg_SetKeySecurity(
[in,ref] policy_handle *handle,
[in] winreg_AccessMask access_mask,
2006-11-29 11:51:18 +03:00
[in,ref] KeySecurityData *sd
2006-09-18 23:02:06 +04:00
);
/******************/
/* Function: 0x16 */
WERROR winreg_SetValue(
[in,ref] policy_handle *handle,
[in] winreg_String name,
[in] winreg_Type type,
[in,size_is(size),ref] uint8 *data,
[in] uint32 size
);
/******************/
/* Function: 0x17 */
2008-09-17 17:43:04 +04:00
[todo] WERROR winreg_UnLoadKey(
2006-09-18 23:02:06 +04:00
);
/******************/
/* Function: 0x18 */
WERROR winreg_InitiateSystemShutdown(
2008-02-04 15:07:14 +03:00
[in,unique] uint16 *hostname,
2008-10-15 18:13:02 +04:00
/*
* Note: lsa_String and winreg_String both result
* in WERR_INVALID_PARAM
*/
[in,unique] lsa_StringLarge *message,
2006-09-18 23:02:06 +04:00
[in] uint32 timeout,
[in] uint8 force_apps,
2008-10-15 18:25:06 +04:00
[in] uint8 do_reboot
2006-09-18 23:02:06 +04:00
);
/******************/
/* Function: 0x19 */
WERROR winreg_AbortSystemShutdown(
2008-02-04 15:07:14 +03:00
[in,unique] uint16 *server
2006-09-18 23:02:06 +04:00
);
/******************/
/* Function: 0x1a */
2008-10-15 18:13:02 +04:00
[public] WERROR winreg_GetVersion(
2006-09-18 23:02:06 +04:00
[in,ref] policy_handle *handle,
[out,ref] uint32 *version
);
/******************/
/* Function: 0x1b */
WERROR winreg_OpenHKCC(
2008-02-04 15:07:14 +03:00
[in,unique] uint16 *system_name,
2006-09-18 23:02:06 +04:00
[in] winreg_AccessMask access_mask,
[out,ref] policy_handle *handle
);
/******************/
/* Function: 0x1c */
WERROR winreg_OpenHKDD(
2008-02-04 15:07:14 +03:00
[in,unique] uint16 *system_name,
2006-09-18 23:02:06 +04:00
[in] winreg_AccessMask access_mask,
[out,ref] policy_handle *handle
);
typedef struct {
winreg_String *name;
winreg_Type type;
uint32 offset;
uint32 length;
} QueryMultipleValue;
/******************/
/* Function: 0x1d */
2008-10-15 18:13:02 +04:00
[public] WERROR winreg_QueryMultipleValues(
2006-09-18 23:02:06 +04:00
[in,ref] policy_handle *key_handle,
[in,out,ref,size_is(num_values),length_is(num_values)] QueryMultipleValue *values,
[in] uint32 num_values,
2008-02-04 15:07:14 +03:00
[in,out,unique,size_is(*buffer_size),length_is(*buffer_size)] uint8 *buffer,
2006-09-18 23:02:06 +04:00
[in,out,ref] uint32 *buffer_size
);
/******************/
/* Function: 0x1e */
WERROR winreg_InitiateSystemShutdownEx(
2008-02-04 15:07:14 +03:00
[in,unique] uint16 *hostname,
2008-10-15 18:13:02 +04:00
/*
* Note: lsa_String and winreg_String both result
* in WERR_INVALID_PARAM
*/
[in,unique] lsa_StringLarge *message,
2006-09-18 23:02:06 +04:00
[in] uint32 timeout,
[in] uint8 force_apps,
2008-10-15 18:25:06 +04:00
[in] uint8 do_reboot,
2006-09-18 23:02:06 +04:00
[in] uint32 reason
);
/******************/
/* Function: 0x1f */
2008-09-17 17:43:04 +04:00
[todo] WERROR winreg_SaveKeyEx(
2006-09-18 23:02:06 +04:00
);
/******************/
/* Function: 0x20 */
WERROR winreg_OpenHKPT(
2008-02-04 15:07:14 +03:00
[in,unique] uint16 *system_name,
2006-09-18 23:02:06 +04:00
[in] winreg_AccessMask access_mask,
[out,ref] policy_handle *handle
);
/******************/
/* Function: 0x21 */
WERROR winreg_OpenHKPN(
2008-02-04 15:07:14 +03:00
[in,unique] uint16 *system_name,
2006-09-18 23:02:06 +04:00
[in] winreg_AccessMask access_mask,
[out,ref] policy_handle *handle
);
/******************/
/* Function: 0x22 */
2008-09-17 17:43:04 +04:00
[todo] WERROR winreg_QueryMultipleValues2(
2006-09-18 23:02:06 +04:00
);
}