forked from Nightmare-Eclipse/BlueHammer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathoffreg.h
More file actions
239 lines (201 loc) · 5.2 KB
/
offreg.h
File metadata and controls
239 lines (201 loc) · 5.2 KB
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
/*++
Copyright (c) Microsoft Corporation
Module Name:
offreg.h
Abstract:
This module contains the header file for the
offreg utility.
--*/
#pragma once
#ifndef __OFFREG_H__
#define __OFFREG_H__
#ifdef __cplusplus
extern "C"
{
#endif
#if defined(OFFREG_DLL)
#define ORAPI _declspec(dllexport) __stdcall
#else
#define ORAPI _declspec(dllimport) __stdcall
#endif
typedef PVOID ORHKEY;
typedef ORHKEY* PORHKEY;
VOID
ORAPI
ORGetVersion(
_Out_ PDWORD pdwMajorVersion,
_Out_ PDWORD pdwMinorVersion
);
DWORD
ORAPI
OROpenHive(
_In_ PCWSTR FilePath,
_Out_ PORHKEY HORKey
);
DWORD
ORAPI
OROpenHiveByHandle(
_In_ HANDLE FileHandle,
_Out_ PORHKEY HORKey
);
DWORD
ORAPI
ORCreateHive(
_Out_ PORHKEY HORKey
);
DWORD
ORAPI
ORCloseHive(
_In_ ORHKEY Handle
);
DWORD
ORAPI
ORSaveHive(
_In_ ORHKEY HORKey,
_In_ PCWSTR HivePath,
_In_ DWORD OsMajorVersion,
_In_ DWORD OsMinorVersion
);
DWORD
ORAPI
OROpenKey(
_In_ ORHKEY Handle,
_In_opt_ PCWSTR lpSubKey,
_Out_ PORHKEY phkResult
);
DWORD
ORAPI
ORCloseKey(
_In_ ORHKEY KeyHandle
);
DWORD
ORAPI
ORCreateKey(
_In_ ORHKEY KeyHandle,
_In_ PCWSTR lpSubKey,
_In_opt_ PWSTR lpClass,
_In_opt_ DWORD dwOptions,
_In_opt_ PSECURITY_DESCRIPTOR pSecurityDescriptor,
_Out_ PORHKEY phkResult,
_Out_opt_ PDWORD pdwDisposition
);
DWORD
ORAPI
ORDeleteKey(
_In_ ORHKEY Handle,
_In_opt_ PCWSTR lpSubKey
);
DWORD
ORAPI
ORQueryInfoKey(
_In_ ORHKEY Handle,
_Out_writes_opt_(*lpcClass) PWSTR lpClass,
_Inout_opt_ PDWORD lpcClass,
_Out_opt_ PDWORD lpcSubKeys,
_Out_opt_ PDWORD lpcMaxSubKeyLen,
_Out_opt_ PDWORD lpcMaxClassLen,
_Out_opt_ PDWORD lpcValues,
_Out_opt_ PDWORD lpcMaxValueNameLen,
_Out_opt_ PDWORD lpcMaxValueLen,
_Out_opt_ PDWORD lpcbSecurityDescriptor,
_Out_opt_ PFILETIME lpftLastWriteTime
);
DWORD
ORAPI
OREnumKey(
_In_ ORHKEY Handle,
_In_ DWORD dwIndex,
_Out_writes_(*lpcName) PWSTR lpName,
_Inout_ PDWORD lpcName,
_Out_writes_opt_(*lpcClass) PWSTR lpClass,
_Inout_opt_ PDWORD lpcClass,
_Out_opt_ PFILETIME lpftLastWriteTime
);
DWORD
ORAPI
ORGetKeySecurity(
_In_ ORHKEY Handle,
_In_ SECURITY_INFORMATION SecurityInformation,
_Out_opt_ PSECURITY_DESCRIPTOR pSecurityDescriptor,
_Inout_ PDWORD lpcbSecurityDescriptor
);
DWORD
ORAPI
ORSetKeySecurity(
_In_ ORHKEY Handle,
_In_ SECURITY_INFORMATION SecurityInformation,
_In_ PSECURITY_DESCRIPTOR pSecurityDescriptor
);
DWORD
ORAPI
ORGetVirtualFlags(
_In_ ORHKEY Handle,
_Out_ PDWORD pdwFlags
);
DWORD
ORAPI
ORSetVirtualFlags(
_In_ ORHKEY Handle,
_In_ DWORD dwFlags
);
DWORD
ORAPI
ORDeleteValue(
_In_ ORHKEY Handle,
_In_opt_ PCWSTR lpValueName
);
DWORD
ORAPI
ORGetValue(
_In_ ORHKEY Handle,
_In_opt_ PCWSTR lpSubKey,
_In_opt_ PCWSTR lpValue,
_Out_opt_ PDWORD pdwType,
_Out_writes_bytes_opt_(*pcbData) PVOID pvData,
_Inout_opt_ PDWORD pcbData
);
DWORD
ORAPI
ORSetValue(
_In_ ORHKEY Handle,
_In_opt_ PCWSTR lpValueName,
_In_ DWORD dwType,
_In_reads_bytes_opt_(cbData) const BYTE* lpData,
_In_ DWORD cbData
);
DWORD
ORAPI
OREnumValue(
_In_ ORHKEY Handle,
_In_ DWORD dwIndex,
_Out_writes_(*lpcValueName) PWSTR lpValueName,
_Inout_ PDWORD lpcValueName,
_Out_opt_ PDWORD lpType,
_Out_writes_bytes_opt_(*lpcbData) PBYTE lpData,
_Inout_opt_ PDWORD lpcbData
);
DWORD
ORAPI
ORRenameKey(
_In_ ORHKEY Handle,
_In_ PCWSTR lpNewName
);
DWORD
ORStart(
VOID
);
VOID
ORShutdown(
VOID
);
DWORD
ORAPI
ORMergeHives(
_In_reads_(HiveCount) ORHKEY* HiveHandles,
_In_ ULONG HiveCount,
_Out_ PORHKEY phkResult
);
#ifdef __cplusplus
}
#endif
#endif //__OFFREG_H__