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