2003-11-21 08:28:36 +03:00
/*
winreg interface definition
*/
2008-02-19 13:57:32 +03:00
import "lsa.idl", "security.idl";
2006-11-07 01:54:49 +03:00
2005-03-12 20:12:52 +03:00
[
uuid("338cd001-2244-31f1-aaaa-900038001003"),
2003-11-21 08:28:36 +03:00
version(1.0),
2004-10-24 18:57:16 +04:00
endpoint("ncacn_np:[\\pipe\\winreg]","ncacn_ip_tcp:","ncalrpc:"),
2004-08-16 23:03:22 +04:00
pointer_default(unique),
2006-11-07 01:54:49 +03:00
helpstring("Remote Registry Service")
2003-11-21 08:28:36 +03:00
] interface winreg
{
2008-01-12 03:18:53 +03:00
typedef bitmap security_secinfo security_secinfo;
2005-08-24 15:01:10 +04:00
2006-09-07 13:59:39 +04:00
typedef [bitmap32bit] bitmap {
2007-02-14 18:23:12 +03:00
KEY_QUERY_VALUE = 0x00001,
KEY_SET_VALUE = 0x00002,
KEY_CREATE_SUB_KEY = 0x00004,
2007-10-25 13:26:02 +04:00
KEY_ENUMERATE_SUB_KEYS = 0x00008,
KEY_NOTIFY = 0x00010,
2007-02-14 18:23:12 +03:00
KEY_CREATE_LINK = 0x00020,
KEY_WOW64_64KEY = 0x00100,
KEY_WOW64_32KEY = 0x00200
2006-09-07 13:59:39 +04:00
} winreg_AccessMask;
2007-02-18 03:41:42 +03:00
typedef [public,v1_enum] enum {
2005-08-23 04:41:25 +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;
2005-08-06 03:01:57 +04:00
typedef [public,noejs] struct {
2005-06-14 02:22:51 +04:00
[value(strlen_m_term(name)*2)] uint16 name_len;
2005-06-24 08:25:40 +04:00
[value(strlen_m_term(name)*2)] uint16 name_size;
2005-10-16 22:59:57 +04:00
[string,charset(UTF16)] uint16 *name;
2003-11-21 09:14:14 +03:00
} winreg_String;
2003-11-21 08:28:36 +03:00
/******************/
/* Function: 0x00 */
2003-11-22 08:34:25 +03:00
WERROR winreg_OpenHKCR(
2008-02-01 23:35:52 +03:00
[in,unique] uint16 *system_name,
2006-09-07 13:59:39 +04:00
[in] winreg_AccessMask access_mask,
2003-11-22 08:34:25 +03:00
[out,ref] policy_handle *handle
2003-11-21 08:28:36 +03:00
);
/******************/
/* Function: 0x01 */
2003-11-22 08:34:25 +03:00
WERROR winreg_OpenHKCU(
2008-02-01 23:35:52 +03:00
[in,unique] uint16 *system_name,
2006-09-07 13:59:39 +04:00
[in] winreg_AccessMask access_mask,
2003-11-22 08:34:25 +03:00
[out,ref] policy_handle *handle
2003-11-21 08:28:36 +03:00
);
/******************/
/* Function: 0x02 */
2007-02-15 00:37:06 +03:00
[public] WERROR winreg_OpenHKLM(
2008-02-01 23:35:52 +03:00
[in,unique] uint16 *system_name,
2006-09-07 13:59:39 +04:00
[in] winreg_AccessMask access_mask,
2003-11-21 08:28:36 +03:00
[out,ref] policy_handle *handle
);
/******************/
/* Function: 0x03 */
2003-11-22 08:34:25 +03:00
WERROR winreg_OpenHKPD(
2008-02-01 23:35:52 +03:00
[in,unique] uint16 *system_name,
2006-09-07 13:59:39 +04:00
[in] winreg_AccessMask access_mask,
2003-11-22 08:34:25 +03:00
[out,ref] policy_handle *handle
2003-11-21 08:28:36 +03:00
);
/******************/
/* Function: 0x04 */
2003-11-22 08:34:25 +03:00
WERROR winreg_OpenHKU(
2008-02-01 23:35:52 +03:00
[in,unique] uint16 *system_name,
2006-09-07 13:59:39 +04:00
[in] winreg_AccessMask access_mask,
2003-11-22 08:34:25 +03:00
[out,ref] policy_handle *handle
2003-11-21 08:28:36 +03:00
);
/******************/
/* Function: 0x05 */
2007-02-14 22:30:05 +03:00
[public] WERROR winreg_CloseKey(
2003-11-21 08:28:36 +03:00
[in,out,ref] policy_handle *handle
);
/******************/
/* Function: 0x06 */
2005-08-24 12:31:39 +04:00
typedef struct {
[size_is(size),length_is(len)] uint8 *data;
uint32 size;
uint32 len;
} KeySecurityData;
typedef struct {
uint32 length;
KeySecurityData sd;
2006-05-17 03:51:01 +04:00
boolean8 inherit;
2005-08-24 12:31:39 +04:00
} winreg_SecBuf;
2005-08-24 15:01:10 +04:00
typedef [v1_enum] enum {
REG_ACTION_NONE = 0, /* used by caller */
REG_CREATED_NEW_KEY = 1,
REG_OPENED_EXISTING_KEY = 2
} winreg_CreateAction;
2007-02-15 00:37:06 +03:00
[public] WERROR winreg_CreateKey(
2005-08-24 12:31:39 +04:00
[in,ref] policy_handle *handle,
[in] winreg_String name,
2006-09-15 22:34:03 +04:00
[in] winreg_String keyclass,
2004-12-13 04:37:18 +03:00
[in] uint32 options,
2006-09-07 13:59:39 +04:00
[in] winreg_AccessMask access_mask,
2005-08-24 12:31:39 +04:00
[in,unique] winreg_SecBuf *secdesc,
[out,ref] policy_handle *new_handle,
2005-08-24 15:01:10 +04:00
[in,out,unique] winreg_CreateAction *action_taken
2003-11-21 08:28:36 +03:00
);
/******************/
/* Function: 0x07 */
2007-02-15 22:33:03 +03:00
[public] WERROR winreg_DeleteKey(
2003-11-21 09:14:14 +03:00
[in,ref] policy_handle *handle,
[in] winreg_String key
2003-11-21 08:28:36 +03:00
);
/******************/
/* Function: 0x08 */
2003-11-22 08:34:25 +03:00
WERROR winreg_DeleteValue(
2003-11-21 09:14:14 +03:00
[in,ref] policy_handle *handle,
[in] winreg_String value
2003-11-21 08:28:36 +03:00
);
2003-11-22 08:34:25 +03:00
typedef struct {
2006-01-25 15:54:30 +03:00
[value(strlen_m_term(name)*2)] uint16 length;
2005-11-02 04:01:17 +03: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;
2005-08-17 05:25:58 +04:00
[size_is(size/2),length_is(length/2),charset(UTF16)] uint16 *name;
} winreg_StringBuf;
2003-11-22 08:34:25 +03:00
2007-02-16 18:13:51 +03:00
/******************/
/* Function: 0x09 */
2007-02-16 00:06:33 +03:00
[public] WERROR winreg_EnumKey(
2005-08-17 05:25:58 +04:00
[in,ref] policy_handle *handle,
[in] uint32 enum_index,
[in,out,ref] winreg_StringBuf *name,
2006-09-15 22:34:03 +04:00
[in,out,unique] winreg_StringBuf *keyclass,
2005-08-17 05:25:58 +04:00
[in,out,unique] NTTIME *last_changed_time
2003-11-21 08:28:36 +03:00
);
/******************/
/* Function: 0x0a */
2004-12-09 10:52:00 +03:00
2007-02-15 00:37:06 +03:00
[public] WERROR winreg_EnumValue(
2005-08-17 05:25:58 +04:00
[in,ref] policy_handle *handle,
[in] uint32 enum_index,
[in,out,ref] winreg_StringBuf *name,
2005-08-23 04:41:25 +04:00
[in,out,unique] winreg_Type *type,
2005-08-17 05:25:58 +04:00
[in,out,unique,size_is(*size),length_is(*length)] uint8 *value,
[in,out,unique] uint32 *size,
[in,out,unique] uint32 *length
2003-11-21 08:28:36 +03:00
);
/******************/
/* Function: 0x0b */
2007-02-15 22:33:03 +03:00
[public] WERROR winreg_FlushKey(
2003-11-21 09:14:14 +03:00
[in,ref] policy_handle *handle
2003-11-21 08:28:36 +03:00
);
/******************/
/* Function: 0x0c */
2007-02-15 22:33:03 +03:00
[public] WERROR winreg_GetKeySecurity(
2004-04-09 02:39:47 +04:00
[in,ref] policy_handle *handle,
2005-08-24 15:01:10 +04:00
[in] security_secinfo sec_info,
2005-08-24 12:31:39 +04:00
[in,out,ref] KeySecurityData *sd
2003-11-21 08:28:36 +03:00
);
/******************/
/* Function: 0x0d */
2003-11-22 08:34:25 +03:00
WERROR winreg_LoadKey(
2004-12-12 03:22:30 +03:00
[in,ref] policy_handle *handle,
2008-02-01 23:35:52 +03:00
[in,unique] winreg_String *keyname,
[in,unique] winreg_String *filename
2003-11-21 08:28:36 +03:00
);
/******************/
/* Function: 0x0e */
2007-10-25 13:26: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;
2007-02-15 22:33:03 +03:00
[public] WERROR winreg_NotifyChangeKeyValue(
2004-12-13 05:04:34 +03:00
[in,ref] policy_handle *handle,
2007-10-25 13:26:02 +04:00
[in] boolean8 watch_subtree,
[in] winreg_NotifyChangeType notify_filter,
2004-12-13 05:04:34 +03:00
[in] uint32 unknown,
[in] winreg_String string1,
2007-10-25 13:26:02 +04:00
[in] winreg_String string2,
2004-12-13 05:04:34 +03:00
[in] uint32 unknown2
2003-11-21 08:28:36 +03:00
);
/******************/
/* Function: 0x0f */
2007-02-15 22:33:03 +03:00
[public] WERROR winreg_OpenKey(
2006-09-15 22:34:03 +04:00
[in,ref] policy_handle *parent_handle,
2003-11-22 08:34:25 +03:00
[in] winreg_String keyname,
[in] uint32 unknown,
2006-09-07 13:59:39 +04:00
[in] winreg_AccessMask access_mask,
2003-11-22 08:34:25 +03:00
[out,ref] policy_handle *handle
2003-11-21 08:28:36 +03:00
);
/******************/
/* Function: 0x10 */
2007-02-15 22:33:03 +03:00
[public] WERROR winreg_QueryInfoKey(
2003-11-22 08:34:25 +03:00
[in,ref] policy_handle *handle,
2007-02-16 18:13:51 +03:00
[in,out,ref] winreg_String *classname,
2006-09-16 00:36:38 +04:00
[out,ref] uint32 *num_subkeys,
[out,ref] uint32 *max_subkeylen,
[out,ref] uint32 *max_subkeysize,
[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
2003-11-21 08:28:36 +03:00
);
/******************/
/* Function: 0x11 */
2007-02-15 00:37:06 +03:00
[public] WERROR winreg_QueryValue(
2004-08-13 05:31:11 +04:00
[in,ref] policy_handle *handle,
2004-12-09 01:02:49 +03:00
[in] winreg_String value_name,
2008-02-01 23:35:52 +03:00
[in,out,unique] winreg_Type *type,
[in,out,unique,size_is(*size),length_is(*length)] uint8 *data,
[in,out,unique] uint32 *size,
[in,out,unique] uint32 *length
2003-11-21 08:28:36 +03:00
);
/******************/
/* Function: 0x12 */
2008-04-08 05:15:55 +04:00
[todo] WERROR winreg_ReplaceKey(
2003-11-21 08:28:36 +03:00
);
/******************/
/* Function: 0x13 */
2003-11-22 08:34:25 +03:00
WERROR winreg_RestoreKey(
2007-02-16 18:13:51 +03:00
[in,ref] policy_handle *handle,
[in,ref] winreg_String *filename,
[in] uint32 flags
2003-11-21 08:28:36 +03:00
);
/******************/
/* Function: 0x14 */
2007-02-16 18:13:51 +03:00
typedef struct {
uint32 data_size;
KeySecurityData sec_data;
uint8 inherit;
} KeySecurityAttribute;
2003-11-22 08:34:25 +03:00
WERROR winreg_SaveKey(
2007-02-16 18:13:51 +03:00
[in,ref] policy_handle *handle,
[in,ref] winreg_String *filename,
[in,unique] KeySecurityAttribute *sec_attrib
2003-11-21 08:28:36 +03:00
);
/******************/
/* Function: 0x15 */
2003-11-22 08:34:25 +03:00
WERROR winreg_SetKeySecurity(
2004-04-09 02:39:47 +04:00
[in,ref] policy_handle *handle,
2007-10-25 13:12:02 +04:00
[in] security_secinfo sec_info,
2007-02-16 18:13:51 +03:00
[in,ref] KeySecurityData *sd
2003-11-21 08:28:36 +03:00
);
/******************/
/* Function: 0x16 */
2003-11-22 08:34:25 +03:00
WERROR winreg_SetValue(
2004-12-09 10:05:47 +03:00
[in,ref] policy_handle *handle,
[in] winreg_String name,
2005-08-23 04:41:25 +04:00
[in] winreg_Type type,
2005-08-17 17:14:40 +04:00
[in,size_is(size),ref] uint8 *data,
2004-12-09 10:05:47 +03:00
[in] uint32 size
2003-11-21 08:28:36 +03:00
);
/******************/
/* Function: 0x17 */
2008-04-08 05:15:55 +04:00
[todo] WERROR winreg_UnLoadKey(
2003-11-21 08:28:36 +03:00
);
/******************/
/* Function: 0x18 */
2003-11-22 08:34:25 +03:00
WERROR winreg_InitiateSystemShutdown(
2008-02-01 23:35:52 +03:00
[in,unique] uint16 *hostname,
2008-02-19 13:57:32 +03:00
/*
* Note: lsa_String and winreg_String both result
* in WERR_INVALID_PARAM
*/
[in,unique] lsa_StringLarge *message,
2004-04-09 02:39:47 +04:00
[in] uint32 timeout,
2004-12-12 03:35:50 +03:00
[in] uint8 force_apps,
2008-10-15 18:25:06 +04:00
[in] uint8 do_reboot
2003-11-21 08:28:36 +03:00
);
/******************/
/* Function: 0x19 */
2003-11-22 08:34:25 +03:00
WERROR winreg_AbortSystemShutdown(
2008-02-01 23:35:52 +03:00
[in,unique] uint16 *server
2003-11-21 08:28:36 +03:00
);
/******************/
/* Function: 0x1a */
2007-02-15 22:33:03 +03:00
[public] WERROR winreg_GetVersion(
2006-09-16 00:36:38 +04:00
[in,ref] policy_handle *handle,
[out,ref] uint32 *version
2003-11-21 08:28:36 +03:00
);
/******************/
/* Function: 0x1b */
2003-11-22 08:34:25 +03:00
WERROR winreg_OpenHKCC(
2008-02-01 23:35:52 +03:00
[in,unique] uint16 *system_name,
2006-09-07 13:59:39 +04:00
[in] winreg_AccessMask access_mask,
2003-11-22 08:34:25 +03:00
[out,ref] policy_handle *handle
2003-11-21 08:28:36 +03:00
);
/******************/
/* Function: 0x1c */
2003-11-22 08:34:25 +03:00
WERROR winreg_OpenHKDD(
2008-02-01 23:35:52 +03:00
[in,unique] uint16 *system_name,
2006-09-07 13:59:39 +04:00
[in] winreg_AccessMask access_mask,
2003-11-22 08:34:25 +03:00
[out,ref] policy_handle *handle
2003-11-21 08:28:36 +03:00
);
2004-12-12 03:22:30 +03:00
typedef struct {
winreg_String *name;
2005-08-23 04:41:25 +04:00
winreg_Type type;
2004-12-12 03:22:30 +03:00
uint32 offset;
uint32 length;
} QueryMultipleValue;
2003-11-21 08:28:36 +03:00
/******************/
/* Function: 0x1d */
2007-02-15 00:37:06 +03:00
[public] WERROR winreg_QueryMultipleValues(
2004-12-12 03:22:30 +03:00
[in,ref] policy_handle *key_handle,
2005-05-27 19:49:15 +04:00
[in,out,ref,size_is(num_values),length_is(num_values)] QueryMultipleValue *values,
2005-08-06 05:01:18 +04:00
[in] uint32 num_values,
2008-02-01 23:35:52 +03:00
[in,out,unique,size_is(*buffer_size),length_is(*buffer_size)] uint8 *buffer,
2005-08-06 05:01:18 +04:00
[in,out,ref] uint32 *buffer_size
2003-11-21 08:28:36 +03:00
);
/******************/
/* Function: 0x1e */
2003-11-22 08:34:25 +03:00
WERROR winreg_InitiateSystemShutdownEx(
2008-02-01 23:35:52 +03:00
[in,unique] uint16 *hostname,
2008-02-19 13:57:32 +03:00
/*
* Note: lsa_String and winreg_String both result
* in WERR_INVALID_PARAM
*/
[in,unique] lsa_StringLarge *message,
2004-12-13 14:00:24 +03:00
[in] uint32 timeout,
[in] uint8 force_apps,
2008-10-15 18:25:06 +04:00
[in] uint8 do_reboot,
2004-12-13 14:00:24 +03:00
[in] uint32 reason
);
2003-11-21 08:28:36 +03:00
/******************/
/* Function: 0x1f */
2008-04-08 05:15:55 +04:00
[todo] WERROR winreg_SaveKeyEx(
2003-11-21 08:28:36 +03:00
);
/******************/
/* Function: 0x20 */
2003-11-22 08:34:25 +03:00
WERROR winreg_OpenHKPT(
2008-02-01 23:35:52 +03:00
[in,unique] uint16 *system_name,
2006-09-07 13:59:39 +04:00
[in] winreg_AccessMask access_mask,
2003-11-22 08:34:25 +03:00
[out,ref] policy_handle *handle
2003-11-21 08:28:36 +03:00
);
/******************/
/* Function: 0x21 */
2003-11-22 08:34:25 +03:00
WERROR winreg_OpenHKPN(
2008-02-01 23:35:52 +03:00
[in,unique] uint16 *system_name,
2006-09-07 13:59:39 +04:00
[in] winreg_AccessMask access_mask,
2003-11-22 08:34:25 +03:00
[out,ref] policy_handle *handle
2003-11-21 08:28:36 +03:00
);
/******************/
2004-08-13 05:31:11 +04:00
/* Function: 0x22 */
2008-04-08 05:15:55 +04:00
[todo] WERROR winreg_QueryMultipleValues2(
2003-11-21 08:28:36 +03:00
);
}