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

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

unix.superglobalmegacorp.com

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