2003-11-21 08:28:36 +03:00
/*
winreg interface definition
*/
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),
r6973: Merge new version of pidl into the main SAMBA_4_0 branch.
The main difference in this new version is the extra data structure generated
between the IDL data structure and the NDR parser:
IDL -> NDR -> { ndr_parser, ndr_header, eparser, etc }
This makes the ndr_parser.pm internals much more sane.
Other changes include:
- Remove unnecessary calls with NDR_BUFFERS (for example, GUID doesn't have any buffers, just scalars) as well as some (unnecessary) nested setting of flags.
- Parse array loops in the C code rather then calling ndr_pull_array(). This allows us to have, for example, arrays of pointers or arrays of pointers to arrays, etc..
- Use if() {} rather then if () goto foo; everywhere
- NDR_IN no longer implies LIBNDR_FLAG_REF_ALLOC
- By default, top level pointers are now "ref" (as is the default in
most other IDL compilers). This can be overridden using the
default_pointer_top() property.
- initial work on new ethereal parser generators by Alan DeKok and me
- pidl now writes errors in the standard format used by compilers, which
is parsable by most editors
- ability to warn about the fact that pidl extension(s) have been used,
useful for making sure IDL files work with other IDL compilers.
oh, and there's probably some other things I can't think of right now..
(This used to be commit 13cf227615f6b9e0e5fa62e59197024410254f01)
2005-05-25 17:50:27 +04:00
pointer_default_top(unique),
2004-11-01 13:30:34 +03:00
helpstring("Remote Registry Service"),
2006-05-21 16:58:39 +04:00
depends(lsa,initshutdown,security),
keepref
2003-11-21 08:28:36 +03:00
] interface winreg
{
2005-08-24 15:01:10 +04:00
declare bitmap security_secinfo;
2006-09-07 13:59:39 +04:00
typedef [bitmap32bit] bitmap {
} winreg_AccessMask;
2005-08-23 04:41:25 +04:00
typedef [v1_enum] enum {
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(
2005-07-06 05:53:34 +04:00
[in] 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(
2005-07-06 05:53:34 +04:00
[in] 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 */
2003-11-22 08:34:25 +03:00
WERROR winreg_OpenHKLM(
2005-07-06 05:53:34 +04:00
[in] 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(
2005-07-06 05:53:34 +04:00
[in] 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(
2005-07-06 05:53:34 +04:00
[in] 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 */
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 */
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;
2003-11-22 08:34:25 +03:00
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 */
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
);
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
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
2003-11-22 08:34:25 +03:00
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 */
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
);
/******************/
/* 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,
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,
[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(
2004-12-13 05:04:34 +03:00
[in,ref] policy_handle *handle,
[in] uint8 watch_subtree,
[in] uint32 notify_filter,
[in] uint32 unknown,
[in] winreg_String string1,
[in] winreg_String string2,
[in] uint32 unknown2
2003-11-21 08:28:36 +03:00
);
/******************/
/* Function: 0x0f */
2003-11-22 08:34:25 +03:00
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 */
2003-11-22 08:34:25 +03:00
WERROR winreg_QueryInfoKey(
[in,ref] policy_handle *handle,
2006-05-21 16:58:39 +04:00
[in] winreg_String class_in,
[out] winreg_String *class_out,
2006-09-15 22:34:03 +04: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] NTTIME *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,
2005-08-23 04:41:25 +04:00
[in,out] winreg_Type *type,
2005-05-27 19:49:15 +04:00
[in,out,size_is(*size),length_is(*length)] uint8 *data,
2004-12-09 10:05:47 +03:00
[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,
2006-09-07 13:59:39 +04:00
[in] winreg_AccessMask access_mask,
[in,out,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 */
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,
2005-03-17 23:28:01 +03:00
[in] initshutdown_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,
2006-09-15 22:34:03 +04:00
[out] uint32 *version
2003-11-21 08:28:36 +03:00
);
/******************/
/* Function: 0x1b */
2003-11-22 08:34:25 +03:00
WERROR winreg_OpenHKCC(
2005-07-06 05:53:34 +04:00
[in] 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(
2005-07-06 05:53:34 +04:00
[in] 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 */
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,
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,
[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-12-13 14:00:24 +03:00
[in] uint16 *hostname,
2005-03-17 23:28:01 +03:00
[in] initshutdown_String *message,
2004-12-13 14:00:24 +03:00
[in] uint32 timeout,
[in] uint8 force_apps,
[in] uint8 reboot,
[in] uint32 reason
);
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(
2005-07-06 05:53:34 +04:00
[in] 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(
2005-07-06 05:53:34 +04:00
[in] 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 */
2003-11-22 08:34:25 +03:00
WERROR winreg_QueryMultipleValues2(
2003-11-21 08:28:36 +03:00
);
}