Annotation of mstools/h/winreg.h, revision 1.1.1.2

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
                     83: #define RegConnectRegistry RegConnectRegistryW
                     84: #else
                     85: #define RegConnectRegistry RegConnectRegistryA
                     86: #endif // !UNICODE
                     87: 
                     88: LONG
                     89: APIENTRY
                     90: RegCreateKeyA (
                     91:     HKEY hKey,
                     92:     LPSTR lpSubKey,
                     93:     PHKEY phkResult
                     94:     );
                     95: LONG
                     96: APIENTRY
                     97: RegCreateKeyW (
                     98:     HKEY hKey,
                     99:     LPWSTR lpSubKey,
                    100:     PHKEY phkResult
                    101:     );
                    102: #ifdef UNICODE
                    103: #define RegCreateKey RegCreateKeyW
                    104: #else
                    105: #define RegCreateKey RegCreateKeyA
                    106: #endif // !UNICODE
                    107: 
                    108: LONG
                    109: APIENTRY
                    110: RegCreateKeyExA (
                    111:     HKEY hKey,
                    112:     LPSTR lpSubKey,
                    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,
                    125:     LPWSTR lpSubKey,
                    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
                    135: #define RegCreateKeyEx RegCreateKeyExW
                    136: #else
                    137: #define RegCreateKeyEx RegCreateKeyExA
                    138: #endif // !UNICODE
                    139: 
                    140: LONG
                    141: APIENTRY
                    142: RegDeleteKeyA (
                    143:     HKEY hKey,
                    144:     LPSTR lpSubKey
                    145:     );
                    146: LONG
                    147: APIENTRY
                    148: RegDeleteKeyW (
                    149:     HKEY hKey,
                    150:     LPWSTR lpSubKey
                    151:     );
                    152: #ifdef UNICODE
                    153: #define RegDeleteKey RegDeleteKeyW
                    154: #else
                    155: #define RegDeleteKey RegDeleteKeyA
                    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
                    171: #define RegDeleteValue RegDeleteValueW
                    172: #else
                    173: #define RegDeleteValue RegDeleteValueA
                    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
                    193: #define RegEnumKey RegEnumKeyW
                    194: #else
                    195: #define RegEnumKey RegEnumKeyA
                    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
                    223: #define RegEnumKeyEx RegEnumKeyExW
                    224: #else
                    225: #define RegEnumKeyEx RegEnumKeyExA
                    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
                    253: #define RegEnumValue RegEnumValueW
                    254: #else
                    255: #define RegEnumValue RegEnumValueA
                    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,
                    277:     LPSTR  lpSubKey,
                    278:     LPSTR  lpFile
                    279:     );
                    280: LONG
                    281: APIENTRY
                    282: RegLoadKeyW (
                    283:     HKEY    hKey,
                    284:     LPWSTR  lpSubKey,
                    285:     LPWSTR  lpFile
                    286:     );
                    287: #ifdef UNICODE
                    288: #define RegLoadKey RegLoadKeyW
                    289: #else
                    290: #define RegLoadKey RegLoadKeyA
                    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,
                    307:     LPSTR lpSubKey,
                    308:     PHKEY phkResult
                    309:     );
                    310: LONG
                    311: APIENTRY
                    312: RegOpenKeyW (
                    313:     HKEY hKey,
                    314:     LPWSTR lpSubKey,
                    315:     PHKEY phkResult
                    316:     );
                    317: #ifdef UNICODE
                    318: #define RegOpenKey RegOpenKeyW
                    319: #else
                    320: #define RegOpenKey RegOpenKeyA
                    321: #endif // !UNICODE
                    322: 
                    323: LONG
                    324: APIENTRY
                    325: RegOpenKeyExA (
                    326:     HKEY hKey,
                    327:     LPSTR lpSubKey,
                    328:     DWORD ulOptions,
                    329:     REGSAM samDesired,
                    330:     PHKEY phkResult
                    331:     );
                    332: LONG
                    333: APIENTRY
                    334: RegOpenKeyExW (
                    335:     HKEY hKey,
                    336:     LPWSTR lpSubKey,
                    337:     DWORD ulOptions,
                    338:     REGSAM samDesired,
                    339:     PHKEY phkResult
                    340:     );
                    341: #ifdef UNICODE
                    342: #define RegOpenKeyEx RegOpenKeyExW
                    343: #else
                    344: #define RegOpenKeyEx RegOpenKeyExA
                    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
                    380: #define RegQueryInfoKey RegQueryInfoKeyW
                    381: #else
                    382: #define RegQueryInfoKey RegQueryInfoKeyA
                    383: #endif // !UNICODE
                    384: 
                    385: LONG
                    386: APIENTRY
                    387: RegQueryValueA (
                    388:     HKEY hKey,
                    389:     LPSTR lpSubKey,
                    390:     LPSTR lpValue,
                    391:     LPDWORD lpcbValue
                    392:     );
                    393: LONG
                    394: APIENTRY
                    395: RegQueryValueW (
                    396:     HKEY hKey,
                    397:     LPWSTR lpSubKey,
1.1.1.2 ! root      398:     LPWSTR lpValue,
1.1       root      399:     LPDWORD lpcbValue
                    400:     );
                    401: #ifdef UNICODE
                    402: #define RegQueryValue RegQueryValueW
                    403: #else
                    404: #define RegQueryValue RegQueryValueA
                    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
                    428: #define RegQueryValueEx RegQueryValueExW
                    429: #else
                    430: #define RegQueryValueEx RegQueryValueExA
                    431: #endif // !UNICODE
                    432: 
                    433: LONG
                    434: APIENTRY
                    435: RegReplaceKeyA (
                    436:     HKEY     hKey,
                    437:     LPSTR  lpSubKey,
                    438:     LPSTR  lpNewFile,
                    439:     LPSTR  lpOldFile
                    440:     );
                    441: LONG
                    442: APIENTRY
                    443: RegReplaceKeyW (
                    444:     HKEY     hKey,
                    445:     LPWSTR  lpSubKey,
                    446:     LPWSTR  lpNewFile,
                    447:     LPWSTR  lpOldFile
                    448:     );
                    449: #ifdef UNICODE
                    450: #define RegReplaceKey RegReplaceKeyW
                    451: #else
                    452: #define RegReplaceKey RegReplaceKeyA
                    453: #endif // !UNICODE
                    454: 
                    455: LONG
                    456: APIENTRY
                    457: RegRestoreKeyA (
                    458:     HKEY hKey,
                    459:     LPSTR lpFile,
                    460:     DWORD   dwFlags
                    461:     );
                    462: LONG
                    463: APIENTRY
                    464: RegRestoreKeyW (
                    465:     HKEY hKey,
                    466:     LPWSTR lpFile,
                    467:     DWORD   dwFlags
                    468:     );
                    469: #ifdef UNICODE
                    470: #define RegRestoreKey RegRestoreKeyW
                    471: #else
                    472: #define RegRestoreKey RegRestoreKeyA
                    473: #endif // !UNICODE
                    474: 
                    475: LONG
                    476: APIENTRY
                    477: RegSaveKeyA (
                    478:     HKEY hKey,
                    479:     LPSTR lpFile,
                    480:     LPSECURITY_ATTRIBUTES lpSecurityAttributes
                    481:     );
                    482: LONG
                    483: APIENTRY
                    484: RegSaveKeyW (
                    485:     HKEY hKey,
                    486:     LPWSTR lpFile,
                    487:     LPSECURITY_ATTRIBUTES lpSecurityAttributes
                    488:     );
                    489: #ifdef UNICODE
                    490: #define RegSaveKey RegSaveKeyW
                    491: #else
                    492: #define RegSaveKey RegSaveKeyA
                    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,
                    507:     LPSTR lpSubKey,
                    508:     DWORD dwType,
                    509:     LPSTR lpData,
                    510:     DWORD cbData
                    511:     );
                    512: LONG
                    513: APIENTRY
                    514: RegSetValueW (
                    515:     HKEY hKey,
                    516:     LPWSTR lpSubKey,
                    517:     DWORD dwType,
1.1.1.2 ! root      518:     LPWSTR lpData,
1.1       root      519:     DWORD cbData
                    520:     );
                    521: #ifdef UNICODE
                    522: #define RegSetValue RegSetValueW
                    523: #else
                    524: #define RegSetValue RegSetValueA
                    525: #endif // !UNICODE
                    526: 
                    527: 
                    528: LONG
                    529: APIENTRY
                    530: RegSetValueExA (
                    531:     HKEY hKey,
                    532:     LPSTR lpValueName,
                    533:     DWORD Reserved,
                    534:     DWORD dwType,
                    535:     LPBYTE lpData,
                    536:     DWORD cbData
                    537:     );
                    538: LONG
                    539: APIENTRY
                    540: RegSetValueExW (
                    541:     HKEY hKey,
                    542:     LPWSTR lpValueName,
                    543:     DWORD Reserved,
                    544:     DWORD dwType,
                    545:     LPBYTE lpData,
                    546:     DWORD cbData
                    547:     );
                    548: #ifdef UNICODE
                    549: #define RegSetValueEx RegSetValueExW
                    550: #else
                    551: #define RegSetValueEx RegSetValueExA
                    552: #endif // !UNICODE
                    553: 
                    554: LONG
                    555: APIENTRY
                    556: RegUnLoadKeyA (
                    557:     HKEY    hKey,
                    558:     LPSTR lpSubKey
                    559:     );
                    560: LONG
                    561: APIENTRY
                    562: RegUnLoadKeyW (
                    563:     HKEY    hKey,
                    564:     LPWSTR lpSubKey
                    565:     );
                    566: #ifdef UNICODE
                    567: #define RegUnLoadKey RegUnLoadKeyW
                    568: #else
                    569: #define RegUnLoadKey RegUnLoadKeyA
                    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
                    595: #define InitiateSystemShutdown InitiateSystemShutdownW
                    596: #else
                    597: #define InitiateSystemShutdown InitiateSystemShutdownA
                    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
                    612: #define AbortSystemShutdown AbortSystemShutdownW
                    613: #else
                    614: #define AbortSystemShutdown AbortSystemShutdownA
                    615: #endif // !UNICODE
                    616: 
1.1.1.2 ! root      617: #ifdef __cplusplus
        !           618: }
        !           619: #endif
1.1       root      620: 
                    621: #endif // _WINREG_

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.