[1046] | 1 | #ifndef _WINREG_H
|
---|
| 2 | #define _WINREG_H
|
---|
| 3 | #if __GNUC__ >= 3
|
---|
| 4 | #pragma GCC system_header
|
---|
| 5 | #endif
|
---|
| 6 |
|
---|
| 7 | #ifndef WINADVAPI
|
---|
| 8 | #define WINADVAPI
|
---|
| 9 | #endif
|
---|
| 10 |
|
---|
| 11 | #ifdef __cplusplus
|
---|
| 12 | extern "C" {
|
---|
| 13 | #endif
|
---|
| 14 | #define HKEY_CLASSES_ROOT ((HKEY)0x80000000)
|
---|
| 15 | #define HKEY_CURRENT_USER ((HKEY)0x80000001)
|
---|
| 16 | #define HKEY_LOCAL_MACHINE ((HKEY)0x80000002)
|
---|
| 17 | #define HKEY_USERS ((HKEY)0x80000003)
|
---|
| 18 | #define HKEY_PERFORMANCE_DATA ((HKEY)0x80000004)
|
---|
| 19 | #define HKEY_CURRENT_CONFIG ((HKEY)0x80000005)
|
---|
| 20 | #define HKEY_DYN_DATA ((HKEY)0x80000006)
|
---|
| 21 | #define REG_OPTION_VOLATILE 1
|
---|
| 22 | #define REG_OPTION_NON_VOLATILE 0
|
---|
| 23 | #define REG_CREATED_NEW_KEY 1
|
---|
| 24 | #define REG_OPENED_EXISTING_KEY 2
|
---|
| 25 | #define REG_NONE 0
|
---|
| 26 | #define REG_SZ 1
|
---|
| 27 | #define REG_EXPAND_SZ 2
|
---|
| 28 | #define REG_BINARY 3
|
---|
| 29 | #define REG_DWORD_LITTLE_ENDIAN 4
|
---|
| 30 | #define REG_DWORD 4
|
---|
| 31 | #define REG_DWORD_BIG_ENDIAN 5
|
---|
| 32 | #define REG_LINK 6
|
---|
| 33 | #define REG_MULTI_SZ 7
|
---|
| 34 | #define REG_RESOURCE_LIST 8
|
---|
| 35 | #define REG_FULL_RESOURCE_DESCRIPTOR 9
|
---|
| 36 | #define REG_RESOURCE_REQUIREMENTS_LIST 10
|
---|
| 37 | #define REG_QWORD_LITTLE_ENDIAN 11
|
---|
| 38 | #define REG_QWORD 11
|
---|
| 39 | #define REG_NOTIFY_CHANGE_NAME 1
|
---|
| 40 | #define REG_NOTIFY_CHANGE_ATTRIBUTES 2
|
---|
| 41 | #define REG_NOTIFY_CHANGE_LAST_SET 4
|
---|
| 42 | #define REG_NOTIFY_CHANGE_SECURITY 8
|
---|
| 43 |
|
---|
| 44 | #ifndef RC_INVOKED
|
---|
| 45 | typedef ACCESS_MASK REGSAM;
|
---|
| 46 | typedef struct value_entA {
|
---|
| 47 | LPSTR ve_valuename;
|
---|
| 48 | DWORD ve_valuelen;
|
---|
| 49 | DWORD ve_valueptr;
|
---|
| 50 | DWORD ve_type;
|
---|
| 51 | } VALENTA,*PVALENTA;
|
---|
| 52 | typedef struct value_entW {
|
---|
| 53 | LPWSTR ve_valuename;
|
---|
| 54 | DWORD ve_valuelen;
|
---|
| 55 | DWORD ve_valueptr;
|
---|
| 56 | DWORD ve_type;
|
---|
| 57 | } VALENTW,*PVALENTW;
|
---|
| 58 | WINADVAPI BOOL WINAPI AbortSystemShutdownA(LPCSTR);
|
---|
| 59 | WINADVAPI BOOL WINAPI AbortSystemShutdownW(LPCWSTR);
|
---|
| 60 | WINADVAPI BOOL WINAPI InitiateSystemShutdownA(LPSTR,LPSTR,DWORD,BOOL,BOOL);
|
---|
| 61 | WINADVAPI BOOL WINAPI InitiateSystemShutdownW(LPWSTR,LPWSTR,DWORD,BOOL,BOOL);
|
---|
| 62 | WINADVAPI LONG WINAPI RegCloseKey(HKEY);
|
---|
| 63 | WINADVAPI LONG WINAPI RegConnectRegistryA(LPCSTR,HKEY,PHKEY);
|
---|
| 64 | WINADVAPI LONG WINAPI RegConnectRegistryW(LPCWSTR,HKEY,PHKEY);
|
---|
| 65 | WINADVAPI LONG WINAPI RegCreateKeyA(HKEY,LPCSTR,PHKEY);
|
---|
| 66 | WINADVAPI LONG WINAPI RegCreateKeyExA(HKEY,LPCSTR,DWORD,LPSTR,DWORD,REGSAM,LPSECURITY_ATTRIBUTES,PHKEY,PDWORD);
|
---|
| 67 | WINADVAPI LONG WINAPI RegCreateKeyExW(HKEY,LPCWSTR,DWORD,LPWSTR,DWORD,REGSAM,LPSECURITY_ATTRIBUTES,PHKEY,PDWORD);
|
---|
| 68 | WINADVAPI LONG WINAPI RegCreateKeyW(HKEY,LPCWSTR,PHKEY);
|
---|
| 69 | WINADVAPI LONG WINAPI RegDeleteKeyA(HKEY,LPCSTR);
|
---|
| 70 | WINADVAPI LONG WINAPI RegDeleteKeyW(HKEY,LPCWSTR);
|
---|
| 71 | #if (WINVER >= 0x0502)
|
---|
| 72 | WINADVAPI LONG WINAPI RegDeleteKeyExA(HKEY,LPCSTR,REGSAM,DWORD);
|
---|
| 73 | WINADVAPI LONG WINAPI RegDeleteKeyExW(HKEY,LPCWSTR,REGSAM,DWORD);
|
---|
| 74 | #endif
|
---|
| 75 | WINADVAPI LONG WINAPI RegDeleteValueA(HKEY,LPCSTR);
|
---|
| 76 | WINADVAPI LONG WINAPI RegDeleteValueW(HKEY,LPCWSTR);
|
---|
| 77 | WINADVAPI LONG WINAPI RegEnumKeyA(HKEY,DWORD,LPSTR,DWORD);
|
---|
| 78 | WINADVAPI LONG WINAPI RegEnumKeyW(HKEY,DWORD,LPWSTR,DWORD);
|
---|
| 79 | WINADVAPI LONG WINAPI RegEnumKeyExA(HKEY,DWORD,LPSTR,PDWORD,PDWORD,LPSTR,PDWORD,PFILETIME);
|
---|
| 80 | WINADVAPI LONG WINAPI RegEnumKeyExW(HKEY,DWORD,LPWSTR,PDWORD,PDWORD,LPWSTR,PDWORD,PFILETIME);
|
---|
| 81 | WINADVAPI LONG WINAPI RegEnumValueA(HKEY,DWORD,LPSTR,PDWORD,PDWORD,PDWORD,LPBYTE,PDWORD);
|
---|
| 82 | WINADVAPI LONG WINAPI RegEnumValueW(HKEY,DWORD,LPWSTR,PDWORD,PDWORD,PDWORD,LPBYTE,PDWORD);
|
---|
| 83 | WINADVAPI LONG WINAPI RegFlushKey(HKEY);
|
---|
| 84 | WINADVAPI LONG WINAPI RegGetKeySecurity(HKEY,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR,PDWORD);
|
---|
| 85 | WINADVAPI LONG WINAPI RegLoadKeyA(HKEY,LPCSTR,LPCSTR);
|
---|
| 86 | WINADVAPI LONG WINAPI RegLoadKeyW(HKEY,LPCWSTR,LPCWSTR);
|
---|
| 87 | WINADVAPI LONG WINAPI RegNotifyChangeKeyValue(HKEY,BOOL,DWORD,HANDLE,BOOL);
|
---|
| 88 | WINADVAPI LONG WINAPI RegOpenKeyA(HKEY,LPCSTR,PHKEY);
|
---|
| 89 | WINADVAPI LONG WINAPI RegOpenKeyExA(HKEY,LPCSTR,DWORD,REGSAM,PHKEY);
|
---|
| 90 | WINADVAPI LONG WINAPI RegOpenKeyExW(HKEY,LPCWSTR,DWORD,REGSAM,PHKEY);
|
---|
| 91 | WINADVAPI LONG WINAPI RegOpenKeyW(HKEY,LPCWSTR,PHKEY);
|
---|
| 92 | WINADVAPI LONG WINAPI RegQueryInfoKeyA(HKEY,LPSTR,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PFILETIME);
|
---|
| 93 | WINADVAPI LONG WINAPI RegQueryInfoKeyW(HKEY,LPWSTR,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PFILETIME);
|
---|
| 94 | WINADVAPI LONG WINAPI RegQueryMultipleValuesA(HKEY,PVALENTA,DWORD,LPSTR,LPDWORD);
|
---|
| 95 | WINADVAPI LONG WINAPI RegQueryMultipleValuesW(HKEY,PVALENTW,DWORD,LPWSTR,LPDWORD);
|
---|
| 96 | WINADVAPI LONG WINAPI RegQueryValueA(HKEY,LPCSTR,LPSTR,PLONG);
|
---|
| 97 | WINADVAPI LONG WINAPI RegQueryValueExA(HKEY,LPCSTR,LPDWORD,LPDWORD,LPBYTE,LPDWORD);
|
---|
| 98 | WINADVAPI LONG WINAPI RegQueryValueExW(HKEY,LPCWSTR,LPDWORD,LPDWORD,LPBYTE,LPDWORD);
|
---|
| 99 | WINADVAPI LONG WINAPI RegQueryValueW(HKEY,LPCWSTR,LPWSTR,PLONG);
|
---|
| 100 | WINADVAPI LONG WINAPI RegReplaceKeyA(HKEY,LPCSTR,LPCSTR,LPCSTR);
|
---|
| 101 | WINADVAPI LONG WINAPI RegReplaceKeyW(HKEY,LPCWSTR,LPCWSTR,LPCWSTR);
|
---|
| 102 | WINADVAPI LONG WINAPI RegRestoreKeyA(HKEY,LPCSTR,DWORD);
|
---|
| 103 | WINADVAPI LONG WINAPI RegRestoreKeyW(HKEY,LPCWSTR,DWORD);
|
---|
| 104 | WINADVAPI LONG WINAPI RegSaveKeyA(HKEY,LPCSTR,LPSECURITY_ATTRIBUTES);
|
---|
| 105 | WINADVAPI LONG WINAPI RegSaveKeyW(HKEY,LPCWSTR,LPSECURITY_ATTRIBUTES);
|
---|
| 106 | WINADVAPI LONG WINAPI RegSetKeySecurity(HKEY,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR);
|
---|
| 107 | WINADVAPI LONG WINAPI RegSetValueA(HKEY,LPCSTR,DWORD,LPCSTR,DWORD);
|
---|
| 108 | WINADVAPI LONG WINAPI RegSetValueExA(HKEY,LPCSTR,DWORD,DWORD,const BYTE*,DWORD);
|
---|
| 109 | WINADVAPI LONG WINAPI RegSetValueExW(HKEY,LPCWSTR,DWORD,DWORD,const BYTE*,DWORD);
|
---|
| 110 | WINADVAPI LONG WINAPI RegSetValueW(HKEY,LPCWSTR,DWORD,LPCWSTR,DWORD);
|
---|
| 111 | WINADVAPI LONG WINAPI RegUnLoadKeyA(HKEY,LPCSTR);
|
---|
| 112 | WINADVAPI LONG WINAPI RegUnLoadKeyW(HKEY,LPCWSTR);
|
---|
| 113 |
|
---|
| 114 | #ifdef UNICODE
|
---|
| 115 | typedef VALENTW VALENT,*PVALENT;
|
---|
| 116 | #define AbortSystemShutdown AbortSystemShutdownW
|
---|
| 117 | #define InitiateSystemShutdown InitiateSystemShutdownW
|
---|
| 118 | #define RegConnectRegistry RegConnectRegistryW
|
---|
| 119 | #define RegCreateKey RegCreateKeyW
|
---|
| 120 | #define RegCreateKeyEx RegCreateKeyExW
|
---|
| 121 | #define RegDeleteKey RegDeleteKeyW
|
---|
| 122 | #if (WINVER >= 0x0502)
|
---|
| 123 | #define RegDeleteKeyEx RegDeleteKeyExW
|
---|
| 124 | #endif
|
---|
| 125 | #define RegDeleteValue RegDeleteValueW
|
---|
| 126 | #define RegEnumKey RegEnumKeyW
|
---|
| 127 | #define RegEnumKeyEx RegEnumKeyExW
|
---|
| 128 | #define RegEnumValue RegEnumValueW
|
---|
| 129 | #define RegLoadKey RegLoadKeyW
|
---|
| 130 | #define RegOpenKey RegOpenKeyW
|
---|
| 131 | #define RegOpenKeyEx RegOpenKeyExW
|
---|
| 132 | #define RegQueryInfoKey RegQueryInfoKeyW
|
---|
| 133 | #define RegQueryMultipleValues RegQueryMultipleValuesW
|
---|
| 134 | #define RegQueryValue RegQueryValueW
|
---|
| 135 | #define RegQueryValueEx RegQueryValueExW
|
---|
| 136 | #define RegReplaceKey RegReplaceKeyW
|
---|
| 137 | #define RegRestoreKey RegRestoreKeyW
|
---|
| 138 | #define RegSaveKey RegSaveKeyW
|
---|
| 139 | #define RegSetValue RegSetValueW
|
---|
| 140 | #define RegSetValueEx RegSetValueExW
|
---|
| 141 | #define RegUnLoadKey RegUnLoadKeyW
|
---|
| 142 | #else
|
---|
| 143 | typedef VALENTA VALENT,*PVALENT;
|
---|
| 144 | #define AbortSystemShutdown AbortSystemShutdownA
|
---|
| 145 | #define InitiateSystemShutdown InitiateSystemShutdownA
|
---|
| 146 | #define RegConnectRegistry RegConnectRegistryA
|
---|
| 147 | #define RegCreateKey RegCreateKeyA
|
---|
| 148 | #define RegCreateKeyEx RegCreateKeyExA
|
---|
| 149 | #define RegDeleteKey RegDeleteKeyA
|
---|
| 150 | #if (WINVER >= 0x0502)
|
---|
| 151 | #define RegDeleteKeyEx RegDeleteKeyExA
|
---|
| 152 | #endif
|
---|
| 153 | #define RegDeleteValue RegDeleteValueA
|
---|
| 154 | #define RegEnumKey RegEnumKeyA
|
---|
| 155 | #define RegEnumKeyEx RegEnumKeyExA
|
---|
| 156 | #define RegEnumValue RegEnumValueA
|
---|
| 157 | #define RegLoadKey RegLoadKeyA
|
---|
| 158 | #define RegOpenKey RegOpenKeyA
|
---|
| 159 | #define RegOpenKeyEx RegOpenKeyExA
|
---|
| 160 | #define RegQueryInfoKey RegQueryInfoKeyA
|
---|
| 161 | #define RegQueryMultipleValues RegQueryMultipleValuesA
|
---|
| 162 | #define RegQueryValue RegQueryValueA
|
---|
| 163 | #define RegQueryValueEx RegQueryValueExA
|
---|
| 164 | #define RegReplaceKey RegReplaceKeyA
|
---|
| 165 | #define RegRestoreKey RegRestoreKeyA
|
---|
| 166 | #define RegSaveKey RegSaveKeyA
|
---|
| 167 | #define RegSetValue RegSetValueA
|
---|
| 168 | #define RegSetValueEx RegSetValueExA
|
---|
| 169 | #define RegUnLoadKey RegUnLoadKeyA
|
---|
| 170 | #endif
|
---|
| 171 | #endif
|
---|
| 172 | #ifdef __cplusplus
|
---|
| 173 | }
|
---|
| 174 | #endif
|
---|
| 175 | #endif
|
---|