[PSDK] Add missing BCRYPT_HASH_HANDLE.
[reactos.git] / reactos / include / psdk / winreg.h
1 #ifndef _WINREG_H
2 #define _WINREG_H
3
4 #ifdef __cplusplus
5 extern "C" {
6 #endif
7
8 #include <reason.h>
9
10 #define HKEY_CLASSES_ROOT ((HKEY)0x80000000)
11 #define HKEY_CURRENT_USER ((HKEY)0x80000001)
12 #define HKEY_LOCAL_MACHINE ((HKEY)0x80000002)
13 #define HKEY_USERS ((HKEY)0x80000003)
14 #define HKEY_PERFORMANCE_DATA ((HKEY)0x80000004)
15 #define HKEY_CURRENT_CONFIG ((HKEY)0x80000005)
16 #define HKEY_DYN_DATA ((HKEY)0x80000006)
17 #define REG_OPTION_VOLATILE 1
18 #define REG_OPTION_NON_VOLATILE 0
19 #define REG_CREATED_NEW_KEY 1
20 #define REG_OPENED_EXISTING_KEY 2
21 #define REG_NONE 0
22 #define REG_SZ 1
23 #define REG_EXPAND_SZ 2
24 #define REG_BINARY 3
25 #define REG_DWORD_LITTLE_ENDIAN 4
26 #define REG_DWORD 4
27 #define REG_DWORD_BIG_ENDIAN 5
28 #define REG_LINK 6
29 #define REG_MULTI_SZ 7
30 #define REG_RESOURCE_LIST 8
31 #define REG_FULL_RESOURCE_DESCRIPTOR 9
32 #define REG_RESOURCE_REQUIREMENTS_LIST 10
33 #define REG_QWORD_LITTLE_ENDIAN 11
34 #define REG_QWORD 11
35 #define REG_NOTIFY_CHANGE_NAME 1
36 #define REG_NOTIFY_CHANGE_ATTRIBUTES 2
37 #define REG_NOTIFY_CHANGE_LAST_SET 4
38 #define REG_NOTIFY_CHANGE_SECURITY 8
39
40 /* Shutdown flags for InitiateShutdownA/W */
41 #define SHUTDOWN_FORCE_OTHERS 0x00000001
42 #define SHUTDOWN_FORCE_SELF 0x00000002
43 #define SHUTDOWN_GRACE_OVERRIDE 0x00000020
44 #define SHUTDOWN_INSTALL_UPDATES 0x00000040
45 #define SHUTDOWN_NOREBOOT 0x00000010
46 #define SHUTDOWN_POWEROFF 0x00000008
47 #define SHUTDOWN_RESTART 0x00000004
48 #define SHUTDOWN_RESTARTAPPS 0x00000080
49
50 #define MAX_SHUTDOWN_TIMEOUT (10*365*24*60*60)
51
52 #define RRF_RT_REG_NONE (1 << 0)
53 #define RRF_RT_REG_SZ (1 << 1)
54 #define RRF_RT_REG_EXPAND_SZ (1 << 2)
55 #define RRF_RT_REG_BINARY (1 << 3)
56 #define RRF_RT_REG_DWORD (1 << 4)
57 #define RRF_RT_REG_MULTI_SZ (1 << 5)
58 #define RRF_RT_REG_QWORD (1 << 6)
59 #define RRF_RT_DWORD (RRF_RT_REG_BINARY | RRF_RT_REG_DWORD)
60 #define RRF_RT_QWORD (RRF_RT_REG_BINARY | RRF_RT_REG_QWORD)
61 #define RRF_RT_ANY (0x0000FFFF)
62 #define RRF_NOEXPAND (1 << 28)
63 #define RRF_ZEROONFAILURE (1 << 29)
64
65 #ifndef RC_INVOKED
66 typedef ACCESS_MASK REGSAM;
67 typedef _Return_type_success_(return==ERROR_SUCCESS) LONG LSTATUS;
68 typedef struct value_entA {
69 LPSTR ve_valuename;
70 DWORD ve_valuelen;
71 DWORD ve_valueptr;
72 DWORD ve_type;
73 } VALENTA,*PVALENTA;
74 typedef struct value_entW {
75 LPWSTR ve_valuename;
76 DWORD ve_valuelen;
77 DWORD ve_valueptr;
78 DWORD ve_type;
79 } VALENTW,*PVALENTW;
80
81 BOOL WINAPI AbortSystemShutdownA(_In_opt_ LPCSTR);
82 BOOL WINAPI AbortSystemShutdownW(_In_opt_ LPCWSTR);
83
84 #if (_WIN32_WINNT >= 0x0600)
85 DWORD WINAPI InitiateShutdownA(_In_opt_ LPSTR, _In_opt_ LPSTR, _In_ DWORD, _In_ DWORD, _In_ DWORD);
86 DWORD WINAPI InitiateShutdownW(_In_opt_ LPWSTR, _In_opt_ LPWSTR, _In_ DWORD, _In_ DWORD, _In_ DWORD);
87 #endif
88
89 BOOL WINAPI InitiateSystemShutdownA(_In_opt_ LPSTR, _In_opt_ LPSTR, _In_ DWORD, _In_ BOOL, _In_ BOOL);
90 BOOL WINAPI InitiateSystemShutdownW(_In_opt_ LPWSTR, _In_opt_ LPWSTR, _In_ DWORD, _In_ BOOL, _In_ BOOL);
91 BOOL WINAPI InitiateSystemShutdownExA(_In_opt_ LPSTR, _In_opt_ LPSTR, _In_ DWORD, _In_ BOOL, _In_ BOOL, _In_ DWORD);
92 BOOL WINAPI InitiateSystemShutdownExW(_In_opt_ LPWSTR, _In_opt_ LPWSTR, _In_ DWORD, _In_ BOOL, _In_ BOOL, _In_ DWORD);
93 LSTATUS WINAPI RegCloseKey(_In_ HKEY);
94 LSTATUS WINAPI RegConnectRegistryA(_In_opt_ LPCSTR, _In_ HKEY, _Out_ PHKEY);
95 LSTATUS WINAPI RegConnectRegistryW(_In_opt_ LPCWSTR,_In_ HKEY, _Out_ PHKEY);
96
97 #if (_WIN32_WINNT >= 0x0600)
98 LSTATUS WINAPI RegCopyTreeA(_In_ HKEY, _In_opt_ LPCSTR, _In_ HKEY);
99 LSTATUS WINAPI RegCopyTreeW(_In_ HKEY, _In_opt_ LPCWSTR, _In_ HKEY);
100 #endif
101
102 LSTATUS WINAPI RegCreateKeyA(_In_ HKEY, _In_opt_ LPCSTR, _Out_ PHKEY);
103 LSTATUS WINAPI RegCreateKeyW(_In_ HKEY, _In_opt_ LPCWSTR, _Out_ PHKEY);
104 LSTATUS WINAPI RegCreateKeyExA(_In_ HKEY, _In_ LPCSTR, _Reserved_ DWORD, _In_opt_ LPSTR, _In_ DWORD, _In_ REGSAM, _In_opt_ LPSECURITY_ATTRIBUTES, _Out_ PHKEY, _Out_opt_ PDWORD);
105 LSTATUS WINAPI RegCreateKeyExW(_In_ HKEY, _In_ LPCWSTR, _Reserved_ DWORD, _In_opt_ LPWSTR, _In_ DWORD, _In_ REGSAM, _In_opt_ LPSECURITY_ATTRIBUTES, _Out_ PHKEY, _Out_opt_ PDWORD);
106 LSTATUS WINAPI RegDeleteKeyA(_In_ HKEY, _In_ LPCSTR);
107 LSTATUS WINAPI RegDeleteKeyW(_In_ HKEY, _In_ LPCWSTR);
108 LSTATUS WINAPI RegDeleteKeyExA(_In_ HKEY, _In_ LPCSTR, _In_ REGSAM, _Reserved_ DWORD);
109 LSTATUS WINAPI RegDeleteKeyExW(_In_ HKEY, _In_ LPCWSTR, _In_ REGSAM, _Reserved_ DWORD);
110
111 #if (_WIN32_WINNT >= 0x0600)
112 LSTATUS WINAPI RegDeleteKeyValueA(_In_ HKEY, _In_opt_ LPCSTR, _In_opt_ LPCSTR);
113 LSTATUS WINAPI RegDeleteKeyValueW(_In_ HKEY, _In_opt_ LPCWSTR, _In_opt_ LPCWSTR);
114 LSTATUS WINAPI RegDeleteTreeA(_In_ HKEY, _In_opt_ LPCSTR);
115 LSTATUS WINAPI RegDeleteTreeW(_In_ HKEY, _In_opt_ LPCWSTR);
116 #endif
117
118 LSTATUS WINAPI RegDeleteValueA(_In_ HKEY, _In_opt_ LPCSTR);
119 LSTATUS WINAPI RegDeleteValueW(_In_ HKEY, _In_opt_ LPCWSTR);
120
121 #if (_WIN32_WINNT >= 0x0500)
122 LONG WINAPI RegDisablePredefinedCache(VOID);
123 LSTATUS WINAPI RegSaveKeyExA(_In_ HKEY, _In_ LPCSTR, _In_opt_ LPSECURITY_ATTRIBUTES, _In_ DWORD);
124 LSTATUS WINAPI RegSaveKeyExW(_In_ HKEY, _In_ LPCWSTR, _In_opt_ LPSECURITY_ATTRIBUTES, _In_ DWORD);
125 #endif
126
127 #if (_WIN32_WINNT >= 0x0600)
128 LONG WINAPI RegDisablePredefinedCacheEx(VOID);
129 LONG WINAPI RegDisableReflectionKey(_In_ HKEY);
130 LONG WINAPI RegEnableReflectionKey(_In_ HKEY);
131 #endif
132
133 LSTATUS
134 WINAPI
135 RegEnumKeyA(
136 _In_ HKEY hKey,
137 _In_ DWORD dwIndex,
138 _Out_writes_opt_(cchName) LPSTR lpName,
139 _In_ DWORD cchName);
140
141 LSTATUS
142 WINAPI
143 RegEnumKeyW(
144 _In_ HKEY hKey,
145 _In_ DWORD dwIndex,
146 _Out_writes_opt_(cchName) LPWSTR lpName,
147 _In_ DWORD cchName);
148
149 LSTATUS
150 WINAPI
151 RegEnumKeyExA(
152 _In_ HKEY hKey,
153 _In_ DWORD dwIndex,
154 _Out_writes_to_opt_(*lpcchName, *lpcchName + 1) LPSTR lpName,
155 _Inout_ LPDWORD lpcchName,
156 _Reserved_ LPDWORD lpReserved,
157 _Out_writes_to_opt_(*lpcchClass,*lpcchClass + 1) LPSTR lpClass,
158 _Inout_opt_ LPDWORD lpcchClass,
159 _Out_opt_ PFILETIME lpftLastWriteTime);
160
161 LSTATUS
162 WINAPI
163 RegEnumKeyExW(
164 _In_ HKEY hKey,
165 _In_ DWORD dwIndex,
166 _Out_writes_to_opt_(*lpcchName, *lpcchName + 1) LPWSTR lpName,
167 _Inout_ LPDWORD lpcchName,
168 _Reserved_ LPDWORD lpReserved,
169 _Out_writes_to_opt_(*lpcchClass,*lpcchClass + 1) LPWSTR lpClass,
170 _Inout_opt_ LPDWORD lpcchClass,
171 _Out_opt_ PFILETIME lpftLastWriteTime);
172
173 LSTATUS
174 WINAPI
175 RegEnumValueA(
176 _In_ HKEY hKey,
177 _In_ DWORD dwIndex,
178 _Out_writes_to_opt_(*lpcchValueName, *lpcchValueName + 1) LPSTR lpValueName,
179 _Inout_ LPDWORD lpcchValueName,
180 _Reserved_ LPDWORD lpReserved,
181 _Out_opt_ LPDWORD lpType,
182 _Out_writes_bytes_to_opt_(*lpcbData, *lpcbData) __out_data_source(REGISTRY) LPBYTE lpData,
183 _Inout_opt_ LPDWORD lpcbData);
184
185 LSTATUS
186 WINAPI
187 RegEnumValueW(
188 _In_ HKEY hKey,
189 _In_ DWORD dwIndex,
190 _Out_writes_to_opt_(*lpcchValueName, *lpcchValueName + 1) LPWSTR lpValueName,
191 _Inout_ LPDWORD lpcchValueName,
192 _Reserved_ LPDWORD lpReserved,
193 _Out_opt_ LPDWORD lpType,
194 _Out_writes_bytes_to_opt_(*lpcbData, *lpcbData) __out_data_source(REGISTRY) LPBYTE lpData,
195 _Inout_opt_ LPDWORD lpcbData);
196
197 #if (_WIN32_WINNT >= 0x0600)
198
199 LSTATUS
200 WINAPI
201 RegGetValueA(
202 _In_ HKEY hkey,
203 _In_opt_ LPCSTR lpSubKey,
204 _In_opt_ LPCSTR lpValue,
205 _In_ DWORD dwFlags,
206 _Out_opt_ LPDWORD pdwType,
207 _When_((dwFlags & 0x7F) == RRF_RT_REG_SZ || (dwFlags & 0x7F) == RRF_RT_REG_EXPAND_SZ ||
208 (dwFlags & 0x7F) == (RRF_RT_REG_SZ | RRF_RT_REG_EXPAND_SZ) || *pdwType == REG_SZ ||
209 *pdwType == REG_EXPAND_SZ, _Post_z_)
210 _When_((dwFlags & 0x7F) == RRF_RT_REG_MULTI_SZ || *pdwType == REG_MULTI_SZ, _Post_ _NullNull_terminated_)
211 _Out_writes_bytes_to_opt_(*pcbData,*pcbData) PVOID pvData,
212 _Inout_opt_ LPDWORD pcbData);
213
214 LSTATUS
215 WINAPI
216 RegGetValueW(
217 _In_ HKEY hkey,
218 _In_opt_ LPCWSTR lpSubKey,
219 _In_opt_ LPCWSTR lpValue,
220 _In_ DWORD dwFlags,
221 _Out_opt_ LPDWORD pdwType,
222 _When_((dwFlags & 0x7F) == RRF_RT_REG_SZ || (dwFlags & 0x7F) == RRF_RT_REG_EXPAND_SZ ||
223 (dwFlags & 0x7F) == (RRF_RT_REG_SZ | RRF_RT_REG_EXPAND_SZ) || *pdwType == REG_SZ ||
224 *pdwType == REG_EXPAND_SZ, _Post_z_)
225 _When_((dwFlags & 0x7F) == RRF_RT_REG_MULTI_SZ || *pdwType == REG_MULTI_SZ, _Post_ _NullNull_terminated_)
226 _Out_writes_bytes_to_opt_(*pcbData,*pcbData) PVOID pvData,
227 _Inout_opt_ LPDWORD pcbData);
228
229 #endif
230
231 LSTATUS WINAPI RegFlushKey(_In_ HKEY);
232
233 LSTATUS
234 WINAPI
235 RegGetKeySecurity(
236 _In_ HKEY hKey,
237 _In_ SECURITY_INFORMATION SecurityInformation,
238 _Out_writes_bytes_opt_(*lpcbSecurityDescriptor) PSECURITY_DESCRIPTOR pSecurityDescriptor,
239 _Inout_ LPDWORD lpcbSecurityDescriptor);
240
241 LSTATUS WINAPI RegLoadKeyA(_In_ HKEY, _In_opt_ LPCSTR, _In_ LPCSTR);
242 LSTATUS WINAPI RegLoadKeyW(_In_ HKEY, _In_opt_ LPCWSTR, _In_ LPCWSTR);
243
244 #if (_WIN32_WINNT >= 0x0600)
245
246 LSTATUS
247 WINAPI
248 RegLoadMUIStringA(
249 _In_ HKEY hKey,
250 _In_opt_ LPCSTR pszValue,
251 _Out_writes_bytes_opt_(cbOutBuf) LPSTR pszOutBuf,
252 _In_ DWORD cbOutBuf,
253 _Out_opt_ LPDWORD pcbData,
254 _In_ DWORD Flags,
255 _In_opt_ LPCSTR pszDirectory);
256
257 LSTATUS
258 WINAPI
259 RegLoadMUIStringW(
260 _In_ HKEY hKey,
261 _In_opt_ LPCWSTR pszValue,
262 _Out_writes_bytes_opt_(cbOutBuf) LPWSTR pszOutBuf,
263 _In_ DWORD cbOutBuf,
264 _Out_opt_ LPDWORD pcbData,
265 _In_ DWORD Flags,
266 _In_opt_ LPCWSTR pszDirectory);
267
268 #endif
269
270 LSTATUS WINAPI RegNotifyChangeKeyValue(_In_ HKEY, _In_ BOOL, _In_ DWORD, _In_opt_ HANDLE, _In_ BOOL);
271 LSTATUS WINAPI RegOpenCurrentUser(_In_ REGSAM, _Out_ PHKEY);
272 LSTATUS WINAPI RegOpenKeyA(_In_ HKEY, _In_opt_ LPCSTR, _Out_ PHKEY);
273 LSTATUS WINAPI RegOpenKeyW(_In_ HKEY, _In_opt_ LPCWSTR, _Out_ PHKEY);
274 LSTATUS WINAPI RegOpenKeyExA(_In_ HKEY, _In_opt_ LPCSTR, _In_opt_ DWORD, _In_ REGSAM, _Out_ PHKEY);
275 LSTATUS WINAPI RegOpenKeyExW(_In_ HKEY, _In_opt_ LPCWSTR, _In_opt_ DWORD, _In_ REGSAM, _Out_ PHKEY);
276
277 LSTATUS
278 WINAPI
279 RegQueryInfoKeyA(
280 _In_ HKEY hKey,
281 _Out_writes_to_opt_(*lpcchClass, *lpcchClass + 1) LPSTR lpClass,
282 _Inout_opt_ LPDWORD lpcchClass,
283 _Reserved_ LPDWORD lpReserved,
284 _Out_opt_ LPDWORD lpcSubKeys,
285 _Out_opt_ LPDWORD lpcbMaxSubKeyLen,
286 _Out_opt_ LPDWORD lpcbMaxClassLen,
287 _Out_opt_ LPDWORD lpcValues,
288 _Out_opt_ LPDWORD lpcbMaxValueNameLen,
289 _Out_opt_ LPDWORD lpcbMaxValueLen,
290 _Out_opt_ LPDWORD lpcbSecurityDescriptor,
291 _Out_opt_ PFILETIME lpftLastWriteTime);
292
293 LSTATUS
294 WINAPI
295 RegQueryInfoKeyW(
296 _In_ HKEY hKey,
297 _Out_writes_to_opt_(*lpcchClass, *lpcchClass + 1) LPWSTR lpClass,
298 _Inout_opt_ LPDWORD lpcchClass,
299 _Reserved_ LPDWORD lpReserved,
300 _Out_opt_ LPDWORD lpcSubKeys,
301 _Out_opt_ LPDWORD lpcbMaxSubKeyLen,
302 _Out_opt_ LPDWORD lpcbMaxClassLen,
303 _Out_opt_ LPDWORD lpcValues,
304 _Out_opt_ LPDWORD lpcbMaxValueNameLen,
305 _Out_opt_ LPDWORD lpcbMaxValueLen,
306 _Out_opt_ LPDWORD lpcbSecurityDescriptor,
307 _Out_opt_ PFILETIME lpftLastWriteTime);
308
309 LSTATUS
310 WINAPI
311 RegQueryMultipleValuesA(
312 _In_ HKEY hKey,
313 _Out_writes_(num_vals) PVALENTA val_list,
314 _In_ DWORD num_vals,
315 _Out_writes_bytes_to_opt_(*ldwTotsize, *ldwTotsize) __out_data_source(REGISTRY) LPSTR lpValueBuf,
316 _Inout_opt_ LPDWORD ldwTotsize);
317
318 LSTATUS
319 WINAPI
320 RegQueryMultipleValuesW(
321 _In_ HKEY hKey,
322 _Out_writes_(num_vals) PVALENTW val_list,
323 _In_ DWORD num_vals,
324 _Out_writes_bytes_to_opt_(*ldwTotsize, *ldwTotsize) __out_data_source(REGISTRY) LPWSTR lpValueBuf,
325 _Inout_opt_ LPDWORD ldwTotsize);
326
327 #if (_WIN32_WINNT >= 0x0600)
328 LONG WINAPI RegQueryReflectionKey(_In_ HKEY, _Out_ BOOL*);
329 #endif
330
331 LSTATUS
332 WINAPI
333 RegQueryValueA(
334 _In_ HKEY hKey,
335 _In_opt_ LPCSTR lpSubKey,
336 _Out_writes_bytes_to_opt_(*lpcbData, *lpcbData) __out_data_source(REGISTRY) LPSTR lpData,
337 _Inout_opt_ PLONG lpcbData);
338
339 LSTATUS
340 WINAPI
341 RegQueryValueW(
342 _In_ HKEY hKey,
343 _In_opt_ LPCWSTR lpSubKey,
344 _Out_writes_bytes_to_opt_(*lpcbData, *lpcbData) __out_data_source(REGISTRY) LPWSTR lpData,
345 _Inout_opt_ PLONG lpcbData);
346
347 LSTATUS
348 WINAPI
349 RegQueryValueExA(
350 _In_ HKEY hKey,
351 _In_opt_ LPCSTR lpValueName,
352 _Reserved_ LPDWORD lpReserved,
353 _Out_opt_ LPDWORD lpType,
354 _Out_writes_bytes_to_opt_(*lpcbData, *lpcbData) __out_data_source(REGISTRY) LPBYTE lpData,
355 _When_(lpData == NULL, _Out_opt_)
356 _When_(lpData != NULL, _Inout_opt_) LPDWORD lpcbData);
357
358 LSTATUS
359 WINAPI
360 RegQueryValueExW(
361 _In_ HKEY hKey,
362 _In_opt_ LPCWSTR lpValueName,
363 _Reserved_ LPDWORD lpReserved,
364 _Out_opt_ LPDWORD lpType,
365 _Out_writes_bytes_to_opt_(*lpcbData, *lpcbData) __out_data_source(REGISTRY) LPBYTE lpData,
366 _When_(lpData == NULL, _Out_opt_)
367 _When_(lpData != NULL, _Inout_opt_) LPDWORD lpcbData);
368
369 LSTATUS WINAPI RegReplaceKeyA(_In_ HKEY, _In_opt_ LPCSTR, _In_ LPCSTR, _In_ LPCSTR);
370 LSTATUS WINAPI RegReplaceKeyW(_In_ HKEY, _In_opt_ LPCWSTR, _In_ LPCWSTR, _In_ LPCWSTR);
371 LSTATUS WINAPI RegRestoreKeyA(_In_ HKEY, _In_ LPCSTR, _In_ DWORD);
372 LSTATUS WINAPI RegRestoreKeyW(_In_ HKEY, _In_ LPCWSTR, _In_ DWORD);
373 LSTATUS WINAPI RegSaveKeyA(_In_ HKEY, _In_ LPCSTR, _In_opt_ LPSECURITY_ATTRIBUTES);
374 LSTATUS WINAPI RegSaveKeyW(_In_ HKEY, _In_ LPCWSTR, _In_opt_ LPSECURITY_ATTRIBUTES);
375 LSTATUS WINAPI RegSetKeySecurity(_In_ HKEY, _In_ SECURITY_INFORMATION, _In_ PSECURITY_DESCRIPTOR);
376
377 #if (_WIN32_WINNT >= 0x0600)
378
379 LSTATUS
380 WINAPI
381 RegSetKeyValueA(
382 _In_ HKEY hKey,
383 _In_opt_ LPCSTR lpSubKey,
384 _In_opt_ LPCSTR lpValueName,
385 _In_ DWORD dwType,
386 _In_reads_bytes_opt_(cbData) LPCVOID lpData,
387 _In_ DWORD cbData);
388
389 LSTATUS
390 WINAPI
391 RegSetKeyValueW(
392 _In_ HKEY hKey,
393 _In_opt_ LPCWSTR lpSubKey,
394 _In_opt_ LPCWSTR lpValueName,
395 _In_ DWORD dwType,
396 _In_reads_bytes_opt_(cbData) LPCVOID lpData,
397 _In_ DWORD cbData);
398
399 #endif
400
401 LSTATUS
402 WINAPI
403 RegSetValueA(
404 _In_ HKEY hKey,
405 _In_opt_ LPCSTR lpSubKey,
406 _In_ DWORD dwType,
407 _In_reads_bytes_opt_(cbData) LPCSTR lpData,
408 _In_ DWORD cbData);
409
410 LSTATUS
411 WINAPI
412 RegSetValueW(
413 _In_ HKEY hKey,
414 _In_opt_ LPCWSTR lpSubKey,
415 _In_ DWORD dwType,
416 _In_reads_bytes_opt_(cbData) LPCWSTR lpData,
417 _In_ DWORD cbData);
418
419 LSTATUS
420 WINAPI
421 RegSetValueExA(
422 _In_ HKEY hKey,
423 _In_opt_ LPCSTR lpValueName,
424 _Reserved_ DWORD Reserved,
425 _In_ DWORD dwType,
426 _In_reads_bytes_opt_(cbData) const BYTE *lpData,
427 _In_ DWORD cbData);
428
429 LSTATUS
430 WINAPI
431 RegSetValueExW(
432 _In_ HKEY hKey,
433 _In_opt_ LPCWSTR lpValueName,
434 _Reserved_ DWORD Reserved,
435 _In_ DWORD dwType,
436 _In_reads_bytes_opt_(cbData) const BYTE *lpData,
437 _In_ DWORD cbData);
438
439 LSTATUS WINAPI RegUnLoadKeyA(_In_ HKEY, _In_opt_ LPCSTR);
440 LSTATUS WINAPI RegUnLoadKeyW(_In_ HKEY, _In_opt_ LPCWSTR);
441
442 #ifdef UNICODE
443 typedef VALENTW VALENT,*PVALENT;
444 #define AbortSystemShutdown AbortSystemShutdownW
445 #define InitiateSystemShutdown InitiateSystemShutdownW
446 #define InitiateSystemShutdownEx InitiateSystemShutdownExW
447 #define RegConnectRegistry RegConnectRegistryW
448 #if (_WIN32_WINNT >= 0x0600)
449 #define InitiateShutdown InitiateShutdownW
450 #define RegCopyTree RegCopyTreeW
451 #endif
452 #define RegCreateKey RegCreateKeyW
453 #define RegCreateKeyEx RegCreateKeyExW
454 #define RegDeleteKey RegDeleteKeyW
455 #define RegDeleteKeyEx RegDeleteKeyExW
456 #if (_WIN32_WINNT >= 0x0600)
457 #define RegDeleteKeyValue RegDeleteKeyValueW
458 #define RegDeleteTree RegDeleteTreeW
459 #endif
460 #define RegDeleteValue RegDeleteValueW
461 #define RegEnumKey RegEnumKeyW
462 #define RegEnumKeyEx RegEnumKeyExW
463 #define RegEnumValue RegEnumValueW
464 #if (_WIN32_WINNT >= 0x0600)
465 #define RegGetValue RegGetValueW
466 #endif
467 #define RegLoadKey RegLoadKeyW
468 #if (_WIN32_WINNT >= 0x0600)
469 #define RegLoadMUIString RegLoadMUIStringW
470 #endif
471 #define RegOpenKey RegOpenKeyW
472 #define RegOpenKeyEx RegOpenKeyExW
473 #define RegQueryInfoKey RegQueryInfoKeyW
474 #define RegQueryMultipleValues RegQueryMultipleValuesW
475 #define RegQueryValue RegQueryValueW
476 #define RegQueryValueEx RegQueryValueExW
477 #define RegReplaceKey RegReplaceKeyW
478 #define RegRestoreKey RegRestoreKeyW
479 #define RegSaveKey RegSaveKeyW
480 #define RegSaveKeyEx RegSaveKeyExW
481 #if (_WIN32_WINNT >= 0x0600)
482 #define RegSetKeyValue RegSetKeyValueW
483 #endif
484 #define RegSetValue RegSetValueW
485 #define RegSetValueEx RegSetValueExW
486 #define RegUnLoadKey RegUnLoadKeyW
487 #else
488 typedef VALENTA VALENT,*PVALENT;
489 #define AbortSystemShutdown AbortSystemShutdownA
490 #define InitiateSystemShutdown InitiateSystemShutdownA
491 #define InitiateSystemShutdownEx InitiateSystemShutdownExA
492 #define RegConnectRegistry RegConnectRegistryA
493 #if (_WIN32_WINNT >= 0x0600)
494 #define InitiateShutdown InitiateShutdownA
495 #define RegCopyTree RegCopyTreeA
496 #endif
497 #define RegCreateKey RegCreateKeyA
498 #define RegCreateKeyEx RegCreateKeyExA
499 #define RegDeleteKey RegDeleteKeyA
500 #define RegDeleteKeyEx RegDeleteKeyExA
501 #if (_WIN32_WINNT >= 0x0600)
502 #define RegDeleteKeyValue RegDeleteKeyValueA
503 #define RegDeleteTree RegDeleteTreeA
504 #endif
505 #define RegDeleteValue RegDeleteValueA
506 #define RegEnumKey RegEnumKeyA
507 #define RegEnumKeyEx RegEnumKeyExA
508 #define RegEnumValue RegEnumValueA
509 #if (_WIN32_WINNT >= 0x0600)
510 #define RegGetValue RegGetValueA
511 #endif
512 #define RegLoadKey RegLoadKeyA
513 #if (_WIN32_WINNT >= 0x0600)
514 #define RegLoadMUIString RegLoadMUIStringA
515 #endif
516 #define RegOpenKey RegOpenKeyA
517 #define RegOpenKeyEx RegOpenKeyExA
518 #define RegQueryInfoKey RegQueryInfoKeyA
519 #define RegQueryMultipleValues RegQueryMultipleValuesA
520 #define RegQueryValue RegQueryValueA
521 #define RegQueryValueEx RegQueryValueExA
522 #define RegReplaceKey RegReplaceKeyA
523 #define RegRestoreKey RegRestoreKeyA
524 #define RegSaveKey RegSaveKeyA
525 #define RegSaveKeyEx RegSaveKeyExA
526 #if (_WIN32_WINNT >= 0x0600)
527 #define RegSetKeyValue RegSetKeyValueA
528 #endif
529 #define RegSetValue RegSetValueA
530 #define RegSetValueEx RegSetValueExA
531 #define RegUnLoadKey RegUnLoadKeyA
532 #endif
533 #endif
534 #ifdef __cplusplus
535 }
536 #endif
537 #endif