1 /** 2 * This file has no copyright assigned and is placed in the Public Domain. 3 * This file is part of the mingw-w64 runtime package. 4 * No warranty is given; refer to the file DISCLAIMER.PD within this package. 5 */ 6 #ifndef _WINREG_ 7 #define _WINREG_ 8 9 #include <_mingw_unicode.h> 10 11 #ifdef __cplusplus 12 extern "C" { 13 #endif 14 15 #ifndef WINVER 16 #define WINVER 0x0502 17 #endif 18 19 #define RRF_RT_REG_NONE 0x00000001 20 #define RRF_RT_REG_SZ 0x00000002 21 #define RRF_RT_REG_EXPAND_SZ 0x00000004 22 #define RRF_RT_REG_BINARY 0x00000008 23 #define RRF_RT_REG_DWORD 0x00000010 24 #define RRF_RT_REG_MULTI_SZ 0x00000020 25 #define RRF_RT_REG_QWORD 0x00000040 26 27 #define RRF_RT_DWORD (RRF_RT_REG_BINARY | RRF_RT_REG_DWORD) 28 #define RRF_RT_QWORD (RRF_RT_REG_BINARY | RRF_RT_REG_QWORD) 29 #define RRF_RT_ANY 0x0000ffff 30 31 #define RRF_NOEXPAND 0x10000000 32 #define RRF_ZEROONFAILURE 0x20000000 33 34 typedef ACCESS_MASK REGSAM; 35 typedef LONG LSTATUS; 36 37 #define HKEY_CLASSES_ROOT ((HKEY) (ULONG_PTR)((LONG)0x80000000)) 38 #define HKEY_CURRENT_USER ((HKEY) (ULONG_PTR)((LONG)0x80000001)) 39 #define HKEY_LOCAL_MACHINE ((HKEY) (ULONG_PTR)((LONG)0x80000002)) 40 #define HKEY_USERS ((HKEY) (ULONG_PTR)((LONG)0x80000003)) 41 #define HKEY_PERFORMANCE_DATA ((HKEY) (ULONG_PTR)((LONG)0x80000004)) 42 #define HKEY_PERFORMANCE_TEXT ((HKEY) (ULONG_PTR)((LONG)0x80000050)) 43 #define HKEY_PERFORMANCE_NLSTEXT ((HKEY) (ULONG_PTR)((LONG)0x80000060)) 44 #define HKEY_CURRENT_CONFIG ((HKEY) (ULONG_PTR)((LONG)0x80000005)) 45 #define HKEY_DYN_DATA ((HKEY) (ULONG_PTR)((LONG)0x80000006)) 46 47 #define REG_SECURE_CONNECTION 1 48 49 #ifndef _PROVIDER_STRUCTS_DEFINED 50 #define _PROVIDER_STRUCTS_DEFINED 51 52 #define PROVIDER_KEEPS_VALUE_LENGTH 0x1 53 struct val_context { 54 int valuelen; 55 LPVOID value_context; 56 LPVOID val_buff_ptr; 57 }; 58 59 typedef struct val_context *PVALCONTEXT; 60 61 typedef struct pvalueA { 62 LPSTR pv_valuename; 63 int pv_valuelen; 64 LPVOID pv_value_context; 65 DWORD pv_type; 66 }PVALUEA,*PPVALUEA; 67 68 typedef struct pvalueW { 69 LPWSTR pv_valuename; 70 int pv_valuelen; 71 LPVOID pv_value_context; 72 DWORD pv_type; 73 }PVALUEW,*PPVALUEW; 74 75 __MINGW_TYPEDEF_AW(PVALUE) 76 __MINGW_TYPEDEF_AW(PPVALUE) 77 78 typedef DWORD __cdecl QUERYHANDLER(LPVOID keycontext,PVALCONTEXT val_list,DWORD num_vals,LPVOID outputbuffer,DWORD *total_outlen,DWORD input_blen); 79 80 typedef QUERYHANDLER *PQUERYHANDLER; 81 82 typedef struct provider_info { 83 PQUERYHANDLER pi_R0_1val; 84 PQUERYHANDLER pi_R0_allvals; 85 PQUERYHANDLER pi_R3_1val; 86 PQUERYHANDLER pi_R3_allvals; 87 DWORD pi_flags; 88 LPVOID pi_key_context; 89 } REG_PROVIDER; 90 91 typedef struct provider_info *PPROVIDER; 92 93 typedef struct value_entA { 94 LPSTR ve_valuename; 95 DWORD ve_valuelen; 96 DWORD_PTR ve_valueptr; 97 DWORD ve_type; 98 } VALENTA,*PVALENTA; 99 100 typedef struct value_entW { 101 LPWSTR ve_valuename; 102 DWORD ve_valuelen; 103 DWORD_PTR ve_valueptr; 104 DWORD ve_type; 105 } VALENTW,*PVALENTW; 106 107 __MINGW_TYPEDEF_AW(VALENT) 108 __MINGW_TYPEDEF_AW(PVALENT) 109 #endif 110 111 #define WIN31_CLASS NULL 112 113 #define RegConnectRegistry __MINGW_NAME_AW(RegConnectRegistry) 114 #define RegConnectRegistryEx __MINGW_NAME_AW(RegConnectRegistryEx) 115 #define RegCreateKey __MINGW_NAME_AW(RegCreateKey) 116 #define RegCreateKeyEx __MINGW_NAME_AW(RegCreateKeyEx) 117 #define RegDeleteKey __MINGW_NAME_AW(RegDeleteKey) 118 #define RegDeleteKeyEx __MINGW_NAME_AW(RegDeleteKeyEx) 119 #define RegDeleteValue __MINGW_NAME_AW(RegDeleteValue) 120 #define RegEnumKey __MINGW_NAME_AW(RegEnumKey) 121 #define RegEnumKeyEx __MINGW_NAME_AW(RegEnumKeyEx) 122 #define RegEnumValue __MINGW_NAME_AW(RegEnumValue) 123 #define RegLoadKey __MINGW_NAME_AW(RegLoadKey) 124 #define RegOpenKey __MINGW_NAME_AW(RegOpenKey) 125 #define RegOpenKeyEx __MINGW_NAME_AW(RegOpenKeyEx) 126 #define RegQueryInfoKey __MINGW_NAME_AW(RegQueryInfoKey) 127 #define RegQueryValue __MINGW_NAME_AW(RegQueryValue) 128 #define RegQueryMultipleValues __MINGW_NAME_AW(RegQueryMultipleValues) 129 #define RegQueryValueEx __MINGW_NAME_AW(RegQueryValueEx) 130 #define RegReplaceKey __MINGW_NAME_AW(RegReplaceKey) 131 #define RegRestoreKey __MINGW_NAME_AW(RegRestoreKey) 132 #define RegSaveKey __MINGW_NAME_AW(RegSaveKey) 133 #define RegSetValue __MINGW_NAME_AW(RegSetValue) 134 #define RegSetValueEx __MINGW_NAME_AW(RegSetValueEx) 135 #define RegUnLoadKey __MINGW_NAME_AW(RegUnLoadKey) 136 #define RegGetValue __MINGW_NAME_AW(RegGetValue) 137 #define InitiateSystemShutdown __MINGW_NAME_AW(InitiateSystemShutdown) 138 #define AbortSystemShutdown __MINGW_NAME_AW(AbortSystemShutdown) 139 140 WINADVAPI LONG WINAPI RegCloseKey(HKEY hKey); 141 WINADVAPI LONG WINAPI RegOverridePredefKey(HKEY hKey,HKEY hNewHKey); 142 WINADVAPI LONG WINAPI RegOpenUserClassesRoot(HANDLE hToken,DWORD dwOptions,REGSAM samDesired,PHKEY phkResult); 143 WINADVAPI LONG WINAPI RegOpenCurrentUser(REGSAM samDesired,PHKEY phkResult); 144 WINADVAPI LONG WINAPI RegDisablePredefinedCache(); 145 WINADVAPI LONG WINAPI RegConnectRegistryA(LPCSTR lpMachineName,HKEY hKey,PHKEY phkResult); 146 WINADVAPI LONG WINAPI RegConnectRegistryW(LPCWSTR lpMachineName,HKEY hKey,PHKEY phkResult); 147 WINADVAPI LONG WINAPI RegConnectRegistryExA(LPCSTR lpMachineName,HKEY hKey,ULONG Flags,PHKEY phkResult); 148 WINADVAPI LONG WINAPI RegConnectRegistryExW(LPCWSTR lpMachineName,HKEY hKey,ULONG Flags,PHKEY phkResult); 149 WINADVAPI LONG WINAPI RegCreateKeyA(HKEY hKey,LPCSTR lpSubKey,PHKEY phkResult); 150 WINADVAPI LONG WINAPI RegCreateKeyW(HKEY hKey,LPCWSTR lpSubKey,PHKEY phkResult); 151 WINADVAPI LONG WINAPI RegCreateKeyExA(HKEY hKey,LPCSTR lpSubKey,DWORD Reserved,LPSTR lpClass,DWORD dwOptions,REGSAM samDesired,LPSECURITY_ATTRIBUTES lpSecurityAttributes,PHKEY phkResult,LPDWORD lpdwDisposition); 152 WINADVAPI LONG WINAPI RegCreateKeyExW(HKEY hKey,LPCWSTR lpSubKey,DWORD Reserved,LPWSTR lpClass,DWORD dwOptions,REGSAM samDesired,LPSECURITY_ATTRIBUTES lpSecurityAttributes,PHKEY phkResult,LPDWORD lpdwDisposition); 153 WINADVAPI LONG WINAPI RegDeleteKeyA(HKEY hKey,LPCSTR lpSubKey); 154 WINADVAPI LONG WINAPI RegDeleteKeyW(HKEY hKey,LPCWSTR lpSubKey); 155 WINADVAPI LONG WINAPI RegDeleteKeyExA(HKEY hKey,LPCSTR lpSubKey,REGSAM samDesired,DWORD Reserved); 156 WINADVAPI LONG WINAPI RegDeleteKeyExW(HKEY hKey,LPCWSTR lpSubKey,REGSAM samDesired,DWORD Reserved); 157 WINADVAPI LONG WINAPI RegDisableReflectionKey(HKEY hBase); 158 WINADVAPI LONG WINAPI RegEnableReflectionKey(HKEY hBase); 159 WINADVAPI LONG WINAPI RegQueryReflectionKey(HKEY hBase,WINBOOL *bIsReflectionDisabled); 160 WINADVAPI LONG WINAPI RegDeleteValueA(HKEY hKey,LPCSTR lpValueName); 161 WINADVAPI LONG WINAPI RegDeleteValueW(HKEY hKey,LPCWSTR lpValueName); 162 WINADVAPI LONG WINAPI RegEnumKeyA(HKEY hKey,DWORD dwIndex,LPSTR lpName,DWORD cchName); 163 WINADVAPI LONG WINAPI RegEnumKeyW(HKEY hKey,DWORD dwIndex,LPWSTR lpName,DWORD cchName); 164 WINADVAPI LONG WINAPI RegEnumKeyExA(HKEY hKey,DWORD dwIndex,LPSTR lpName,LPDWORD lpcchName,LPDWORD lpReserved,LPSTR lpClass,LPDWORD lpcchClass,PFILETIME lpftLastWriteTime); 165 WINADVAPI LONG WINAPI RegEnumKeyExW(HKEY hKey,DWORD dwIndex,LPWSTR lpName,LPDWORD lpcchName,LPDWORD lpReserved,LPWSTR lpClass,LPDWORD lpcchClass,PFILETIME lpftLastWriteTime); 166 WINADVAPI LONG WINAPI RegEnumValueA(HKEY hKey,DWORD dwIndex,LPSTR lpValueName,LPDWORD lpcchValueName,LPDWORD lpReserved,LPDWORD lpType,LPBYTE lpData,LPDWORD lpcbData); 167 WINADVAPI LONG WINAPI RegEnumValueW(HKEY hKey,DWORD dwIndex,LPWSTR lpValueName,LPDWORD lpcchValueName,LPDWORD lpReserved,LPDWORD lpType,LPBYTE lpData,LPDWORD lpcbData); 168 WINADVAPI LONG WINAPI RegFlushKey(HKEY hKey); 169 WINADVAPI LONG WINAPI RegGetKeySecurity(HKEY hKey,SECURITY_INFORMATION SecurityInformation,PSECURITY_DESCRIPTOR pSecurityDescriptor,LPDWORD lpcbSecurityDescriptor); 170 WINADVAPI LONG WINAPI RegLoadKeyA(HKEY hKey,LPCSTR lpSubKey,LPCSTR lpFile); 171 WINADVAPI LONG WINAPI RegLoadKeyW(HKEY hKey,LPCWSTR lpSubKey,LPCWSTR lpFile); 172 WINADVAPI LONG WINAPI RegNotifyChangeKeyValue(HKEY hKey,WINBOOL bWatchSubtree,DWORD dwNotifyFilter,HANDLE hEvent,WINBOOL fAsynchronous); 173 WINADVAPI LONG WINAPI RegOpenKeyA(HKEY hKey,LPCSTR lpSubKey,PHKEY phkResult); 174 WINADVAPI LONG WINAPI RegOpenKeyW(HKEY hKey,LPCWSTR lpSubKey,PHKEY phkResult); 175 WINADVAPI LONG WINAPI RegOpenKeyExA(HKEY hKey,LPCSTR lpSubKey,DWORD ulOptions,REGSAM samDesired,PHKEY phkResult); 176 WINADVAPI LONG WINAPI RegOpenKeyExW(HKEY hKey,LPCWSTR lpSubKey,DWORD ulOptions,REGSAM samDesired,PHKEY phkResult); 177 WINADVAPI LONG WINAPI RegQueryInfoKeyA(HKEY hKey,LPSTR lpClass,LPDWORD lpcchClass,LPDWORD lpReserved,LPDWORD lpcSubKeys,LPDWORD lpcbMaxSubKeyLen,LPDWORD lpcbMaxClassLen,LPDWORD lpcValues,LPDWORD lpcbMaxValueNameLen,LPDWORD lpcbMaxValueLen,LPDWORD lpcbSecurityDescriptor,PFILETIME lpftLastWriteTime); 178 WINADVAPI LONG WINAPI RegQueryInfoKeyW(HKEY hKey,LPWSTR lpClass,LPDWORD lpcchClass,LPDWORD lpReserved,LPDWORD lpcSubKeys,LPDWORD lpcbMaxSubKeyLen,LPDWORD lpcbMaxClassLen,LPDWORD lpcValues,LPDWORD lpcbMaxValueNameLen,LPDWORD lpcbMaxValueLen,LPDWORD lpcbSecurityDescriptor,PFILETIME lpftLastWriteTime); 179 WINADVAPI LONG WINAPI RegQueryValueA(HKEY hKey,LPCSTR lpSubKey,LPSTR lpData,PLONG lpcbData); 180 WINADVAPI LONG WINAPI RegQueryValueW(HKEY hKey,LPCWSTR lpSubKey,LPWSTR lpData,PLONG lpcbData); 181 WINADVAPI LONG WINAPI RegQueryMultipleValuesA(HKEY hKey,PVALENTA val_list,DWORD num_vals,LPSTR lpValueBuf,LPDWORD ldwTotsize); 182 WINADVAPI LONG WINAPI RegQueryMultipleValuesW(HKEY hKey,PVALENTW val_list,DWORD num_vals,LPWSTR lpValueBuf,LPDWORD ldwTotsize); 183 WINADVAPI LONG WINAPI RegQueryValueExA(HKEY hKey,LPCSTR lpValueName,LPDWORD lpReserved,LPDWORD lpType,LPBYTE lpData,LPDWORD lpcbData); 184 WINADVAPI LONG WINAPI RegQueryValueExW(HKEY hKey,LPCWSTR lpValueName,LPDWORD lpReserved,LPDWORD lpType,LPBYTE lpData,LPDWORD lpcbData); 185 WINADVAPI LONG WINAPI RegReplaceKeyA(HKEY hKey,LPCSTR lpSubKey,LPCSTR lpNewFile,LPCSTR lpOldFile); 186 WINADVAPI LONG WINAPI RegReplaceKeyW(HKEY hKey,LPCWSTR lpSubKey,LPCWSTR lpNewFile,LPCWSTR lpOldFile); 187 WINADVAPI LONG WINAPI RegRestoreKeyA(HKEY hKey,LPCSTR lpFile,DWORD dwFlags); 188 WINADVAPI LONG WINAPI RegRestoreKeyW(HKEY hKey,LPCWSTR lpFile,DWORD dwFlags); 189 WINADVAPI LONG WINAPI RegSaveKeyA(HKEY hKey,LPCSTR lpFile,LPSECURITY_ATTRIBUTES lpSecurityAttributes); 190 WINADVAPI LONG WINAPI RegSaveKeyW(HKEY hKey,LPCWSTR lpFile,LPSECURITY_ATTRIBUTES lpSecurityAttributes); 191 WINADVAPI LONG WINAPI RegSetKeySecurity(HKEY hKey,SECURITY_INFORMATION SecurityInformation,PSECURITY_DESCRIPTOR pSecurityDescriptor); 192 WINADVAPI LONG WINAPI RegSetValueA(HKEY hKey,LPCSTR lpSubKey,DWORD dwType,LPCSTR lpData,DWORD cbData); 193 WINADVAPI LONG WINAPI RegSetValueW(HKEY hKey,LPCWSTR lpSubKey,DWORD dwType,LPCWSTR lpData,DWORD cbData); 194 WINADVAPI LONG WINAPI RegSetValueExA(HKEY hKey,LPCSTR lpValueName,DWORD Reserved,DWORD dwType,CONST BYTE *lpData,DWORD cbData); 195 WINADVAPI LONG WINAPI RegSetValueExW(HKEY hKey,LPCWSTR lpValueName,DWORD Reserved,DWORD dwType,CONST BYTE *lpData,DWORD cbData); 196 WINADVAPI LONG WINAPI RegUnLoadKeyA(HKEY hKey,LPCSTR lpSubKey); 197 WINADVAPI LONG WINAPI RegUnLoadKeyW(HKEY hKey,LPCWSTR lpSubKey); 198 WINADVAPI LONG WINAPI RegGetValueA(HKEY hkey,LPCSTR lpSubKey,LPCSTR lpValue,DWORD dwFlags,LPDWORD pdwType,PVOID pvData,LPDWORD pcbData); 199 WINADVAPI LONG WINAPI RegGetValueW(HKEY hkey,LPCWSTR lpSubKey,LPCWSTR lpValue,DWORD dwFlags,LPDWORD pdwType,PVOID pvData,LPDWORD pcbData); 200 WINADVAPI WINBOOL WINAPI InitiateSystemShutdownA(LPSTR lpMachineName,LPSTR lpMessage,DWORD dwTimeout,WINBOOL bForceAppsClosed,WINBOOL bRebootAfterShutdown); 201 WINADVAPI WINBOOL WINAPI InitiateSystemShutdownW(LPWSTR lpMachineName,LPWSTR lpMessage,DWORD dwTimeout,WINBOOL bForceAppsClosed,WINBOOL bRebootAfterShutdown); 202 WINADVAPI WINBOOL WINAPI AbortSystemShutdownA(LPSTR lpMachineName); 203 WINADVAPI WINBOOL WINAPI AbortSystemShutdownW(LPWSTR lpMachineName); 204 205 #include <reason.h> 206 207 #define REASON_SWINSTALL SHTDN_REASON_MAJOR_SOFTWARE|SHTDN_REASON_MINOR_INSTALLATION 208 #define REASON_HWINSTALL SHTDN_REASON_MAJOR_HARDWARE|SHTDN_REASON_MINOR_INSTALLATION 209 #define REASON_SERVICEHANG SHTDN_REASON_MAJOR_SOFTWARE|SHTDN_REASON_MINOR_HUNG 210 #define REASON_UNSTABLE SHTDN_REASON_MAJOR_SYSTEM|SHTDN_REASON_MINOR_UNSTABLE 211 #define REASON_SWHWRECONF SHTDN_REASON_MAJOR_SOFTWARE|SHTDN_REASON_MINOR_RECONFIG 212 #define REASON_OTHER SHTDN_REASON_MAJOR_OTHER|SHTDN_REASON_MINOR_OTHER 213 #define REASON_UNKNOWN SHTDN_REASON_UNKNOWN 214 #define REASON_LEGACY_API SHTDN_REASON_LEGACY_API 215 #define REASON_PLANNED_FLAG SHTDN_REASON_FLAG_PLANNED 216 217 #define MAX_SHUTDOWN_TIMEOUT (10*365*24*60*60) 218 219 #define InitiateSystemShutdownEx __MINGW_NAME_AW(InitiateSystemShutdownEx) 220 #define RegSaveKeyEx __MINGW_NAME_AW(RegSaveKeyEx) 221 222 WINADVAPI WINBOOL WINAPI InitiateSystemShutdownExA(LPSTR lpMachineName,LPSTR lpMessage,DWORD dwTimeout,WINBOOL bForceAppsClosed,WINBOOL bRebootAfterShutdown,DWORD dwReason); 223 WINADVAPI WINBOOL WINAPI InitiateSystemShutdownExW(LPWSTR lpMachineName,LPWSTR lpMessage,DWORD dwTimeout,WINBOOL bForceAppsClosed,WINBOOL bRebootAfterShutdown,DWORD dwReason); 224 WINADVAPI LONG WINAPI RegSaveKeyExA(HKEY hKey,LPCSTR lpFile,LPSECURITY_ATTRIBUTES lpSecurityAttributes,DWORD Flags); 225 WINADVAPI LONG WINAPI RegSaveKeyExW(HKEY hKey,LPCWSTR lpFile,LPSECURITY_ATTRIBUTES lpSecurityAttributes,DWORD Flags); 226 WINADVAPI LONG WINAPI Wow64Win32ApiEntry (DWORD dwFuncNumber,DWORD dwFlag,DWORD dwRes); 227 228 #if (_WIN32_WINNT >= 0x0600) 229 230 #define RegCopyTree __MINGW_NAME_AW(RegCopyTree) 231 WINADVAPI LONG WINAPI RegCopyTreeA( 232 HKEY hKeySrc, 233 LPCSTR lpSubKey, 234 HKEY hKeyDest 235 ); 236 237 WINADVAPI LONG WINAPI RegCopyTreeW( 238 HKEY hKeySrc, 239 LPCWSTR lpSubKey, 240 HKEY hKeyDest 241 ); 242 243 #define RegCreateKeyTransacted __MINGW_NAME_AW(RegCreateKeyTransacted) 244 WINADVAPI LONG WINAPI RegCreateKeyTransactedA( 245 HKEY hKey, 246 LPCSTR lpSubKey, 247 DWORD Reserved, 248 LPSTR lpClass, 249 DWORD dwOptions, 250 REGSAM samDesired, 251 const LPSECURITY_ATTRIBUTES lpSecurityAttributes, 252 PHKEY phkResult, 253 LPDWORD lpdwDisposition, 254 HANDLE hTransaction, 255 PVOID pExtendedParemeter 256 ); 257 258 WINADVAPI LONG WINAPI RegCreateKeyTransactedW( 259 HKEY hKey, 260 LPCWSTR lpSubKey, 261 DWORD Reserved, 262 LPWSTR lpClass, 263 DWORD dwOptions, 264 REGSAM samDesired, 265 const LPSECURITY_ATTRIBUTES lpSecurityAttributes, 266 PHKEY phkResult, 267 LPDWORD lpdwDisposition, 268 HANDLE hTransaction, 269 PVOID pExtendedParemeter 270 ); 271 272 #define RegDeleteKeyTransacted __MINGW_NAME_AW(RegDeleteKeyTransacted) 273 WINADVAPI LONG WINAPI RegDeleteKeyTransactedA( 274 HKEY hKey, 275 LPCSTR lpSubKey, 276 REGSAM samDesired, 277 DWORD Reserved, 278 HANDLE hTransaction, 279 PVOID pExtendedParameter 280 ); 281 282 WINADVAPI LONG WINAPI RegDeleteKeyTransactedW( 283 HKEY hKey, 284 LPCWSTR lpSubKey, 285 REGSAM samDesired, 286 DWORD Reserved, 287 HANDLE hTransaction, 288 PVOID pExtendedParameter 289 ); 290 291 #define RegDeleteKeyValue __MINGW_NAME_AW(RegDeleteKeyValue) 292 WINADVAPI LONG WINAPI RegDeleteKeyValueA( 293 HKEY hKey, 294 LPCSTR lpSubKey, 295 LPCSTR lpValueName 296 ); 297 298 WINADVAPI LONG WINAPI RegDeleteKeyValueW( 299 HKEY hKey, 300 LPCWSTR lpSubKey, 301 LPCWSTR lpValueName 302 ); 303 304 #define RegDeleteTree __MINGW_NAME_AW(RegDeleteTree) 305 WINADVAPI LONG WINAPI RegDeleteTreeA( 306 HKEY hKey, 307 LPCSTR lpSubKey 308 ); 309 310 WINADVAPI LONG WINAPI RegDeleteTreeW( 311 HKEY hKey, 312 LPCWSTR lpSubKey 313 ); 314 315 WINADVAPI LONG WINAPI RegDisablePredefinedCacheEx(void); 316 317 WINADVAPI LONG WINAPI RegLoadAppKeyA( 318 LPCSTR lpFile, 319 PHKEY phkResult, 320 REGSAM samDesired, 321 DWORD dwOptions, 322 DWORD Reserved 323 ); 324 325 WINADVAPI LONG WINAPI RegLoadAppKeyW( 326 LPCWSTR lpFile, 327 PHKEY phkResult, 328 REGSAM samDesired, 329 DWORD dwOptions, 330 DWORD Reserved 331 ); 332 333 #define RegLoadAppKey __MINGW_NAME_AW(RegLoadAppKey) 334 335 WINADVAPI LONG WINAPI RegLoadMUIStringA(HKEY hKey, LPCSTR pszValue, LPSTR pszOutBuf, DWORD cbOutBuf, LPDWORD pcbData, DWORD Flags, LPCSTR pszDirectory); 336 WINADVAPI LONG WINAPI RegLoadMUIStringW(HKEY hKey, LPCWSTR pszValue, LPWSTR pszOutBuf, DWORD cbOutBuf, LPDWORD pcbData, DWORD Flags, LPCWSTR pszDirectory); 337 338 #define RegLoadMUIString __MINGW_NAME_AW(RegLoadMUIString) 339 340 WINADVAPI LONG WINAPI RegOpenKeyTransactedA( 341 HKEY hKey, 342 LPCSTR lpSubKey, 343 DWORD ulOptions, 344 REGSAM samDesired, 345 PHKEY phkResult, 346 HANDLE hTransaction, 347 PVOID pExtendedParameter 348 ); 349 350 WINADVAPI LONG WINAPI RegOpenKeyTransactedW( 351 HKEY hKey, 352 LPCWSTR lpSubKey, 353 DWORD ulOptions, 354 REGSAM samDesired, 355 PHKEY phkResult, 356 HANDLE hTransaction, 357 PVOID pExtendedParameter 358 ); 359 360 #define RegOpenKeyTransacted __MINGW_NAME_AW(RegOpenKeyTransacted) 361 362 WINADVAPI LONG WINAPI RegSetKeyValueA( 363 HKEY hKey, 364 LPCSTR lpSubKey, 365 LPCSTR lpValueName, 366 DWORD dwType, 367 LPCVOID lpData, 368 DWORD cbData 369 ); 370 371 WINADVAPI LONG WINAPI RegSetKeyValueW( 372 HKEY hKey, 373 LPCSTR lpSubKey, 374 LPCSTR lpValueName, 375 DWORD dwType, 376 LPCVOID lpData, 377 DWORD cbData 378 ); 379 #define RegSetKeyValue __MINGW_NAME_AW(RegSetKeyValue) 380 381 #endif /* (_WIN32_WINNT >= 0x0600) */ 382 383 #ifdef __cplusplus 384 } 385 #endif 386 #endif 387