forked from hillu/go-ntdll
-
Notifications
You must be signed in to change notification settings - Fork 0
/
atom_generated.go
83 lines (72 loc) · 2.07 KB
/
atom_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
// This file was autogenerated using go run mkcode.go -- atom.go
// DO NOT EDIT.
package ntdll
import "unsafe"
// The AtomInformationClass constants have been derived from the ATOM_INFORMATION_CLASS enum definition.
type AtomInformationClass uint32
const (
AtomBasicInformation AtomInformationClass = 0
AtomTableInformation = 1
)
var (
procNtAddAtom = modntdll.NewProc("NtAddAtom")
procNtDeleteAtom = modntdll.NewProc("NtDeleteAtom")
procNtFindAtom = modntdll.NewProc("NtFindAtom")
procNtQueryInformationAtom = modntdll.NewProc("NtQueryInformationAtom")
)
// AtomBasicInformationT has been derived from the ATOM_BASIC_INFORMATION struct definition.
type AtomBasicInformationT struct {
UsageCount uint16
Flags uint16
NameLength uint16
Name [1]uint16
}
// AtomTableInformationT has been derived from the ATOM_TABLE_INFORMATION struct definition.
type AtomTableInformationT struct {
NumberOfAtoms uint32
Atoms [1]RtlAtom
}
// OUT-parameter: Atom.
func NtAddAtom(
AtomName *uint16,
Length uint32,
Atom *RtlAtom,
) NtStatus {
r0, _, _ := procNtAddAtom.Call(uintptr(unsafe.Pointer(AtomName)),
uintptr(Length),
uintptr(unsafe.Pointer(Atom)))
return NtStatus(r0)
}
func NtDeleteAtom(
Atom RtlAtom,
) NtStatus {
r0, _, _ := procNtDeleteAtom.Call(uintptr(Atom))
return NtStatus(r0)
}
// OUT-parameter: Atom.
// *OPT-parameter: Atom.
func NtFindAtom(
AtomName *uint16,
Length uint32,
Atom *RtlAtom,
) NtStatus {
r0, _, _ := procNtFindAtom.Call(uintptr(unsafe.Pointer(AtomName)),
uintptr(Length),
uintptr(unsafe.Pointer(Atom)))
return NtStatus(r0)
}
// OUT-parameter: AtomInformation, ReturnLength.
func NtQueryInformationAtom(
Atom RtlAtom,
AtomInformationClass AtomInformationClass,
AtomInformation *byte,
AtomInformationLength uint32,
ReturnLength *uint32,
) NtStatus {
r0, _, _ := procNtQueryInformationAtom.Call(uintptr(Atom),
uintptr(AtomInformationClass),
uintptr(unsafe.Pointer(AtomInformation)),
uintptr(AtomInformationLength),
uintptr(unsafe.Pointer(ReturnLength)))
return NtStatus(r0)
}