summaryrefslogtreecommitdiff
path: root/source4/librpc/idl/winreg.idl
blob: 539889b515f778fdfdf6613ec9493411bae602eb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
#include "idl_types.h"

/*
  winreg interface definition
*/

[ uuid(338cd001-2244-31f1-aaaa-900038001003),
  version(1.0),
  pointer_default(unique)
] interface winreg
{
	typedef struct {
		[value(strlen_m_term(r->name)*2)] uint16 name_len;
		[value(r->name_len)]              uint16 name_size;
		unistr *name;
	} winreg_String;

	typedef struct {
		uint16 unknown0;
		uint16 unknown1;
	} winreg_OpenUnknown;

	/******************/
	/* Function: 0x00 */
	WERROR winreg_OpenHKCR(
		[in]      winreg_OpenUnknown *unknown,
		[in]      uint32 access_required,
		[out,ref] policy_handle *handle
	);

	/******************/
	/* Function: 0x01 */
	WERROR winreg_OpenHKCU(
		[in]      winreg_OpenUnknown *unknown,
		[in]      uint32 access_required,
		[out,ref] policy_handle *handle
	);

	/******************/
	/* Function: 0x02 */
	WERROR winreg_OpenHKLM(
		[in]      winreg_OpenUnknown *unknown,
		[in]      uint32 access_required,
		[out,ref] policy_handle *handle
	);

	/******************/
	/* Function: 0x03 */
	WERROR winreg_OpenHKPD(
		[in]      winreg_OpenUnknown *unknown,
		[in]      uint32 access_required,
		[out,ref] policy_handle *handle
	);

	/******************/
	/* Function: 0x04 */
	WERROR winreg_OpenHKU(
		[in]      winreg_OpenUnknown *unknown,
		[in]      uint32 access_required,
		[out,ref] policy_handle *handle
	);

	/******************/
	/* Function: 0x05 */
	WERROR winreg_CloseKey(
		[in,out,ref] policy_handle *handle
	);

	/******************/
	/* Function: 0x06 */
	WERROR winreg_CreateKey(
		[in,out,ref] policy_handle *handle,
		[in] winreg_String key,
		[in] winreg_String class,
		[in] uint32 reserved,
		[out] uint32 *unknown,
		[in] uint32 access_mask,
		[in,ref] uint32 *sec_info,
		[in] sec_desc_buf *sec_desc
	);

	/******************/
	/* Function: 0x07 */
	WERROR winreg_DeleteKey(
		[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 {
		uint32 low;
		uint32 high;
	} winreg_Time;

	typedef struct {
		uint32 unknown;
		winreg_String key_name;
	} winreg_EnumKeyNameRequest;

	typedef struct {
		uint32 unknown1;
		uint32 unknown2;
		lstring name;
	} winreg_EnumKeyNameResponse;

	/******************/
	/* Function: 0x09 */
	WERROR winreg_EnumKey(
		[in,ref]    policy_handle *handle,
		[in] uint32 enum_index,
		[in,out]    uint16 key_name_len,
		[in,out]    uint16 unknown,
		[in]        winreg_EnumKeyNameRequest *in_name,
		[out]       winreg_EnumKeyNameResponse *out_name,
		[in,out]    winreg_String *class,
		[in,out]    winreg_Time *last_changed_time
	);

	typedef struct {
		uint32 max_len;
		uint32 offset;
		uint32 len;
		uint8 buffer[len];
	} winreg_Uint8buf;

	/******************/
	/* Function: 0x0a */
	WERROR winreg_EnumValue(
		[in,ref] policy_handle *handle,
		[in] uint32 enum_index,
		[in,out,ref] winreg_String *name,
		[in,out] uint32 *type,
		[in,out] winreg_Uint8buf *value,
		[in,out] uint32 *requested_len,
		[in,out] uint32 *returned_len
	);

	/******************/
	/* Function: 0x0b */
	WERROR winreg_FlushKey(
		[in,ref] policy_handle *handle
	);

	/******************/
	/* Function: 0x0c */
	WERROR winreg_GetKeySecurity(
		[in,ref] policy_handle *handle,
		[in] uint32 sec_info,
		[in] uint32 *len1,
		[in] uint32 empty,
		[in] uint32 len2,
		[in] uint32 unknown1,
		[in] uint32 unknown2,
		[out] sec_desc_buf *data
	);

	/******************/
	/* Function: 0x0d */
	WERROR winreg_LoadKey(
	);

	/******************/
	/* Function: 0x0e */
	WERROR winreg_NotifyChangeKeyValue(
	);

	/******************/
	/* Function: 0x0f */
	WERROR winreg_OpenKey(
		[in,ref] policy_handle *handle,
		[in] winreg_String keyname,
		[in] uint32 unknown,
		[in] uint32 access_mask,
		[out,ref] policy_handle *handle
	);

	/******************/
	/* Function: 0x10 */
	WERROR winreg_QueryInfoKey(
		[in,ref] policy_handle *handle,
		[in] winreg_String class,
		[out] winreg_String class,
		[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
	);

	/******************/
	/* Function: 0x11 */
	WERROR winreg_QueryValue(
	);

	/******************/
	/* Function: 0x12 */
	WERROR winreg_ReplaceKey(
	);

	/******************/
	/* Function: 0x13 */
	WERROR winreg_RestoreKey(
	);

	/******************/
	/* Function: 0x14 */
	WERROR winreg_SaveKey(
	);

	/******************/
	/* Function: 0x15 */
	WERROR winreg_SetKeySecurity(
		[in,ref] policy_handle *handle,
		[in] uint32 sec_info,
		[in] sec_desc_buf *sec_desc
	);

	typedef struct {
		uint32 max_len;
		[length_is(buf_max_len)] uint8 *buffer;
		uint32 len;
	} winreg_Value;

	/******************/
	/* Function: 0x16 */
	WERROR winreg_SetValue(
		[in,ref] policy_handle *handle,
		[in] winreg_String name,
		[in] uint32 type,
		[in] winreg_Value value
	);

	/******************/
	/* Function: 0x17 */
	WERROR winreg_UnLoadKey(
	);

	/******************/
	/* Function: 0x18 */
	WERROR winreg_InitiateSystemShutdown(
		[in]	winreg_String hostname,
		[in]	winreg_String message,
		[in]	uint32 timeout,
		[in]	uint16 flags,
		[out]	uint16 status
	);

	/******************/
	/* Function: 0x19 */
	WERROR winreg_AbortSystemShutdown(
		[in,ref]	uint16 *server
	);

	/******************/
	/* Function: 0x1a */
	WERROR winreg_GetVersion(
		[in,ref] policy_handle *handle,
		[out]    uint32 version
	);

	/******************/
	/* Function: 0x1b */
	WERROR winreg_OpenHKCC(
		[in]      winreg_OpenUnknown *unknown,
		[in]      uint32 access_required,
		[out,ref] policy_handle *handle
	);

	/******************/
	/* Function: 0x1c */
	WERROR winreg_OpenHKDD(
		[in]      winreg_OpenUnknown *unknown,
		[in]      uint32 access_required,
		[out,ref] policy_handle *handle
	);

	/******************/
	/* Function: 0x1d */
	WERROR winreg_QueryMultipleValues(
	);

	/******************/
	/* Function: 0x1e */
	WERROR winreg_InitiateSystemShutdownEx(
		);

	/******************/
	/* Function: 0x1f */
	WERROR winreg_SaveKeyEx(
	);

	/******************/
	/* Function: 0x20 */
	WERROR winreg_OpenHKPT(
		[in]      winreg_OpenUnknown *unknown,
		[in]      uint32 access_required,
		[out,ref] policy_handle *handle
	);

	/******************/
	/* Function: 0x21 */
	WERROR winreg_OpenHKPN(
		[in]      winreg_OpenUnknown *unknown,
		[in]      uint32 access_required,
		[out,ref] policy_handle *handle
	);

	/******************/
	/* Function: 0x21 */
	WERROR winreg_QueryMultipleValues2(
	);
}