2003-11-21 16:14:17 +03:00
#include "idl_types.h"
2003-11-21 08:28:36 +03:00
/*
winreg interface definition
*/
2004-10-27 08:48:41 +04: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),
2004-11-01 13:30:34 +03:00
helpstring("Remote Registry Service"),
depends(lsa)
2003-11-21 08:28:36 +03:00
] interface winreg
{
2003-11-21 09:14:14 +03:00
typedef struct {
2003-11-23 13:50:52 +03:00
[value(strlen_m_term(r->name)*2)] uint16 name_len;
[value(r->name_len)] uint16 name_size;
2003-11-23 09:29:11 +03:00
unistr *name;
2003-11-21 09:14:14 +03:00
} winreg_String;
2003-11-22 08:34:25 +03:00
typedef struct {
uint16 unknown0;
uint16 unknown1;
} winreg_OpenUnknown;
2003-11-21 08:28:36 +03:00
/******************/
/* Function: 0x00 */
2003-11-22 08:34:25 +03:00
WERROR winreg_OpenHKCR(
[in] winreg_OpenUnknown *unknown,
[in] uint32 access_required,
[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(
[in] winreg_OpenUnknown *unknown,
[in] uint32 access_required,
[out,ref] policy_handle *handle
2003-11-21 08:28:36 +03:00
);
/******************/
/* Function: 0x02 */
2003-11-22 08:34:25 +03:00
WERROR winreg_OpenHKLM(
[in] winreg_OpenUnknown *unknown,
2003-11-21 08:28:36 +03:00
[in] uint32 access_required,
[out,ref] policy_handle *handle
);
/******************/
/* Function: 0x03 */
2003-11-22 08:34:25 +03:00
WERROR winreg_OpenHKPD(
[in] winreg_OpenUnknown *unknown,
[in] uint32 access_required,
[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(
[in] winreg_OpenUnknown *unknown,
[in] uint32 access_required,
[out,ref] policy_handle *handle
2003-11-21 08:28:36 +03:00
);
/******************/
/* Function: 0x05 */
2003-11-22 08:34:25 +03:00
WERROR winreg_CloseKey(
2003-11-21 08:28:36 +03:00
[in,out,ref] policy_handle *handle
);
/******************/
/* Function: 0x06 */
2003-11-22 08:34:25 +03:00
WERROR winreg_CreateKey(
2004-04-05 17:50:45 +04:00
[in,out,ref] policy_handle *handle,
[in] winreg_String key,
[in] winreg_String class,
2004-04-09 02:39:47 +04:00
[in] uint32 reserved,
[out] uint32 *unknown,
2004-04-05 17:50:45 +04:00
[in] uint32 access_mask,
2004-04-09 02:39:47 +04:00
[in,ref] uint32 *sec_info,
[in] sec_desc_buf *sec_desc
2003-11-21 08:28:36 +03:00
);
/******************/
/* Function: 0x07 */
2003-11-22 08:34:25 +03:00
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
);
typedef struct {
uint32 low;
uint32 high;
} winreg_Time;
2003-11-22 08:34:25 +03:00
typedef struct {
uint32 unknown;
winreg_String key_name;
} winreg_EnumKeyNameRequest;
typedef struct {
uint32 unknown1;
uint32 unknown2;
lstring name;
} winreg_EnumKeyNameResponse;
2003-11-21 08:28:36 +03:00
/******************/
/* Function: 0x09 */
2003-11-22 08:34:25 +03:00
WERROR winreg_EnumKey(
[in,ref] policy_handle *handle,
2003-12-12 14:49:29 +03:00
[in] uint32 enum_index,
2003-11-22 08:34:25 +03:00
[in,out] uint16 key_name_len,
[in,out] uint16 unknown,
2003-11-22 09:10:32 +03:00
[in] winreg_EnumKeyNameRequest *in_name,
[out] winreg_EnumKeyNameResponse *out_name,
2003-11-22 08:34:25 +03:00
[in,out] winreg_String *class,
[in,out] winreg_Time *last_changed_time
2003-11-21 08:28:36 +03:00
);
/******************/
/* Function: 0x0a */
2004-12-09 10:52:00 +03:00
/*
this is equivalent IDL to a winreg_String, but we need to
have absolute control over the length/size fields as the
server looks at those to see what size buffer we have, so
we can't use the automatic unistr handing in pidl.
*/
typedef struct {
uint16 length;
uint16 size;
[size_is(size/2),length_is(length/2)] uint16 *name;
} winreg_EnumValueString;
2003-11-22 08:34:25 +03:00
WERROR winreg_EnumValue(
[in,ref] policy_handle *handle,
2004-12-09 10:52:00 +03:00
[in] uint32 enum_index,
[in] winreg_EnumValueString name_in,
[out] winreg_String name_out,
2003-11-22 08:34:25 +03:00
[in,out] uint32 *type,
2004-12-09 10:52:00 +03:00
[in,out,size_is(*size),length_is(*length)] uint8 *value,
[in,out] uint32 *size,
[in,out] uint32 *length
2003-11-21 08:28:36 +03:00
);
/******************/
/* Function: 0x0b */
2003-11-22 08:34:25 +03:00
WERROR winreg_FlushKey(
2003-11-21 09:14:14 +03:00
[in,ref] policy_handle *handle
2003-11-21 08:28:36 +03:00
);
2004-10-04 10:29:06 +04:00
typedef struct {
2004-12-12 02:28:48 +03:00
[size_is(size),length_is(len)] uint8 *data;
uint32 size;
2004-10-04 10:29:06 +04:00
uint32 len;
} KeySecurityData;
2003-11-21 08:28:36 +03:00
/******************/
/* Function: 0x0c */
2003-11-22 08:34:25 +03:00
WERROR winreg_GetKeySecurity(
2004-04-09 02:39:47 +04:00
[in,ref] policy_handle *handle,
2004-12-12 02:28:48 +03:00
[in] uint32 access_mask,
[in,out,ref] KeySecurityData *data
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,
[in] winreg_String *keyname,
[in] winreg_String *filename
2003-11-21 08:28:36 +03:00
);
/******************/
/* Function: 0x0e */
2003-11-22 08:34:25 +03:00
WERROR winreg_NotifyChangeKeyValue(
2003-11-21 08:28:36 +03:00
);
/******************/
/* Function: 0x0f */
2003-11-22 08:34:25 +03:00
WERROR winreg_OpenKey(
[in,ref] policy_handle *handle,
[in] winreg_String keyname,
[in] uint32 unknown,
[in] uint32 access_mask,
[out,ref] policy_handle *handle
2003-11-21 08:28:36 +03:00
);
/******************/
/* Function: 0x10 */
2003-11-22 08:34:25 +03:00
WERROR winreg_QueryInfoKey(
[in,ref] policy_handle *handle,
[in] winreg_String class,
2003-11-22 09:10:32 +03:00
[out] winreg_String class,
2003-11-22 08:34:25 +03:00
[out] uint32 num_subkeys,
[out] uint32 max_subkeylen,
[out] uint32 max_subkeysize,
[out] uint32 num_values,
[out] uint32 max_valnamelen,
[out] uint32 max_valbufsize,
[out] uint32 secdescsize,
[out] winreg_Time last_changed_time
2003-11-21 08:28:36 +03:00
);
/******************/
/* Function: 0x11 */
2003-11-22 08:34:25 +03:00
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,
[in,out] uint32 *type,
2004-12-09 10:05:47 +03:00
[in,out,size_is(*size),length_is(*length)] uint8 *data,
[in,out] uint32 *size,
[in,out] uint32 *length
2003-11-21 08:28:36 +03:00
);
/******************/
/* Function: 0x12 */
2003-11-22 08:34:25 +03:00
WERROR winreg_ReplaceKey(
2003-11-21 08:28:36 +03:00
);
/******************/
/* Function: 0x13 */
2003-11-22 08:34:25 +03:00
WERROR winreg_RestoreKey(
2003-11-21 08:28:36 +03:00
);
/******************/
/* Function: 0x14 */
2003-11-22 08:34:25 +03:00
WERROR winreg_SaveKey(
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,
2004-12-12 03:22:30 +03:00
[in] uint32 access_mask,
[in,out,ref] KeySecurityData *data
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,
[in] uint32 type,
[in,size_is(size)] uint8 *data,
[in] uint32 size
2003-11-21 08:28:36 +03:00
);
/******************/
/* Function: 0x17 */
2003-11-22 08:34:25 +03:00
WERROR winreg_UnLoadKey(
2003-11-21 08:28:36 +03:00
);
/******************/
/* Function: 0x18 */
2003-11-22 08:34:25 +03:00
WERROR winreg_InitiateSystemShutdown(
2004-12-12 03:35:50 +03:00
[in] uint16 *hostname,
[in] winreg_String *message,
2004-04-09 02:39:47 +04:00
[in] uint32 timeout,
2004-12-12 03:35:50 +03:00
[in] uint8 force_apps,
[in] uint8 reboot
2003-11-21 08:28:36 +03:00
);
/******************/
/* Function: 0x19 */
2003-11-22 08:34:25 +03:00
WERROR winreg_AbortSystemShutdown(
2004-12-12 03:35:50 +03:00
[in] uint16 *server
2003-11-21 08:28:36 +03:00
);
/******************/
/* Function: 0x1a */
2003-11-22 08:34:25 +03:00
WERROR winreg_GetVersion(
2003-11-21 08:28:36 +03:00
[in,ref] policy_handle *handle,
[out] uint32 version
);
/******************/
/* Function: 0x1b */
2003-11-22 08:34:25 +03:00
WERROR winreg_OpenHKCC(
[in] winreg_OpenUnknown *unknown,
[in] uint32 access_required,
[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(
[in] winreg_OpenUnknown *unknown,
[in] uint32 access_required,
[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;
uint32 type;
uint32 offset;
uint32 length;
} QueryMultipleValue;
2003-11-21 08:28:36 +03:00
/******************/
/* Function: 0x1d */
2003-11-22 08:34:25 +03:00
WERROR winreg_QueryMultipleValues(
2004-12-12 03:22:30 +03:00
[in,ref] policy_handle *key_handle,
[in,out,size_is(num_values),length_is(num_values),ref] QueryMultipleValue *values,
[in] uint32 num_values,
[in,out,size_is(*buffer_size),length_is(*buffer_size)] uint8 *buffer,
[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(
2004-04-09 02:39:47 +04:00
);
2003-11-21 08:28:36 +03:00
/******************/
/* Function: 0x1f */
2003-11-22 08:34:25 +03:00
WERROR winreg_SaveKeyEx(
2003-11-21 08:28:36 +03:00
);
/******************/
/* Function: 0x20 */
2003-11-22 08:34:25 +03:00
WERROR winreg_OpenHKPT(
[in] winreg_OpenUnknown *unknown,
[in] uint32 access_required,
[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(
[in] winreg_OpenUnknown *unknown,
[in] uint32 access_required,
[out,ref] policy_handle *handle
2003-11-21 08:28:36 +03:00
);
/******************/
2004-08-13 05:31:11 +04:00
/* Function: 0x22 */
2003-11-22 08:34:25 +03:00
WERROR winreg_QueryMultipleValues2(
2003-11-21 08:28:36 +03:00
);
}