|
|
1.1 root 1: /*++ BUILD Version: 0001 // Increment this if a change has global effects
2:
3: Copyright (c) 1991 Microsoft Corporation
4:
5: Module Name:
6:
7: Winreg.h
8:
9: Abstract:
10:
11: This module contains the function prototypes and constant, type and
12: structure definitions for the Windows 32-Bit Registry API.
13:
14: Author:
15:
16: David J. Gilman (davegi) 07-Nov-1991
17:
18: --*/
19:
20: #ifndef _WINREG_
21: #define _WINREG_
22:
1.1.1.2 root 23: #ifdef __cplusplus
24: extern "C" {
25: #endif
26:
1.1 root 27: //
28: // Requested Key access mask type.
29: //
30:
31: typedef ACCESS_MASK REGSAM;
32:
33: //
34: // Type definitions.
35: //
36:
1.1.1.2 root 37: DECLARE_HANDLE(HKEY);
38: typedef HKEY *PHKEY;
1.1 root 39:
40: //
41: // Reserved Key Handles.
42: //
43:
44: #define HKEY_CLASSES_ROOT (( HKEY ) 0x80000000 )
45: #define HKEY_CURRENT_USER (( HKEY ) 0x80000001 )
46: #define HKEY_LOCAL_MACHINE (( HKEY ) 0x80000002 )
47: #define HKEY_USERS (( HKEY ) 0x80000003 )
48: #define HKEY_PERFORMANCE_DATA (( HKEY ) 0x80000004 )
49:
50: //
51: // Default values for parameters that do not exist in the Win 3.1
52: // compatible APIs.
53: //
54:
55: #define WIN31_CLASS NULL
56:
57: //
58: // API Prototypes.
59: //
60:
61:
62: LONG
63: APIENTRY
64: RegCloseKey (
65: HKEY hKey
66: );
67:
68: LONG
69: APIENTRY
70: RegConnectRegistryA (
71: LPSTR lpMachineName,
72: HKEY hKey,
73: PHKEY phkResult
74: );
75: LONG
76: APIENTRY
77: RegConnectRegistryW (
78: LPWSTR lpMachineName,
79: HKEY hKey,
80: PHKEY phkResult
81: );
82: #ifdef UNICODE
1.1.1.3 ! root 83: #define RegConnectRegistry RegConnectRegistryW
1.1 root 84: #else
1.1.1.3 ! root 85: #define RegConnectRegistry RegConnectRegistryA
1.1 root 86: #endif // !UNICODE
87:
88: LONG
89: APIENTRY
90: RegCreateKeyA (
91: HKEY hKey,
1.1.1.3 ! root 92: LPCSTR lpSubKey,
1.1 root 93: PHKEY phkResult
94: );
95: LONG
96: APIENTRY
97: RegCreateKeyW (
98: HKEY hKey,
1.1.1.3 ! root 99: LPCWSTR lpSubKey,
1.1 root 100: PHKEY phkResult
101: );
102: #ifdef UNICODE
1.1.1.3 ! root 103: #define RegCreateKey RegCreateKeyW
1.1 root 104: #else
1.1.1.3 ! root 105: #define RegCreateKey RegCreateKeyA
1.1 root 106: #endif // !UNICODE
107:
108: LONG
109: APIENTRY
110: RegCreateKeyExA (
111: HKEY hKey,
1.1.1.3 ! root 112: LPCSTR lpSubKey,
1.1 root 113: DWORD Reserved,
114: LPSTR lpClass,
115: DWORD dwOptions,
116: REGSAM samDesired,
117: LPSECURITY_ATTRIBUTES lpSecurityAttributes,
118: PHKEY phkResult,
119: LPDWORD lpdwDisposition
120: );
121: LONG
122: APIENTRY
123: RegCreateKeyExW (
124: HKEY hKey,
1.1.1.3 ! root 125: LPCWSTR lpSubKey,
1.1 root 126: DWORD Reserved,
127: LPWSTR lpClass,
128: DWORD dwOptions,
129: REGSAM samDesired,
130: LPSECURITY_ATTRIBUTES lpSecurityAttributes,
131: PHKEY phkResult,
132: LPDWORD lpdwDisposition
133: );
134: #ifdef UNICODE
1.1.1.3 ! root 135: #define RegCreateKeyEx RegCreateKeyExW
1.1 root 136: #else
1.1.1.3 ! root 137: #define RegCreateKeyEx RegCreateKeyExA
1.1 root 138: #endif // !UNICODE
139:
140: LONG
141: APIENTRY
142: RegDeleteKeyA (
143: HKEY hKey,
1.1.1.3 ! root 144: LPCSTR lpSubKey
1.1 root 145: );
146: LONG
147: APIENTRY
148: RegDeleteKeyW (
149: HKEY hKey,
1.1.1.3 ! root 150: LPCWSTR lpSubKey
1.1 root 151: );
152: #ifdef UNICODE
1.1.1.3 ! root 153: #define RegDeleteKey RegDeleteKeyW
1.1 root 154: #else
1.1.1.3 ! root 155: #define RegDeleteKey RegDeleteKeyA
1.1 root 156: #endif // !UNICODE
157:
158: LONG
159: APIENTRY
160: RegDeleteValueA (
161: HKEY hKey,
162: LPSTR lpValueName
163: );
164: LONG
165: APIENTRY
166: RegDeleteValueW (
167: HKEY hKey,
168: LPWSTR lpValueName
169: );
170: #ifdef UNICODE
1.1.1.3 ! root 171: #define RegDeleteValue RegDeleteValueW
1.1 root 172: #else
1.1.1.3 ! root 173: #define RegDeleteValue RegDeleteValueA
1.1 root 174: #endif // !UNICODE
175:
176: LONG
177: APIENTRY
178: RegEnumKeyA (
179: HKEY hKey,
180: DWORD dwIndex,
181: LPSTR lpName,
182: DWORD cbName
183: );
184: LONG
185: APIENTRY
186: RegEnumKeyW (
187: HKEY hKey,
188: DWORD dwIndex,
189: LPWSTR lpName,
190: DWORD cbName
191: );
192: #ifdef UNICODE
1.1.1.3 ! root 193: #define RegEnumKey RegEnumKeyW
1.1 root 194: #else
1.1.1.3 ! root 195: #define RegEnumKey RegEnumKeyA
1.1 root 196: #endif // !UNICODE
197:
198: LONG
199: APIENTRY
200: RegEnumKeyExA (
201: HKEY hKey,
202: DWORD dwIndex,
203: LPSTR lpName,
204: LPDWORD lpcbName,
205: LPDWORD lpReserved,
206: LPSTR lpClass,
207: LPDWORD lpcbClass,
208: PFILETIME lpftLastWriteTime
209: );
210: LONG
211: APIENTRY
212: RegEnumKeyExW (
213: HKEY hKey,
214: DWORD dwIndex,
215: LPWSTR lpName,
216: LPDWORD lpcbName,
217: LPDWORD lpReserved,
218: LPWSTR lpClass,
219: LPDWORD lpcbClass,
220: PFILETIME lpftLastWriteTime
221: );
222: #ifdef UNICODE
1.1.1.3 ! root 223: #define RegEnumKeyEx RegEnumKeyExW
1.1 root 224: #else
1.1.1.3 ! root 225: #define RegEnumKeyEx RegEnumKeyExA
1.1 root 226: #endif // !UNICODE
227:
228: LONG
229: APIENTRY
230: RegEnumValueA (
231: HKEY hKey,
232: DWORD dwIndex,
233: LPSTR lpValueName,
234: LPDWORD lpcbValueName,
235: LPDWORD lpReserved,
236: LPDWORD lpType,
237: LPBYTE lpData,
238: LPDWORD lpcbData
239: );
240: LONG
241: APIENTRY
242: RegEnumValueW (
243: HKEY hKey,
244: DWORD dwIndex,
245: LPWSTR lpValueName,
246: LPDWORD lpcbValueName,
247: LPDWORD lpReserved,
248: LPDWORD lpType,
249: LPBYTE lpData,
250: LPDWORD lpcbData
251: );
252: #ifdef UNICODE
1.1.1.3 ! root 253: #define RegEnumValue RegEnumValueW
1.1 root 254: #else
1.1.1.3 ! root 255: #define RegEnumValue RegEnumValueA
1.1 root 256: #endif // !UNICODE
257:
258: LONG
259: APIENTRY
260: RegFlushKey (
261: HKEY hKey
262: );
263:
264: LONG
265: APIENTRY
266: RegGetKeySecurity (
267: HKEY hKey,
268: SECURITY_INFORMATION SecurityInformation,
269: PSECURITY_DESCRIPTOR pSecurityDescriptor,
270: LPDWORD lpcbSecurityDescriptor
271: );
272:
273: LONG
274: APIENTRY
275: RegLoadKeyA (
276: HKEY hKey,
1.1.1.3 ! root 277: LPCSTR lpSubKey,
! 278: LPCSTR lpFile
1.1 root 279: );
280: LONG
281: APIENTRY
282: RegLoadKeyW (
283: HKEY hKey,
1.1.1.3 ! root 284: LPCWSTR lpSubKey,
! 285: LPCWSTR lpFile
1.1 root 286: );
287: #ifdef UNICODE
1.1.1.3 ! root 288: #define RegLoadKey RegLoadKeyW
1.1 root 289: #else
1.1.1.3 ! root 290: #define RegLoadKey RegLoadKeyA
1.1 root 291: #endif // !UNICODE
292:
293: LONG
294: APIENTRY
295: RegNotifyChangeKeyValue (
296: HKEY hKey,
297: BOOL bWatchSubtree,
298: DWORD dwNotifyFilter,
299: HANDLE hEvent,
300: BOOL fAsynchronus
301: );
302:
303: LONG
304: APIENTRY
305: RegOpenKeyA (
306: HKEY hKey,
1.1.1.3 ! root 307: LPCSTR lpSubKey,
1.1 root 308: PHKEY phkResult
309: );
310: LONG
311: APIENTRY
312: RegOpenKeyW (
313: HKEY hKey,
1.1.1.3 ! root 314: LPCWSTR lpSubKey,
1.1 root 315: PHKEY phkResult
316: );
317: #ifdef UNICODE
1.1.1.3 ! root 318: #define RegOpenKey RegOpenKeyW
1.1 root 319: #else
1.1.1.3 ! root 320: #define RegOpenKey RegOpenKeyA
1.1 root 321: #endif // !UNICODE
322:
323: LONG
324: APIENTRY
325: RegOpenKeyExA (
326: HKEY hKey,
1.1.1.3 ! root 327: LPCSTR lpSubKey,
1.1 root 328: DWORD ulOptions,
329: REGSAM samDesired,
330: PHKEY phkResult
331: );
332: LONG
333: APIENTRY
334: RegOpenKeyExW (
335: HKEY hKey,
1.1.1.3 ! root 336: LPCWSTR lpSubKey,
1.1 root 337: DWORD ulOptions,
338: REGSAM samDesired,
339: PHKEY phkResult
340: );
341: #ifdef UNICODE
1.1.1.3 ! root 342: #define RegOpenKeyEx RegOpenKeyExW
1.1 root 343: #else
1.1.1.3 ! root 344: #define RegOpenKeyEx RegOpenKeyExA
1.1 root 345: #endif // !UNICODE
346:
347: LONG
348: APIENTRY
349: RegQueryInfoKeyA (
350: HKEY hKey,
351: LPSTR lpClass,
352: LPDWORD lpcbClass,
353: LPDWORD lpReserved,
354: LPDWORD lpcSubKeys,
355: LPDWORD lpcbMaxSubKeyLen,
356: LPDWORD lpcbMaxClassLen,
357: LPDWORD lpcValues,
358: LPDWORD lpcbMaxValueNameLen,
359: LPDWORD lpcbMaxValueLen,
360: LPDWORD lpcbSecurityDescriptor,
361: PFILETIME lpftLastWriteTime
362: );
363: LONG
364: APIENTRY
365: RegQueryInfoKeyW (
366: HKEY hKey,
367: LPWSTR lpClass,
368: LPDWORD lpcbClass,
369: LPDWORD lpReserved,
370: LPDWORD lpcSubKeys,
371: LPDWORD lpcbMaxSubKeyLen,
372: LPDWORD lpcbMaxClassLen,
373: LPDWORD lpcValues,
374: LPDWORD lpcbMaxValueNameLen,
375: LPDWORD lpcbMaxValueLen,
376: LPDWORD lpcbSecurityDescriptor,
377: PFILETIME lpftLastWriteTime
378: );
379: #ifdef UNICODE
1.1.1.3 ! root 380: #define RegQueryInfoKey RegQueryInfoKeyW
1.1 root 381: #else
1.1.1.3 ! root 382: #define RegQueryInfoKey RegQueryInfoKeyA
1.1 root 383: #endif // !UNICODE
384:
385: LONG
386: APIENTRY
387: RegQueryValueA (
388: HKEY hKey,
1.1.1.3 ! root 389: LPCSTR lpSubKey,
1.1 root 390: LPSTR lpValue,
1.1.1.3 ! root 391: PLONG lpcbValue
1.1 root 392: );
393: LONG
394: APIENTRY
395: RegQueryValueW (
396: HKEY hKey,
1.1.1.3 ! root 397: LPCWSTR lpSubKey,
1.1.1.2 root 398: LPWSTR lpValue,
1.1.1.3 ! root 399: PLONG lpcbValue
1.1 root 400: );
401: #ifdef UNICODE
1.1.1.3 ! root 402: #define RegQueryValue RegQueryValueW
1.1 root 403: #else
1.1.1.3 ! root 404: #define RegQueryValue RegQueryValueA
1.1 root 405: #endif // !UNICODE
406:
407: LONG
408: APIENTRY
409: RegQueryValueExA (
410: HKEY hKey,
411: LPSTR lpValueName,
412: LPDWORD lpReserved,
413: LPDWORD lpType,
414: LPBYTE lpData,
415: LPDWORD lpcbData
416: );
417: LONG
418: APIENTRY
419: RegQueryValueExW (
420: HKEY hKey,
421: LPWSTR lpValueName,
422: LPDWORD lpReserved,
423: LPDWORD lpType,
424: LPBYTE lpData,
425: LPDWORD lpcbData
426: );
427: #ifdef UNICODE
1.1.1.3 ! root 428: #define RegQueryValueEx RegQueryValueExW
1.1 root 429: #else
1.1.1.3 ! root 430: #define RegQueryValueEx RegQueryValueExA
1.1 root 431: #endif // !UNICODE
432:
433: LONG
434: APIENTRY
435: RegReplaceKeyA (
436: HKEY hKey,
1.1.1.3 ! root 437: LPCSTR lpSubKey,
! 438: LPCSTR lpNewFile,
! 439: LPCSTR lpOldFile
1.1 root 440: );
441: LONG
442: APIENTRY
443: RegReplaceKeyW (
444: HKEY hKey,
1.1.1.3 ! root 445: LPCWSTR lpSubKey,
! 446: LPCWSTR lpNewFile,
! 447: LPCWSTR lpOldFile
1.1 root 448: );
449: #ifdef UNICODE
1.1.1.3 ! root 450: #define RegReplaceKey RegReplaceKeyW
1.1 root 451: #else
1.1.1.3 ! root 452: #define RegReplaceKey RegReplaceKeyA
1.1 root 453: #endif // !UNICODE
454:
455: LONG
456: APIENTRY
457: RegRestoreKeyA (
458: HKEY hKey,
1.1.1.3 ! root 459: LPCSTR lpFile,
1.1 root 460: DWORD dwFlags
461: );
462: LONG
463: APIENTRY
464: RegRestoreKeyW (
465: HKEY hKey,
1.1.1.3 ! root 466: LPCWSTR lpFile,
1.1 root 467: DWORD dwFlags
468: );
469: #ifdef UNICODE
1.1.1.3 ! root 470: #define RegRestoreKey RegRestoreKeyW
1.1 root 471: #else
1.1.1.3 ! root 472: #define RegRestoreKey RegRestoreKeyA
1.1 root 473: #endif // !UNICODE
474:
475: LONG
476: APIENTRY
477: RegSaveKeyA (
478: HKEY hKey,
1.1.1.3 ! root 479: LPCSTR lpFile,
1.1 root 480: LPSECURITY_ATTRIBUTES lpSecurityAttributes
481: );
482: LONG
483: APIENTRY
484: RegSaveKeyW (
485: HKEY hKey,
1.1.1.3 ! root 486: LPCWSTR lpFile,
1.1 root 487: LPSECURITY_ATTRIBUTES lpSecurityAttributes
488: );
489: #ifdef UNICODE
1.1.1.3 ! root 490: #define RegSaveKey RegSaveKeyW
1.1 root 491: #else
1.1.1.3 ! root 492: #define RegSaveKey RegSaveKeyA
1.1 root 493: #endif // !UNICODE
494:
495: LONG
496: APIENTRY
497: RegSetKeySecurity (
498: HKEY hKey,
499: SECURITY_INFORMATION SecurityInformation,
500: PSECURITY_DESCRIPTOR pSecurityDescriptor
501: );
502:
503: LONG
504: APIENTRY
505: RegSetValueA (
506: HKEY hKey,
1.1.1.3 ! root 507: LPCSTR lpSubKey,
1.1 root 508: DWORD dwType,
1.1.1.3 ! root 509: LPCSTR lpData,
1.1 root 510: DWORD cbData
511: );
512: LONG
513: APIENTRY
514: RegSetValueW (
515: HKEY hKey,
1.1.1.3 ! root 516: LPCWSTR lpSubKey,
1.1 root 517: DWORD dwType,
1.1.1.3 ! root 518: LPCWSTR lpData,
1.1 root 519: DWORD cbData
520: );
521: #ifdef UNICODE
1.1.1.3 ! root 522: #define RegSetValue RegSetValueW
1.1 root 523: #else
1.1.1.3 ! root 524: #define RegSetValue RegSetValueA
1.1 root 525: #endif // !UNICODE
526:
527:
528: LONG
529: APIENTRY
530: RegSetValueExA (
531: HKEY hKey,
1.1.1.3 ! root 532: LPCSTR lpValueName,
1.1 root 533: DWORD Reserved,
534: DWORD dwType,
1.1.1.3 ! root 535: CONST BYTE* lpData,
1.1 root 536: DWORD cbData
537: );
538: LONG
539: APIENTRY
540: RegSetValueExW (
541: HKEY hKey,
1.1.1.3 ! root 542: LPCWSTR lpValueName,
1.1 root 543: DWORD Reserved,
544: DWORD dwType,
1.1.1.3 ! root 545: CONST BYTE* lpData,
1.1 root 546: DWORD cbData
547: );
548: #ifdef UNICODE
1.1.1.3 ! root 549: #define RegSetValueEx RegSetValueExW
1.1 root 550: #else
1.1.1.3 ! root 551: #define RegSetValueEx RegSetValueExA
1.1 root 552: #endif // !UNICODE
553:
554: LONG
555: APIENTRY
556: RegUnLoadKeyA (
557: HKEY hKey,
1.1.1.3 ! root 558: LPCSTR lpSubKey
1.1 root 559: );
560: LONG
561: APIENTRY
562: RegUnLoadKeyW (
563: HKEY hKey,
1.1.1.3 ! root 564: LPCWSTR lpSubKey
1.1 root 565: );
566: #ifdef UNICODE
1.1.1.3 ! root 567: #define RegUnLoadKey RegUnLoadKeyW
1.1 root 568: #else
1.1.1.3 ! root 569: #define RegUnLoadKey RegUnLoadKeyA
1.1 root 570: #endif // !UNICODE
571:
572: //
573: // Remoteable System Shutdown APIs
574: //
575:
576: BOOL
577: APIENTRY
578: InitiateSystemShutdownA(
579: LPSTR lpMachineName,
580: LPSTR lpMessage,
581: DWORD dwTimeout,
582: BOOL bForceAppsClosed,
583: BOOL bRebootAfterShutdown
584: );
585: BOOL
586: APIENTRY
587: InitiateSystemShutdownW(
588: LPWSTR lpMachineName,
589: LPWSTR lpMessage,
590: DWORD dwTimeout,
591: BOOL bForceAppsClosed,
592: BOOL bRebootAfterShutdown
593: );
594: #ifdef UNICODE
1.1.1.3 ! root 595: #define InitiateSystemShutdown InitiateSystemShutdownW
1.1 root 596: #else
1.1.1.3 ! root 597: #define InitiateSystemShutdown InitiateSystemShutdownA
1.1 root 598: #endif // !UNICODE
599:
600:
601: BOOL
602: APIENTRY
603: AbortSystemShutdownA(
604: LPSTR lpMachineName
605: );
606: BOOL
607: APIENTRY
608: AbortSystemShutdownW(
609: LPWSTR lpMachineName
610: );
611: #ifdef UNICODE
1.1.1.3 ! root 612: #define AbortSystemShutdown AbortSystemShutdownW
1.1 root 613: #else
1.1.1.3 ! root 614: #define AbortSystemShutdown AbortSystemShutdownA
1.1 root 615: #endif // !UNICODE
616:
1.1.1.2 root 617: #ifdef __cplusplus
618: }
619: #endif
1.1 root 620:
621: #endif // _WINREG_
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.