2003-11-21 05:28:36 +00:00
/*
winreg interface definition
*/
2009-09-23 20:41:44 +02:00
import "lsa.idl", "security.idl", "misc.idl";
2006-11-06 22:54:49 +00:00
2005-03-12 17:12:52 +00:00
[
uuid("338cd001-2244-31f1-aaaa-900038001003"),
2003-11-21 05:28:36 +00:00
version(1.0),
2004-10-24 14:57:16 +00:00
endpoint("ncacn_np:[\\pipe\\winreg]","ncacn_ip_tcp:","ncalrpc:"),
2004-08-16 19:03:22 +00:00
pointer_default(unique),
2006-11-06 22:54:49 +00:00
helpstring("Remote Registry Service")
2003-11-21 05:28:36 +00:00
] interface winreg
{
2008-01-12 01:18:53 +01:00
typedef bitmap security_secinfo security_secinfo;
2005-08-24 11:01:10 +00:00
2009-04-15 01:30:12 +02:00
/*
* Access Bits for registry ACLS
*/
2015-07-04 01:26:44 +02:00
typedef [public,bitmap32bit] bitmap {
2007-02-14 15:23:12 +00:00
KEY_QUERY_VALUE = 0x00001,
KEY_SET_VALUE = 0x00002,
KEY_CREATE_SUB_KEY = 0x00004,
2007-10-25 11:26:02 +02:00
KEY_ENUMERATE_SUB_KEYS = 0x00008,
KEY_NOTIFY = 0x00010,
2007-02-14 15:23:12 +00:00
KEY_CREATE_LINK = 0x00020,
KEY_WOW64_64KEY = 0x00100,
KEY_WOW64_32KEY = 0x00200
2006-09-07 09:59:39 +00:00
} winreg_AccessMask;
2009-04-15 01:30:12 +02:00
const int REG_KEY_READ = ( STANDARD_RIGHTS_READ_ACCESS |
KEY_QUERY_VALUE |
KEY_ENUMERATE_SUB_KEYS |
KEY_NOTIFY);
const int REG_KEY_EXECUTE = REG_KEY_READ;
const int REG_KEY_WRITE = ( STANDARD_RIGHTS_WRITE_ACCESS |
KEY_SET_VALUE |
KEY_CREATE_SUB_KEY);
const int REG_KEY_ALL = ( STANDARD_RIGHTS_REQUIRED_ACCESS |
REG_KEY_READ |
REG_KEY_WRITE |
KEY_CREATE_LINK);
2008-12-12 11:48:42 +01:00
typedef [public] struct {
2005-06-13 22:22:51 +00:00
[value(strlen_m_term(name)*2)] uint16 name_len;
2005-06-24 04:25:40 +00:00
[value(strlen_m_term(name)*2)] uint16 name_size;
2005-10-16 18:59:57 +00:00
[string,charset(UTF16)] uint16 *name;
2003-11-21 06:14:14 +00:00
} winreg_String;
2003-11-21 05:28:36 +00:00
/******************/
/* Function: 0x00 */
2003-11-22 05:34:25 +00:00
WERROR winreg_OpenHKCR(
2008-02-01 21:35:52 +01:00
[in,unique] uint16 *system_name,
2006-09-07 09:59:39 +00:00
[in] winreg_AccessMask access_mask,
2003-11-22 05:34:25 +00:00
[out,ref] policy_handle *handle
2003-11-21 05:28:36 +00:00
);
/******************/
/* Function: 0x01 */
2003-11-22 05:34:25 +00:00
WERROR winreg_OpenHKCU(
2008-02-01 21:35:52 +01:00
[in,unique] uint16 *system_name,
2006-09-07 09:59:39 +00:00
[in] winreg_AccessMask access_mask,
2003-11-22 05:34:25 +00:00
[out,ref] policy_handle *handle
2003-11-21 05:28:36 +00:00
);
/******************/
/* Function: 0x02 */
2007-02-14 21:37:06 +00:00
[public] WERROR winreg_OpenHKLM(
2008-02-01 21:35:52 +01:00
[in,unique] uint16 *system_name,
2006-09-07 09:59:39 +00:00
[in] winreg_AccessMask access_mask,
2003-11-21 05:28:36 +00:00
[out,ref] policy_handle *handle
);
/******************/
/* Function: 0x03 */
2003-11-22 05:34:25 +00:00
WERROR winreg_OpenHKPD(
2008-02-01 21:35:52 +01:00
[in,unique] uint16 *system_name,
2006-09-07 09:59:39 +00:00
[in] winreg_AccessMask access_mask,
2003-11-22 05:34:25 +00:00
[out,ref] policy_handle *handle
2003-11-21 05:28:36 +00:00
);
/******************/
/* Function: 0x04 */
2003-11-22 05:34:25 +00:00
WERROR winreg_OpenHKU(
2008-02-01 21:35:52 +01:00
[in,unique] uint16 *system_name,
2006-09-07 09:59:39 +00:00
[in] winreg_AccessMask access_mask,
2003-11-22 05:34:25 +00:00
[out,ref] policy_handle *handle
2003-11-21 05:28:36 +00:00
);
/******************/
/* Function: 0x05 */
2007-02-14 19:30:05 +00:00
[public] WERROR winreg_CloseKey(
2003-11-21 05:28:36 +00:00
[in,out,ref] policy_handle *handle
);
/******************/
/* Function: 0x06 */
2005-08-24 08:31:39 +00:00
typedef struct {
[size_is(size),length_is(len)] uint8 *data;
uint32 size;
uint32 len;
} KeySecurityData;
typedef struct {
uint32 length;
KeySecurityData sd;
2006-05-16 23:51:01 +00:00
boolean8 inherit;
2005-08-24 08:31:39 +00:00
} winreg_SecBuf;
2010-04-09 17:49:57 +02:00
const int REG_OPTION_NON_VOLATILE = 0x00000000;
2010-04-09 12:24:18 +02:00
typedef [bitmap32bit] bitmap {
2010-04-09 13:49:28 +02:00
REG_OPTION_VOLATILE = 0x00000001,
REG_OPTION_CREATE_LINK = 0x00000002,
REG_OPTION_BACKUP_RESTORE = 0x00000004,
REG_OPTION_OPEN_LINK = 0x00000008
} winreg_KeyOptions;
2010-03-11 20:20:48 +01:00
2005-08-24 11:01:10 +00: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-14 21:37:06 +00:00
[public] WERROR winreg_CreateKey(
2005-08-24 08:31:39 +00:00
[in,ref] policy_handle *handle,
[in] winreg_String name,
2006-09-15 18:34:03 +00:00
[in] winreg_String keyclass,
2010-04-09 13:49:28 +02:00
[in] winreg_KeyOptions options,
2006-09-07 09:59:39 +00:00
[in] winreg_AccessMask access_mask,
2005-08-24 08:31:39 +00:00
[in,unique] winreg_SecBuf *secdesc,
[out,ref] policy_handle *new_handle,
2005-08-24 11:01:10 +00:00
[in,out,unique] winreg_CreateAction *action_taken
2003-11-21 05:28:36 +00:00
);
/******************/
/* Function: 0x07 */
2007-02-15 19:33:03 +00:00
[public] WERROR winreg_DeleteKey(
2003-11-21 06:14:14 +00:00
[in,ref] policy_handle *handle,
[in] winreg_String key
2003-11-21 05:28:36 +00:00
);
/******************/
/* Function: 0x08 */
2003-11-22 05:34:25 +00:00
WERROR winreg_DeleteValue(
2003-11-21 06:14:14 +00:00
[in,ref] policy_handle *handle,
[in] winreg_String value
2003-11-21 05:28:36 +00:00
);
2003-11-22 05:34:25 +00:00
typedef struct {
2009-01-15 23:23:08 +01:00
[value(strlen_m_term_null(name)*2)] uint16 length;
2005-11-02 01:01:17 +00: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 01:25:58 +00:00
[size_is(size/2),length_is(length/2),charset(UTF16)] uint16 *name;
} winreg_StringBuf;
2003-11-22 05:34:25 +00:00
2007-02-16 15:13:51 +00:00
/******************/
/* Function: 0x09 */
2007-02-15 21:06:33 +00:00
[public] WERROR winreg_EnumKey(
2005-08-17 01:25:58 +00:00
[in,ref] policy_handle *handle,
[in] uint32 enum_index,
[in,out,ref] winreg_StringBuf *name,
2006-09-15 18:34:03 +00:00
[in,out,unique] winreg_StringBuf *keyclass,
2005-08-17 01:25:58 +00:00
[in,out,unique] NTTIME *last_changed_time
2003-11-21 05:28:36 +00:00
);
2009-01-15 23:23:08 +01: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;
2003-11-21 05:28:36 +00:00
/******************/
/* Function: 0x0a */
2004-12-09 07:52:00 +00:00
2007-02-14 21:37:06 +00:00
[public] WERROR winreg_EnumValue(
2005-08-17 01:25:58 +00:00
[in,ref] policy_handle *handle,
[in] uint32 enum_index,
2009-01-15 23:23:08 +01:00
[in,out,ref] winreg_ValNameBuf *name,
2005-08-23 00:41:25 +00:00
[in,out,unique] winreg_Type *type,
2010-08-02 18:32:40 +02:00
[in,out,unique,size_is(size ? *size : 0),length_is(length ? *length : 0),range(0,0x4000000)] uint8 *value,
2005-08-17 01:25:58 +00:00
[in,out,unique] uint32 *size,
[in,out,unique] uint32 *length
2003-11-21 05:28:36 +00:00
);
/******************/
/* Function: 0x0b */
2007-02-15 19:33:03 +00:00
[public] WERROR winreg_FlushKey(
2003-11-21 06:14:14 +00:00
[in,ref] policy_handle *handle
2003-11-21 05:28:36 +00:00
);
/******************/
/* Function: 0x0c */
2007-02-15 19:33:03 +00:00
[public] WERROR winreg_GetKeySecurity(
2004-04-08 22:39:47 +00:00
[in,ref] policy_handle *handle,
2005-08-24 11:01:10 +00:00
[in] security_secinfo sec_info,
2005-08-24 08:31:39 +00:00
[in,out,ref] KeySecurityData *sd
2003-11-21 05:28:36 +00:00
);
/******************/
/* Function: 0x0d */
2003-11-22 05:34:25 +00:00
WERROR winreg_LoadKey(
2004-12-12 00:22:30 +00:00
[in,ref] policy_handle *handle,
2008-02-01 21:35:52 +01:00
[in,unique] winreg_String *keyname,
[in,unique] winreg_String *filename
2003-11-21 05:28:36 +00:00
);
/******************/
/* Function: 0x0e */
2007-10-25 11:26:02 +02: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 19:33:03 +00:00
[public] WERROR winreg_NotifyChangeKeyValue(
2004-12-13 02:04:34 +00:00
[in,ref] policy_handle *handle,
2007-10-25 11:26:02 +02:00
[in] boolean8 watch_subtree,
[in] winreg_NotifyChangeType notify_filter,
2004-12-13 02:04:34 +00:00
[in] uint32 unknown,
[in] winreg_String string1,
2007-10-25 11:26:02 +02:00
[in] winreg_String string2,
2004-12-13 02:04:34 +00:00
[in] uint32 unknown2
2003-11-21 05:28:36 +00:00
);
/******************/
/* Function: 0x0f */
2007-02-15 19:33:03 +00:00
[public] WERROR winreg_OpenKey(
2006-09-15 18:34:03 +00:00
[in,ref] policy_handle *parent_handle,
2003-11-22 05:34:25 +00:00
[in] winreg_String keyname,
2010-04-09 13:49:28 +02:00
[in] winreg_KeyOptions options,
2006-09-07 09:59:39 +00:00
[in] winreg_AccessMask access_mask,
2003-11-22 05:34:25 +00:00
[out,ref] policy_handle *handle
2003-11-21 05:28:36 +00:00
);
/******************/
/* Function: 0x10 */
2007-02-15 19:33:03 +00:00
[public] WERROR winreg_QueryInfoKey(
2003-11-22 05:34:25 +00:00
[in,ref] policy_handle *handle,
2007-02-16 15:13:51 +00:00
[in,out,ref] winreg_String *classname,
2006-09-15 20:36:38 +00:00
[out,ref] uint32 *num_subkeys,
[out,ref] uint32 *max_subkeylen,
2008-10-20 11:53:20 +02:00
[out,ref] uint32 *max_classlen,
2006-09-15 20:36:38 +00: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
2003-11-21 05:28:36 +00:00
);
/******************/
/* Function: 0x11 */
2007-02-14 21:37:06 +00:00
[public] WERROR winreg_QueryValue(
2004-08-13 01:31:11 +00:00
[in,ref] policy_handle *handle,
2008-10-15 17:34:55 +02:00
[in,ref] winreg_String *value_name,
2008-02-01 21:35:52 +01:00
[in,out,unique] winreg_Type *type,
2010-03-05 21:56:50 +01:00
[in,out,unique,size_is(data_size ? *data_size : 0),length_is(data_length ? *data_length : 0),range(0,0x4000000)] uint8 *data,
2008-10-15 17:38:51 +02:00
[in,out,unique] uint32 *data_size,
[in,out,unique] uint32 *data_length
2003-11-21 05:28:36 +00:00
);
/******************/
/* Function: 0x12 */
2010-04-08 23:46:15 +02:00
WERROR winreg_ReplaceKey(
[in,ref] policy_handle *handle,
[in,ref] winreg_String *subkey,
[in,ref] winreg_String *new_file,
[in,ref] winreg_String *old_file
2003-11-21 05:28:36 +00:00
);
/******************/
/* Function: 0x13 */
2010-08-31 16:58:23 +02:00
typedef [public,bitmap32bit] bitmap {
REG_WHOLE_HIVE_VOLATILE = 0x00000001,
REG_REFRESH_HIVE = 0x00000002,
REG_NO_LAZY_FLUSH = 0x00000004,
REG_FORCE_RESTORE = 0x00000008
} winreg_RestoreKeyFlags;
2003-11-22 05:34:25 +00:00
WERROR winreg_RestoreKey(
2007-02-16 15:13:51 +00:00
[in,ref] policy_handle *handle,
[in,ref] winreg_String *filename,
2010-08-31 16:58:23 +02:00
[in] winreg_RestoreKeyFlags flags
2003-11-21 05:28:36 +00:00
);
/******************/
/* Function: 0x14 */
2007-02-16 15:13:51 +00:00
typedef struct {
uint32 data_size;
KeySecurityData sec_data;
uint8 inherit;
} KeySecurityAttribute;
2003-11-22 05:34:25 +00:00
WERROR winreg_SaveKey(
2007-02-16 15:13:51 +00:00
[in,ref] policy_handle *handle,
[in,ref] winreg_String *filename,
[in,unique] KeySecurityAttribute *sec_attrib
2003-11-21 05:28:36 +00:00
);
/******************/
/* Function: 0x15 */
2003-11-22 05:34:25 +00:00
WERROR winreg_SetKeySecurity(
2004-04-08 22:39:47 +00:00
[in,ref] policy_handle *handle,
2007-10-25 11:12:02 +02:00
[in] security_secinfo sec_info,
2007-02-16 15:13:51 +00:00
[in,ref] KeySecurityData *sd
2003-11-21 05:28:36 +00:00
);
/******************/
/* Function: 0x16 */
2003-11-22 05:34:25 +00:00
WERROR winreg_SetValue(
2004-12-09 07:05:47 +00:00
[in,ref] policy_handle *handle,
[in] winreg_String name,
2005-08-23 00:41:25 +00:00
[in] winreg_Type type,
2005-08-17 13:14:40 +00:00
[in,size_is(size),ref] uint8 *data,
2004-12-09 07:05:47 +00:00
[in] uint32 size
2003-11-21 05:28:36 +00:00
);
/******************/
/* Function: 0x17 */
2010-04-08 23:46:15 +02:00
WERROR winreg_UnLoadKey(
[in,ref] policy_handle *handle,
[in,ref] winreg_String *subkey
2003-11-21 05:28:36 +00:00
);
/******************/
/* Function: 0x18 */
2003-11-22 05:34:25 +00:00
WERROR winreg_InitiateSystemShutdown(
2008-02-01 21:35:52 +01:00
[in,unique] uint16 *hostname,
2008-02-19 11:57:32 +01:00
/*
* Note: lsa_String and winreg_String both result
2015-12-03 15:24:23 +01:00
* in WERR_INVALID_PARAMETER
2008-02-19 11:57:32 +01:00
*/
[in,unique] lsa_StringLarge *message,
2004-04-08 22:39:47 +00:00
[in] uint32 timeout,
2004-12-12 00:35:50 +00:00
[in] uint8 force_apps,
2008-10-15 16:25:06 +02:00
[in] uint8 do_reboot
2003-11-21 05:28:36 +00:00
);
/******************/
/* Function: 0x19 */
2003-11-22 05:34:25 +00:00
WERROR winreg_AbortSystemShutdown(
2008-02-01 21:35:52 +01:00
[in,unique] uint16 *server
2003-11-21 05:28:36 +00:00
);
/******************/
/* Function: 0x1a */
2007-02-15 19:33:03 +00:00
[public] WERROR winreg_GetVersion(
2006-09-15 20:36:38 +00:00
[in,ref] policy_handle *handle,
[out,ref] uint32 *version
2003-11-21 05:28:36 +00:00
);
/******************/
/* Function: 0x1b */
2003-11-22 05:34:25 +00:00
WERROR winreg_OpenHKCC(
2008-02-01 21:35:52 +01:00
[in,unique] uint16 *system_name,
2006-09-07 09:59:39 +00:00
[in] winreg_AccessMask access_mask,
2003-11-22 05:34:25 +00:00
[out,ref] policy_handle *handle
2003-11-21 05:28:36 +00:00
);
/******************/
/* Function: 0x1c */
2003-11-22 05:34:25 +00:00
WERROR winreg_OpenHKDD(
2008-02-01 21:35:52 +01:00
[in,unique] uint16 *system_name,
2006-09-07 09:59:39 +00:00
[in] winreg_AccessMask access_mask,
2003-11-22 05:34:25 +00:00
[out,ref] policy_handle *handle
2003-11-21 05:28:36 +00:00
);
2004-12-12 00:22:30 +00:00
typedef struct {
2010-06-29 11:40:24 +02:00
winreg_ValNameBuf *ve_valuename;
uint32 ve_valuelen;
2010-06-29 23:10:47 +02:00
uint32 ve_valueptr;
2010-06-29 11:40:24 +02:00
winreg_Type ve_type;
2004-12-12 00:22:30 +00:00
} QueryMultipleValue;
2010-06-29 11:40:24 +02:00
2003-11-21 05:28:36 +00:00
/******************/
/* Function: 0x1d */
2007-02-14 21:37:06 +00:00
[public] WERROR winreg_QueryMultipleValues(
2004-12-12 00:22:30 +00:00
[in,ref] policy_handle *key_handle,
2010-06-29 11:40:24 +02:00
[in,ref,size_is(num_values),length_is(num_values)] QueryMultipleValue *values_in,
[out,ref,size_is(num_values),length_is(num_values)] QueryMultipleValue *values_out,
2005-08-06 01:01:18 +00:00
[in] uint32 num_values,
2008-02-01 21:35:52 +01:00
[in,out,unique,size_is(*buffer_size),length_is(*buffer_size)] uint8 *buffer,
2005-08-06 01:01:18 +00:00
[in,out,ref] uint32 *buffer_size
2003-11-21 05:28:36 +00:00
);
/******************/
/* Function: 0x1e */
2003-11-22 05:34:25 +00:00
WERROR winreg_InitiateSystemShutdownEx(
2008-02-01 21:35:52 +01:00
[in,unique] uint16 *hostname,
2008-02-19 11:57:32 +01:00
/*
* Note: lsa_String and winreg_String both result
2015-12-03 15:24:23 +01:00
* in WERR_INVALID_PARAMETER
2008-02-19 11:57:32 +01:00
*/
[in,unique] lsa_StringLarge *message,
2004-12-13 11:00:24 +00:00
[in] uint32 timeout,
[in] uint8 force_apps,
2008-10-15 16:25:06 +02:00
[in] uint8 do_reboot,
2004-12-13 11:00:24 +00:00
[in] uint32 reason
);
2003-11-21 05:28:36 +00:00
/******************/
/* Function: 0x1f */
2010-04-08 23:46:15 +02:00
WERROR winreg_SaveKeyEx(
[in,ref] policy_handle *handle,
[in,ref] winreg_String *filename,
[in,unique] KeySecurityAttribute *sec_attrib,
[in] uint32 flags
2003-11-21 05:28:36 +00:00
);
/******************/
/* Function: 0x20 */
2003-11-22 05:34:25 +00:00
WERROR winreg_OpenHKPT(
2008-02-01 21:35:52 +01:00
[in,unique] uint16 *system_name,
2006-09-07 09:59:39 +00:00
[in] winreg_AccessMask access_mask,
2003-11-22 05:34:25 +00:00
[out,ref] policy_handle *handle
2003-11-21 05:28:36 +00:00
);
/******************/
/* Function: 0x21 */
2003-11-22 05:34:25 +00:00
WERROR winreg_OpenHKPN(
2008-02-01 21:35:52 +01:00
[in,unique] uint16 *system_name,
2006-09-07 09:59:39 +00:00
[in] winreg_AccessMask access_mask,
2003-11-22 05:34:25 +00:00
[out,ref] policy_handle *handle
2003-11-21 05:28:36 +00:00
);
/******************/
2004-08-13 01:31:11 +00:00
/* Function: 0x22 */
2010-06-29 12:04:56 +02:00
[public] WERROR winreg_QueryMultipleValues2(
2010-04-09 17:28:04 +02:00
[in,ref] policy_handle *key_handle,
2010-06-29 12:04:56 +02:00
[in,ref,size_is(num_values),length_is(num_values)] QueryMultipleValue *values_in,
[out,ref,size_is(num_values),length_is(num_values)] QueryMultipleValue *values_out,
2010-04-09 17:28:04 +02:00
[in] uint32 num_values,
2010-06-29 12:04:56 +02:00
[in,out,unique,size_is(*offered),length_is(*offered)] uint8 *buffer,
[in,ref] uint32 *offered,
2010-04-09 17:28:04 +02:00
[out,ref] uint32 *needed
2003-11-21 05:28:36 +00:00
);
2010-04-09 00:10:07 +02:00
/******************/
/* Function: 0x23 */
WERROR winreg_DeleteKeyEx(
[in,ref] policy_handle *handle,
[in,ref] winreg_String *key,
[in] winreg_AccessMask access_mask,
[in] uint32 reserved
);
2003-11-21 05:28:36 +00:00
}