-
-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathregistry_generated.go
624 lines (574 loc) · 19.3 KB
/
registry_generated.go
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
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
// This file was autogenerated using go run mkcode.go -- registry.go
// DO NOT EDIT.
package ntdll
import "unsafe"
import "reflect"
// The KeyInformationClass constants have been derived from the KEY_INFORMATION_CLASS enum definition.
type KeyInformationClass uint32
const (
KeyBasicInformation KeyInformationClass = 0
KeyNodeInformation = 1
KeyFullInformation = 2
KeyNameInformation = 3
KeyCachedInformation = 4
KeyFlagsInformation = 5
KeyVirtualizationInformation = 6
KeyHandleTagsInformation = 7
MaxKeyInfoClass = 8
)
// The KeyValueInformationClass constants have been derived from the KEY_VALUE_INFORMATION_CLASS enum definition.
type KeyValueInformationClass uint32
const (
KeyValueBasicInformation KeyValueInformationClass = 0
KeyValueFullInformation = 1
KeyValuePartialInformation = 2
KeyValueFullInformationAlign64 = 3
KeyValuePartialInformationAlign64 = 4
MaxKeyValueInfoClass = 5
)
// The KeySetInformationClass constants have been derived from the KEY_SET_INFORMATION_CLASS enum definition.
type KeySetInformationClass uint32
const (
KeyWriteTimeInformation KeySetInformationClass = 0
KeyWow64FlagsInformation = 1
KeyControlFlagsInformation = 2
KeySetVirtualizationInformation = 3
KeySetDebugInformation = 4
KeySetHandleTagsInformation = 5
MaxKeySetInfoClass = 6
)
var (
procNtCreateKey = modntdll.NewProc("NtCreateKey")
procNtCreateKeyTransacted = modntdll.NewProc("NtCreateKeyTransacted")
procNtDeleteKey = modntdll.NewProc("NtDeleteKey")
procNtDeleteValueKey = modntdll.NewProc("NtDeleteValueKey")
procNtEnumerateKey = modntdll.NewProc("NtEnumerateKey")
procNtEnumerateValueKey = modntdll.NewProc("NtEnumerateValueKey")
procNtFlushKey = modntdll.NewProc("NtFlushKey")
procNtNotifyChangeKey = modntdll.NewProc("NtNotifyChangeKey")
procNtNotifyChangeMultipleKeys = modntdll.NewProc("NtNotifyChangeMultipleKeys")
procNtOpenKey = modntdll.NewProc("NtOpenKey")
procNtOpenKeyTransacted = modntdll.NewProc("NtOpenKeyTransacted")
procNtOpenKeyTransactedEx = modntdll.NewProc("NtOpenKeyTransactedEx")
procNtQueryKey = modntdll.NewProc("NtQueryKey")
procNtQueryMultipleValueKey = modntdll.NewProc("NtQueryMultipleValueKey")
procNtQueryValueKey = modntdll.NewProc("NtQueryValueKey")
procNtRenameKey = modntdll.NewProc("NtRenameKey")
procNtSetInformationKey = modntdll.NewProc("NtSetInformationKey")
procNtSetValueKey = modntdll.NewProc("NtSetValueKey")
)
// KeyValueEntry has been derived from the KEY_VALUE_ENTRY struct definition.
type KeyValueEntry struct {
ValueName *UnicodeString
DataLength uint32
DataOffset uint32
Type uint32
}
// KeyBasicInformationT has been derived from the KEY_BASIC_INFORMATION struct definition.
type KeyBasicInformationT struct {
LastWriteTime int64
TitleIndex uint32
NameLength uint32
Name [1]uint16
}
// NameSlice returns a slice over the elements of KeyBasicInformationT.Name.
//
// Beware: The data is not copied out of KeyBasicInformationT. The size can usually be taken from an other member of the struct (KeyBasicInformationT).
func (t *KeyBasicInformationT) NameSlice(size int) []uint16 {
s := []uint16{}
hdr := (*reflect.SliceHeader)(unsafe.Pointer(&s))
hdr.Data = uintptr(unsafe.Pointer(&t.Name[0]))
hdr.Len = size
hdr.Cap = size
return s
}
// SetNameSlice copies s into the memory at KeyBasicInformationT.Name.
//
// Beware: No bounds check is performed. Another member of the struct (KeyBasicInformationT) usually has to be set to the array size.
func (t *KeyBasicInformationT) SetNameSlice(s []uint16) {
s1 := []uint16{}
hdr := (*reflect.SliceHeader)(unsafe.Pointer(&s1))
hdr.Data = uintptr(unsafe.Pointer(&t.Name[0]))
hdr.Len = len(s)
hdr.Cap = len(s)
copy(s1, s)
}
// KeyNodeInformationT has been derived from the KEY_NODE_INFORMATION struct definition.
type KeyNodeInformationT struct {
LastWriteTime int64
TitleIndex uint32
ClassOffset uint32
ClassLength uint32
NameLength uint32
Name [1]uint16
}
// NameSlice returns a slice over the elements of KeyNodeInformationT.Name.
//
// Beware: The data is not copied out of KeyNodeInformationT. The size can usually be taken from an other member of the struct (KeyNodeInformationT).
func (t *KeyNodeInformationT) NameSlice(size int) []uint16 {
s := []uint16{}
hdr := (*reflect.SliceHeader)(unsafe.Pointer(&s))
hdr.Data = uintptr(unsafe.Pointer(&t.Name[0]))
hdr.Len = size
hdr.Cap = size
return s
}
// SetNameSlice copies s into the memory at KeyNodeInformationT.Name.
//
// Beware: No bounds check is performed. Another member of the struct (KeyNodeInformationT) usually has to be set to the array size.
func (t *KeyNodeInformationT) SetNameSlice(s []uint16) {
s1 := []uint16{}
hdr := (*reflect.SliceHeader)(unsafe.Pointer(&s1))
hdr.Data = uintptr(unsafe.Pointer(&t.Name[0]))
hdr.Len = len(s)
hdr.Cap = len(s)
copy(s1, s)
}
// KeyFullInformationT has been derived from the KEY_FULL_INFORMATION struct definition.
type KeyFullInformationT struct {
LastWriteTime int64
TitleIndex uint32
ClassOffset uint32
ClassLength uint32
SubKeys uint32
MaxNameLen uint32
MaxClassLen uint32
Values uint32
MaxValueNameLen uint32
MaxValueDataLen uint32
Class [1]uint16
}
// ClassSlice returns a slice over the elements of KeyFullInformationT.Class.
//
// Beware: The data is not copied out of KeyFullInformationT. The size can usually be taken from an other member of the struct (KeyFullInformationT).
func (t *KeyFullInformationT) ClassSlice(size int) []uint16 {
s := []uint16{}
hdr := (*reflect.SliceHeader)(unsafe.Pointer(&s))
hdr.Data = uintptr(unsafe.Pointer(&t.Class[0]))
hdr.Len = size
hdr.Cap = size
return s
}
// SetClassSlice copies s into the memory at KeyFullInformationT.Class.
//
// Beware: No bounds check is performed. Another member of the struct (KeyFullInformationT) usually has to be set to the array size.
func (t *KeyFullInformationT) SetClassSlice(s []uint16) {
s1 := []uint16{}
hdr := (*reflect.SliceHeader)(unsafe.Pointer(&s1))
hdr.Data = uintptr(unsafe.Pointer(&t.Class[0]))
hdr.Len = len(s)
hdr.Cap = len(s)
copy(s1, s)
}
// KeyNameInformationT has been derived from the KEY_NAME_INFORMATION struct definition.
type KeyNameInformationT struct {
NameLength uint32
Name [1]uint16
}
// NameSlice returns a slice over the elements of KeyNameInformationT.Name.
//
// Beware: The data is not copied out of KeyNameInformationT. The size can usually be taken from an other member of the struct (KeyNameInformationT).
func (t *KeyNameInformationT) NameSlice(size int) []uint16 {
s := []uint16{}
hdr := (*reflect.SliceHeader)(unsafe.Pointer(&s))
hdr.Data = uintptr(unsafe.Pointer(&t.Name[0]))
hdr.Len = size
hdr.Cap = size
return s
}
// SetNameSlice copies s into the memory at KeyNameInformationT.Name.
//
// Beware: No bounds check is performed. Another member of the struct (KeyNameInformationT) usually has to be set to the array size.
func (t *KeyNameInformationT) SetNameSlice(s []uint16) {
s1 := []uint16{}
hdr := (*reflect.SliceHeader)(unsafe.Pointer(&s1))
hdr.Data = uintptr(unsafe.Pointer(&t.Name[0]))
hdr.Len = len(s)
hdr.Cap = len(s)
copy(s1, s)
}
// KeyCachedInformationT has been derived from the KEY_CACHED_INFORMATION struct definition.
type KeyCachedInformationT struct {
LastWriteTime int64
TitleIndex uint32
SubKeys uint32
MaxNameLen uint32
Values uint32
MaxValueNameLen uint32
MaxValueDataLen uint32
NameLength uint32
}
// KeyValueBasicInformationT has been derived from the KEY_VALUE_BASIC_INFORMATION struct definition.
type KeyValueBasicInformationT struct {
TitleIndex uint32
Type uint32
NameLength uint32
Name [1]uint16
}
// NameSlice returns a slice over the elements of KeyValueBasicInformationT.Name.
//
// Beware: The data is not copied out of KeyValueBasicInformationT. The size can usually be taken from an other member of the struct (KeyValueBasicInformationT).
func (t *KeyValueBasicInformationT) NameSlice(size int) []uint16 {
s := []uint16{}
hdr := (*reflect.SliceHeader)(unsafe.Pointer(&s))
hdr.Data = uintptr(unsafe.Pointer(&t.Name[0]))
hdr.Len = size
hdr.Cap = size
return s
}
// SetNameSlice copies s into the memory at KeyValueBasicInformationT.Name.
//
// Beware: No bounds check is performed. Another member of the struct (KeyValueBasicInformationT) usually has to be set to the array size.
func (t *KeyValueBasicInformationT) SetNameSlice(s []uint16) {
s1 := []uint16{}
hdr := (*reflect.SliceHeader)(unsafe.Pointer(&s1))
hdr.Data = uintptr(unsafe.Pointer(&t.Name[0]))
hdr.Len = len(s)
hdr.Cap = len(s)
copy(s1, s)
}
// KeyValueFullInformationT has been derived from the KEY_VALUE_FULL_INFORMATION struct definition.
type KeyValueFullInformationT struct {
TitleIndex uint32
Type uint32
DataOffset uint32
DataLength uint32
NameLength uint32
Name [1]uint16
}
// NameSlice returns a slice over the elements of KeyValueFullInformationT.Name.
//
// Beware: The data is not copied out of KeyValueFullInformationT. The size can usually be taken from an other member of the struct (KeyValueFullInformationT).
func (t *KeyValueFullInformationT) NameSlice(size int) []uint16 {
s := []uint16{}
hdr := (*reflect.SliceHeader)(unsafe.Pointer(&s))
hdr.Data = uintptr(unsafe.Pointer(&t.Name[0]))
hdr.Len = size
hdr.Cap = size
return s
}
// SetNameSlice copies s into the memory at KeyValueFullInformationT.Name.
//
// Beware: No bounds check is performed. Another member of the struct (KeyValueFullInformationT) usually has to be set to the array size.
func (t *KeyValueFullInformationT) SetNameSlice(s []uint16) {
s1 := []uint16{}
hdr := (*reflect.SliceHeader)(unsafe.Pointer(&s1))
hdr.Data = uintptr(unsafe.Pointer(&t.Name[0]))
hdr.Len = len(s)
hdr.Cap = len(s)
copy(s1, s)
}
// KeyValuePartialInformationT has been derived from the KEY_VALUE_PARTIAL_INFORMATION struct definition.
type KeyValuePartialInformationT struct {
TitleIndex uint32
Type uint32
DataLength uint32
Data [1]byte
}
// DataSlice returns a slice over the elements of KeyValuePartialInformationT.Data.
//
// Beware: The data is not copied out of KeyValuePartialInformationT. The size can usually be taken from an other member of the struct (KeyValuePartialInformationT).
func (t *KeyValuePartialInformationT) DataSlice(size int) []byte {
s := []byte{}
hdr := (*reflect.SliceHeader)(unsafe.Pointer(&s))
hdr.Data = uintptr(unsafe.Pointer(&t.Data[0]))
hdr.Len = size
hdr.Cap = size
return s
}
// SetDataSlice copies s into the memory at KeyValuePartialInformationT.Data.
//
// Beware: No bounds check is performed. Another member of the struct (KeyValuePartialInformationT) usually has to be set to the array size.
func (t *KeyValuePartialInformationT) SetDataSlice(s []byte) {
s1 := []byte{}
hdr := (*reflect.SliceHeader)(unsafe.Pointer(&s1))
hdr.Data = uintptr(unsafe.Pointer(&t.Data[0]))
hdr.Len = len(s)
hdr.Cap = len(s)
copy(s1, s)
}
// OUT-parameter: KeyHandle, Disposition.
// RESERVED-parameter: TitleIndex.
// *OPT-parameter: Class, Disposition.
func NtCreateKey(
KeyHandle *Handle,
DesiredAccess AccessMask,
ObjectAttributes *ObjectAttributes,
TitleIndex uint32,
Class *UnicodeString,
CreateOptions uint32,
Disposition *uint32,
) NtStatus {
r0, _, _ := procNtCreateKey.Call(uintptr(unsafe.Pointer(KeyHandle)),
uintptr(DesiredAccess),
uintptr(unsafe.Pointer(ObjectAttributes)),
uintptr(TitleIndex),
uintptr(unsafe.Pointer(Class)),
uintptr(CreateOptions),
uintptr(unsafe.Pointer(Disposition)))
return NtStatus(r0)
}
// OUT-parameter: KeyHandle, Disposition.
// RESERVED-parameter: TitleIndex.
// *OPT-parameter: Class, Disposition.
func NtCreateKeyTransacted(
KeyHandle *Handle,
DesiredAccess AccessMask,
ObjectAttributes *ObjectAttributes,
TitleIndex uint32,
Class *UnicodeString,
CreateOptions uint32,
TransactionHandle Handle,
Disposition *uint32,
) NtStatus {
r0, _, _ := procNtCreateKeyTransacted.Call(uintptr(unsafe.Pointer(KeyHandle)),
uintptr(DesiredAccess),
uintptr(unsafe.Pointer(ObjectAttributes)),
uintptr(TitleIndex),
uintptr(unsafe.Pointer(Class)),
uintptr(CreateOptions),
uintptr(TransactionHandle),
uintptr(unsafe.Pointer(Disposition)))
return NtStatus(r0)
}
func NtDeleteKey(
KeyHandle Handle,
) NtStatus {
r0, _, _ := procNtDeleteKey.Call(uintptr(KeyHandle))
return NtStatus(r0)
}
func NtDeleteValueKey(
KeyHandle Handle,
ValueName *UnicodeString,
) NtStatus {
r0, _, _ := procNtDeleteValueKey.Call(uintptr(KeyHandle),
uintptr(unsafe.Pointer(ValueName)))
return NtStatus(r0)
}
// OUT-parameter: KeyInformation, ResultLength.
// *OPT-parameter: KeyInformation.
func NtEnumerateKey(
KeyHandle Handle,
Index uint32,
KeyInformationClass KeyInformationClass,
KeyInformation *byte,
Length uint32,
ResultLength *uint32,
) NtStatus {
r0, _, _ := procNtEnumerateKey.Call(uintptr(KeyHandle),
uintptr(Index),
uintptr(KeyInformationClass),
uintptr(unsafe.Pointer(KeyInformation)),
uintptr(Length),
uintptr(unsafe.Pointer(ResultLength)))
return NtStatus(r0)
}
// OUT-parameter: KeyValueInformation, ResultLength.
// *OPT-parameter: KeyValueInformation.
func NtEnumerateValueKey(
KeyHandle Handle,
Index uint32,
KeyValueInformationClass KeyValueInformationClass,
KeyValueInformation *byte,
Length uint32,
ResultLength *uint32,
) NtStatus {
r0, _, _ := procNtEnumerateValueKey.Call(uintptr(KeyHandle),
uintptr(Index),
uintptr(KeyValueInformationClass),
uintptr(unsafe.Pointer(KeyValueInformation)),
uintptr(Length),
uintptr(unsafe.Pointer(ResultLength)))
return NtStatus(r0)
}
func NtFlushKey(
KeyHandle Handle,
) NtStatus {
r0, _, _ := procNtFlushKey.Call(uintptr(KeyHandle))
return NtStatus(r0)
}
// OUT-parameter: IoStatusBlock, Buffer.
// *OPT-parameter: Event, ApcRoutine, ApcContext, Buffer.
func NtNotifyChangeKey(
KeyHandle Handle,
Event Handle,
ApcRoutine *IoApcRoutine,
ApcContext *byte,
IoStatusBlock *IoStatusBlock,
CompletionFilter uint32,
WatchTree bool,
Buffer *byte,
BufferSize uint32,
Asynchronous bool,
) NtStatus {
r0, _, _ := procNtNotifyChangeKey.Call(uintptr(KeyHandle),
uintptr(Event),
uintptr(unsafe.Pointer(ApcRoutine)),
uintptr(unsafe.Pointer(ApcContext)),
uintptr(unsafe.Pointer(IoStatusBlock)),
uintptr(CompletionFilter),
fromBool(WatchTree),
uintptr(unsafe.Pointer(Buffer)),
uintptr(BufferSize),
fromBool(Asynchronous))
return NtStatus(r0)
}
// OUT-parameter: IoStatusBlock, Buffer.
// *OPT-parameter: Count, SubordinateObjects, Event, ApcRoutine, ApcContext, Buffer.
func NtNotifyChangeMultipleKeys(
MasterKeyHandle Handle,
Count uint32,
SubordinateObjects *ObjectAttributes,
Event Handle,
ApcRoutine *IoApcRoutine,
ApcContext *byte,
IoStatusBlock *IoStatusBlock,
CompletionFilter uint32,
WatchTree bool,
Buffer *byte,
BufferSize uint32,
Asynchronous bool,
) NtStatus {
r0, _, _ := procNtNotifyChangeMultipleKeys.Call(uintptr(MasterKeyHandle),
uintptr(Count),
uintptr(unsafe.Pointer(SubordinateObjects)),
uintptr(Event),
uintptr(unsafe.Pointer(ApcRoutine)),
uintptr(unsafe.Pointer(ApcContext)),
uintptr(unsafe.Pointer(IoStatusBlock)),
uintptr(CompletionFilter),
fromBool(WatchTree),
uintptr(unsafe.Pointer(Buffer)),
uintptr(BufferSize),
fromBool(Asynchronous))
return NtStatus(r0)
}
// OUT-parameter: KeyHandle.
func NtOpenKey(
KeyHandle *Handle,
DesiredAccess AccessMask,
ObjectAttributes *ObjectAttributes,
) NtStatus {
r0, _, _ := procNtOpenKey.Call(uintptr(unsafe.Pointer(KeyHandle)),
uintptr(DesiredAccess),
uintptr(unsafe.Pointer(ObjectAttributes)))
return NtStatus(r0)
}
// OUT-parameter: KeyHandle.
func NtOpenKeyTransacted(
KeyHandle *Handle,
DesiredAccess AccessMask,
ObjectAttributes *ObjectAttributes,
TransactionHandle Handle,
) NtStatus {
r0, _, _ := procNtOpenKeyTransacted.Call(uintptr(unsafe.Pointer(KeyHandle)),
uintptr(DesiredAccess),
uintptr(unsafe.Pointer(ObjectAttributes)),
uintptr(TransactionHandle))
return NtStatus(r0)
}
// OUT-parameter: KeyHandle.
func NtOpenKeyTransactedEx(
KeyHandle *Handle,
DesiredAccess AccessMask,
ObjectAttributes *ObjectAttributes,
OpenOptions uint32,
TransactionHandle Handle,
) NtStatus {
r0, _, _ := procNtOpenKeyTransactedEx.Call(uintptr(unsafe.Pointer(KeyHandle)),
uintptr(DesiredAccess),
uintptr(unsafe.Pointer(ObjectAttributes)),
uintptr(OpenOptions),
uintptr(TransactionHandle))
return NtStatus(r0)
}
// OUT-parameter: KeyInformation, ResultLength.
// *OPT-parameter: KeyInformation.
func NtQueryKey(
KeyHandle Handle,
KeyInformationClass KeyInformationClass,
KeyInformation *byte,
Length uint32,
ResultLength *uint32,
) NtStatus {
r0, _, _ := procNtQueryKey.Call(uintptr(KeyHandle),
uintptr(KeyInformationClass),
uintptr(unsafe.Pointer(KeyInformation)),
uintptr(Length),
uintptr(unsafe.Pointer(ResultLength)))
return NtStatus(r0)
}
// OUT-parameter: ValueBuffer, RequiredBufferLength.
// INOUT-parameter: ValueEntries, BufferLength.
// *OPT-parameter: RequiredBufferLength.
func NtQueryMultipleValueKey(
KeyHandle Handle,
ValueEntries *KeyValueEntry,
EntryCount uint32,
ValueBuffer *byte,
BufferLength *uint32,
RequiredBufferLength *uint32,
) NtStatus {
r0, _, _ := procNtQueryMultipleValueKey.Call(uintptr(KeyHandle),
uintptr(unsafe.Pointer(ValueEntries)),
uintptr(EntryCount),
uintptr(unsafe.Pointer(ValueBuffer)),
uintptr(unsafe.Pointer(BufferLength)),
uintptr(unsafe.Pointer(RequiredBufferLength)))
return NtStatus(r0)
}
// OUT-parameter: KeyValueInformation, ResultLength.
// *OPT-parameter: KeyValueInformation.
func NtQueryValueKey(
KeyHandle Handle,
ValueName *UnicodeString,
KeyValueInformationClass KeyValueInformationClass,
KeyValueInformation *byte,
Length uint32,
ResultLength *uint32,
) NtStatus {
r0, _, _ := procNtQueryValueKey.Call(uintptr(KeyHandle),
uintptr(unsafe.Pointer(ValueName)),
uintptr(KeyValueInformationClass),
uintptr(unsafe.Pointer(KeyValueInformation)),
uintptr(Length),
uintptr(unsafe.Pointer(ResultLength)))
return NtStatus(r0)
}
func NtRenameKey(
KeyHandle Handle,
NewName *UnicodeString,
) NtStatus {
r0, _, _ := procNtRenameKey.Call(uintptr(KeyHandle),
uintptr(unsafe.Pointer(NewName)))
return NtStatus(r0)
}
func NtSetInformationKey(
KeyHandle Handle,
KeySetInformationClass KeySetInformationClass,
KeySetInformation *byte,
KeySetInformationLength uint32,
) NtStatus {
r0, _, _ := procNtSetInformationKey.Call(uintptr(KeyHandle),
uintptr(KeySetInformationClass),
uintptr(unsafe.Pointer(KeySetInformation)),
uintptr(KeySetInformationLength))
return NtStatus(r0)
}
// *OPT-parameter: TitleIndex, Data.
func NtSetValueKey(
KeyHandle Handle,
ValueName *UnicodeString,
TitleIndex uint32,
Type uint32,
Data *byte,
DataSize uint32,
) NtStatus {
r0, _, _ := procNtSetValueKey.Call(uintptr(KeyHandle),
uintptr(unsafe.Pointer(ValueName)),
uintptr(TitleIndex),
uintptr(Type),
uintptr(unsafe.Pointer(Data)),
uintptr(DataSize))
return NtStatus(r0)
}