1996-03-31 18:40:13 +02:00
|
|
|
/*
|
2002-03-10 00:29:33 +01:00
|
|
|
* Win32 registry defines (see also winnt.h)
|
|
|
|
*
|
|
|
|
* Copyright (C) the Wine project
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
2006-05-18 14:49:52 +02:00
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
1996-03-31 18:40:13 +02:00
|
|
|
*/
|
2002-03-10 00:29:33 +01:00
|
|
|
|
1996-03-31 18:40:13 +02:00
|
|
|
#ifndef __WINE_WINREG_H
|
|
|
|
#define __WINE_WINREG_H
|
|
|
|
|
1999-06-12 12:53:06 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif /* defined(__cplusplus) */
|
|
|
|
|
2009-04-09 18:30:07 +02:00
|
|
|
#define HKEY_CLASSES_ROOT ((HKEY)(LONG_PTR)(LONG)0x80000000)
|
|
|
|
#define HKEY_CURRENT_USER ((HKEY)(LONG_PTR)(LONG)0x80000001)
|
|
|
|
#define HKEY_LOCAL_MACHINE ((HKEY)(LONG_PTR)(LONG)0x80000002)
|
|
|
|
#define HKEY_USERS ((HKEY)(LONG_PTR)(LONG)0x80000003)
|
|
|
|
#define HKEY_PERFORMANCE_DATA ((HKEY)(LONG_PTR)(LONG)0x80000004)
|
|
|
|
#define HKEY_CURRENT_CONFIG ((HKEY)(LONG_PTR)(LONG)0x80000005)
|
|
|
|
#define HKEY_DYN_DATA ((HKEY)(LONG_PTR)(LONG)0x80000006)
|
2018-07-11 06:15:58 +02:00
|
|
|
#define HKEY_PERFORMANCE_TEXT ((HKEY)(LONG_PTR)(LONG)0x80000050)
|
|
|
|
#define HKEY_PERFORMANCE_NLSTEXT ((HKEY)(LONG_PTR)(LONG)0x80000060)
|
1996-03-31 18:40:13 +02:00
|
|
|
|
1999-02-12 14:44:38 +01:00
|
|
|
/*
|
|
|
|
* registry provider structs
|
|
|
|
*/
|
2002-06-01 01:06:46 +02:00
|
|
|
typedef struct value_entA
|
1999-02-12 14:44:38 +01:00
|
|
|
{ LPSTR ve_valuename;
|
|
|
|
DWORD ve_valuelen;
|
|
|
|
DWORD_PTR ve_valueptr;
|
|
|
|
DWORD ve_type;
|
|
|
|
} VALENTA, *PVALENTA;
|
|
|
|
|
|
|
|
typedef struct value_entW {
|
|
|
|
LPWSTR ve_valuename;
|
|
|
|
DWORD ve_valuelen;
|
|
|
|
DWORD_PTR ve_valueptr;
|
|
|
|
DWORD ve_type;
|
|
|
|
} VALENTW, *PVALENTW;
|
|
|
|
|
1999-07-04 13:01:21 +02:00
|
|
|
typedef ACCESS_MASK REGSAM;
|
2007-09-18 00:40:48 +02:00
|
|
|
typedef LONG LSTATUS;
|
1999-02-12 14:44:38 +01:00
|
|
|
|
2004-10-08 22:50:06 +02:00
|
|
|
/*
|
|
|
|
* InitiateSystemShutdown() reasons
|
|
|
|
*/
|
|
|
|
#include <reason.h>
|
|
|
|
|
|
|
|
#define REASON_OTHER (SHTDN_REASON_MAJOR_OTHER | SHTDN_REASON_MINOR_OTHER)
|
|
|
|
#define REASON_UNKNOWN SHTDN_REASON_UNKNOWN
|
|
|
|
#define REASON_LEGACY_API SHTDN_REASON_LEGACY_API
|
|
|
|
#define REASON_PLANNED_FLAG SHTDN_REASON_FLAG_PLANNED
|
|
|
|
|
|
|
|
#define MAX_SHUTDOWN_TIMEOUT (10*365*24*60*60)
|
|
|
|
|
2005-07-03 13:19:03 +02:00
|
|
|
/*
|
|
|
|
* RegGetValue() restrictions
|
|
|
|
*/
|
|
|
|
|
|
|
|
#define RRF_RT_REG_NONE (1 << 0)
|
|
|
|
#define RRF_RT_REG_SZ (1 << 1)
|
|
|
|
#define RRF_RT_REG_EXPAND_SZ (1 << 2)
|
|
|
|
#define RRF_RT_REG_BINARY (1 << 3)
|
|
|
|
#define RRF_RT_REG_DWORD (1 << 4)
|
|
|
|
#define RRF_RT_REG_MULTI_SZ (1 << 5)
|
|
|
|
#define RRF_RT_REG_QWORD (1 << 6)
|
|
|
|
#define RRF_RT_DWORD (RRF_RT_REG_BINARY | RRF_RT_REG_DWORD)
|
|
|
|
#define RRF_RT_QWORD (RRF_RT_REG_BINARY | RRF_RT_REG_QWORD)
|
2007-08-08 10:40:35 +02:00
|
|
|
#define RRF_RT_ANY 0xffff
|
2020-03-21 16:21:29 +01:00
|
|
|
#define RRF_SUBKEY_WOW6464KEY (1 << 16)
|
|
|
|
#define RRF_SUBKEY_WOW6432KEY (1 << 17)
|
|
|
|
#define RRF_WOW64_MASK (RRF_SUBKEY_WOW6432KEY | RRF_SUBKEY_WOW6464KEY)
|
2005-07-03 13:19:03 +02:00
|
|
|
#define RRF_NOEXPAND (1 << 28)
|
|
|
|
#define RRF_ZEROONFAILURE (1 << 29)
|
2004-10-08 22:50:06 +02:00
|
|
|
|
2019-03-07 17:19:43 +01:00
|
|
|
#define REG_PROCESS_APPKEY 0x00000001
|
|
|
|
|
|
|
|
#define REG_MUI_STRING_TRUNCATE 0x00000001
|
|
|
|
|
2007-11-07 12:27:27 +01:00
|
|
|
WINADVAPI BOOL WINAPI AbortSystemShutdownA(LPSTR);
|
|
|
|
WINADVAPI BOOL WINAPI AbortSystemShutdownW(LPWSTR);
|
|
|
|
#define AbortSystemShutdown WINELIB_NAME_AW(AbortSystemShutdown)
|
2019-05-06 19:46:29 +02:00
|
|
|
WINADVAPI DWORD WINAPI InitiateShutdownA(char*,char*,DWORD,DWORD,DWORD);
|
|
|
|
WINADVAPI DWORD WINAPI InitiateShutdownW(WCHAR*,WCHAR*,DWORD,DWORD,DWORD);
|
|
|
|
#define InitiateShutdown WINELIB_NAME_AW(InitiateShutdown)
|
2007-11-07 12:27:27 +01:00
|
|
|
WINADVAPI BOOL WINAPI InitiateSystemShutdownA(LPSTR,LPSTR,DWORD,BOOL,BOOL);
|
|
|
|
WINADVAPI BOOL WINAPI InitiateSystemShutdownW(LPWSTR,LPWSTR,DWORD,BOOL,BOOL);
|
2014-03-02 03:12:27 +01:00
|
|
|
#define InitiateSystemShutdown WINELIB_NAME_AW(InitiateSystemShutdown)
|
2007-11-07 12:27:27 +01:00
|
|
|
WINADVAPI BOOL WINAPI InitiateSystemShutdownExA(LPSTR,LPSTR,DWORD,BOOL,BOOL,DWORD);
|
|
|
|
WINADVAPI BOOL WINAPI InitiateSystemShutdownExW(LPWSTR,LPWSTR,DWORD,BOOL,BOOL,DWORD);
|
2014-03-02 03:12:27 +01:00
|
|
|
#define InitiateSystemShutdownEx WINELIB_NAME_AW(InitiateSystemShutdownEx)
|
2007-11-07 12:27:27 +01:00
|
|
|
WINADVAPI LSTATUS WINAPI RegCloseKey(HKEY);
|
|
|
|
WINADVAPI LSTATUS WINAPI RegConnectRegistryA(LPCSTR,HKEY,PHKEY);
|
|
|
|
WINADVAPI LSTATUS WINAPI RegConnectRegistryW(LPCWSTR,HKEY,PHKEY);
|
|
|
|
#define RegConnectRegistry WINELIB_NAME_AW(RegConnectRegistry)
|
2019-06-25 12:34:15 +02:00
|
|
|
WINADVAPI LSTATUS WINAPI RegCopyTreeA(HKEY,const char*,HKEY);
|
|
|
|
WINADVAPI LSTATUS WINAPI RegCopyTreeW(HKEY,const WCHAR*,HKEY);
|
|
|
|
#define RegCopyTree WINELIB_NAME_AW(RegCopyTree)
|
2007-11-07 12:27:27 +01:00
|
|
|
WINADVAPI LSTATUS WINAPI RegCreateKeyA(HKEY,LPCSTR,PHKEY);
|
|
|
|
WINADVAPI LSTATUS WINAPI RegCreateKeyW(HKEY,LPCWSTR,PHKEY);
|
|
|
|
#define RegCreateKey WINELIB_NAME_AW(RegCreateKey)
|
|
|
|
WINADVAPI LSTATUS WINAPI RegCreateKeyExA(HKEY,LPCSTR,DWORD,LPSTR,DWORD,REGSAM,LPSECURITY_ATTRIBUTES,PHKEY,LPDWORD);
|
|
|
|
WINADVAPI LSTATUS WINAPI RegCreateKeyExW(HKEY,LPCWSTR,DWORD,LPWSTR,DWORD,REGSAM,LPSECURITY_ATTRIBUTES,PHKEY,LPDWORD);
|
|
|
|
#define RegCreateKeyEx WINELIB_NAME_AW(RegCreateKeyEx)
|
|
|
|
WINADVAPI LSTATUS WINAPI RegDeleteKeyA(HKEY,LPCSTR);
|
|
|
|
WINADVAPI LSTATUS WINAPI RegDeleteKeyW(HKEY,LPCWSTR);
|
|
|
|
#define RegDeleteKey WINELIB_NAME_AW(RegDeleteKey)
|
2010-02-18 13:12:31 +01:00
|
|
|
WINADVAPI LSTATUS WINAPI RegDeleteKeyExA(HKEY,LPCSTR,REGSAM,DWORD);
|
|
|
|
WINADVAPI LSTATUS WINAPI RegDeleteKeyExW(HKEY,LPCWSTR,REGSAM,DWORD);
|
|
|
|
#define RegDeleteKeyEx WINELIB_NAME_AW(RegDeleteKeyEx)
|
2007-11-07 12:27:27 +01:00
|
|
|
WINADVAPI LSTATUS WINAPI RegDeleteKeyValueA(HKEY,LPCSTR,LPCSTR);
|
|
|
|
WINADVAPI LSTATUS WINAPI RegDeleteKeyValueW(HKEY,LPCWSTR,LPCWSTR);
|
|
|
|
#define RegDeleteKeyValue WINELIB_NAME_AW(RegDeleteKeyValue)
|
|
|
|
WINADVAPI LSTATUS WINAPI RegDeleteTreeA(HKEY,LPCSTR);
|
|
|
|
WINADVAPI LSTATUS WINAPI RegDeleteTreeW(HKEY,LPCWSTR);
|
|
|
|
#define RegDeleteTree WINELIB_NAME_AW(RegDeleteTree)
|
|
|
|
WINADVAPI LSTATUS WINAPI RegDeleteValueA(HKEY,LPCSTR);
|
|
|
|
WINADVAPI LSTATUS WINAPI RegDeleteValueW(HKEY,LPCWSTR);
|
|
|
|
#define RegDeleteValue WINELIB_NAME_AW(RegDeleteValue)
|
|
|
|
WINADVAPI LSTATUS WINAPI RegDisablePredefinedCache(void);
|
|
|
|
WINADVAPI LSTATUS WINAPI RegEnumKeyA(HKEY,DWORD,LPSTR,DWORD);
|
|
|
|
WINADVAPI LSTATUS WINAPI RegEnumKeyW(HKEY,DWORD,LPWSTR,DWORD);
|
|
|
|
#define RegEnumKey WINELIB_NAME_AW(RegEnumKey)
|
|
|
|
WINADVAPI LSTATUS WINAPI RegEnumKeyExA(HKEY,DWORD,LPSTR,LPDWORD,LPDWORD,LPSTR,LPDWORD,LPFILETIME);
|
|
|
|
WINADVAPI LSTATUS WINAPI RegEnumKeyExW(HKEY,DWORD,LPWSTR,LPDWORD,LPDWORD,LPWSTR,LPDWORD,LPFILETIME);
|
|
|
|
#define RegEnumKeyEx WINELIB_NAME_AW(RegEnumKeyEx)
|
|
|
|
WINADVAPI LSTATUS WINAPI RegEnumValueA(HKEY,DWORD,LPSTR,LPDWORD,LPDWORD,LPDWORD,LPBYTE,LPDWORD);
|
|
|
|
WINADVAPI LSTATUS WINAPI RegEnumValueW(HKEY,DWORD,LPWSTR,LPDWORD,LPDWORD,LPDWORD,LPBYTE,LPDWORD);
|
|
|
|
#define RegEnumValue WINELIB_NAME_AW(RegEnumValue)
|
|
|
|
WINADVAPI LSTATUS WINAPI RegFlushKey(HKEY);
|
|
|
|
WINADVAPI LSTATUS WINAPI RegGetKeySecurity(HKEY,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR,LPDWORD);
|
|
|
|
WINADVAPI LSTATUS WINAPI RegGetValueA(HKEY,LPCSTR,LPCSTR,DWORD,LPDWORD,PVOID,LPDWORD);
|
|
|
|
WINADVAPI LSTATUS WINAPI RegGetValueW(HKEY,LPCWSTR,LPCWSTR,DWORD,LPDWORD,PVOID,LPDWORD);
|
|
|
|
#define RegGetValue WINELIB_NAME_AW(RegGetValue)
|
2019-03-07 17:19:43 +01:00
|
|
|
WINADVAPI LSTATUS WINAPI RegLoadAppKeyA(const char*,HKEY*,REGSAM,DWORD,DWORD);
|
|
|
|
WINADVAPI LSTATUS WINAPI RegLoadAppKeyW(const WCHAR*,HKEY*,REGSAM,DWORD,DWORD);
|
|
|
|
#define RegLoadAppKey WINELIB_NAME_AW(RegLoadAppKey)
|
2007-11-07 12:27:27 +01:00
|
|
|
WINADVAPI LSTATUS WINAPI RegLoadKeyA(HKEY,LPCSTR,LPCSTR);
|
|
|
|
WINADVAPI LSTATUS WINAPI RegLoadKeyW(HKEY,LPCWSTR,LPCWSTR);
|
|
|
|
#define RegLoadKey WINELIB_NAME_AW(RegLoadKey)
|
|
|
|
WINADVAPI LSTATUS WINAPI RegLoadMUIStringA(HKEY,LPCSTR,LPSTR,DWORD,LPDWORD,DWORD,LPCSTR);
|
|
|
|
WINADVAPI LSTATUS WINAPI RegLoadMUIStringW(HKEY,LPCWSTR,LPWSTR,DWORD,LPDWORD,DWORD,LPCWSTR);
|
|
|
|
#define RegLoadMUIString WINELIB_NAME_AW(RegLoadMUIString)
|
|
|
|
WINADVAPI LSTATUS WINAPI RegNotifyChangeKeyValue(HKEY,BOOL,DWORD,HANDLE,BOOL);
|
|
|
|
WINADVAPI LSTATUS WINAPI RegOpenCurrentUser(REGSAM,PHKEY);
|
|
|
|
WINADVAPI LSTATUS WINAPI RegOpenKeyA(HKEY,LPCSTR,PHKEY);
|
|
|
|
WINADVAPI LSTATUS WINAPI RegOpenKeyW(HKEY,LPCWSTR,PHKEY);
|
|
|
|
#define RegOpenKey WINELIB_NAME_AW(RegOpenKey)
|
|
|
|
WINADVAPI LSTATUS WINAPI RegOpenKeyExW(HKEY,LPCWSTR,DWORD,REGSAM,PHKEY);
|
|
|
|
WINADVAPI LSTATUS WINAPI RegOpenKeyExA(HKEY,LPCSTR,DWORD,REGSAM,PHKEY);
|
|
|
|
#define RegOpenKeyEx WINELIB_NAME_AW(RegOpenKeyEx)
|
|
|
|
WINADVAPI LSTATUS WINAPI RegOpenUserClassesRoot(HANDLE,DWORD,REGSAM,PHKEY);
|
2008-03-11 19:48:57 +01:00
|
|
|
WINADVAPI LSTATUS WINAPI RegOverridePredefKey(HKEY,HKEY);
|
2007-11-07 12:27:27 +01:00
|
|
|
WINADVAPI LSTATUS WINAPI RegQueryInfoKeyW(HKEY,LPWSTR,LPDWORD,LPDWORD,LPDWORD,LPDWORD,LPDWORD,LPDWORD,LPDWORD,LPDWORD,LPDWORD,LPFILETIME);
|
|
|
|
WINADVAPI LSTATUS WINAPI RegQueryInfoKeyA(HKEY,LPSTR,LPDWORD,LPDWORD,LPDWORD,LPDWORD,LPDWORD,LPDWORD,LPDWORD,LPDWORD,LPDWORD,LPFILETIME);
|
|
|
|
#define RegQueryInfoKey WINELIB_NAME_AW(RegQueryInfoKey)
|
|
|
|
WINADVAPI LSTATUS WINAPI RegQueryMultipleValuesA(HKEY,PVALENTA,DWORD,LPSTR,LPDWORD);
|
|
|
|
WINADVAPI LSTATUS WINAPI RegQueryMultipleValuesW(HKEY,PVALENTW,DWORD,LPWSTR,LPDWORD);
|
|
|
|
#define RegQueryMultipleValues WINELIB_NAME_AW(RegQueryMultipleValues)
|
2018-10-28 22:39:38 +01:00
|
|
|
WINADVAPI LONG WINAPI RegQueryReflectionKey(HKEY,BOOL*);
|
2007-11-07 12:27:27 +01:00
|
|
|
WINADVAPI LSTATUS WINAPI RegQueryValueA(HKEY,LPCSTR,LPSTR,LPLONG);
|
|
|
|
WINADVAPI LSTATUS WINAPI RegQueryValueW(HKEY,LPCWSTR,LPWSTR,LPLONG);
|
|
|
|
#define RegQueryValue WINELIB_NAME_AW(RegQueryValue)
|
|
|
|
WINADVAPI LSTATUS WINAPI RegQueryValueExA(HKEY,LPCSTR,LPDWORD,LPDWORD,LPBYTE,LPDWORD);
|
|
|
|
WINADVAPI LSTATUS WINAPI RegQueryValueExW(HKEY,LPCWSTR,LPDWORD,LPDWORD,LPBYTE,LPDWORD);
|
|
|
|
#define RegQueryValueEx WINELIB_NAME_AW(RegQueryValueEx)
|
|
|
|
WINADVAPI LSTATUS WINAPI RegReplaceKeyA(HKEY,LPCSTR,LPCSTR,LPCSTR);
|
|
|
|
WINADVAPI LSTATUS WINAPI RegReplaceKeyW(HKEY,LPCWSTR,LPCWSTR,LPCWSTR);
|
|
|
|
#define RegReplaceKey WINELIB_NAME_AW(RegReplaceKey)
|
|
|
|
WINADVAPI LSTATUS WINAPI RegRestoreKeyA(HKEY,LPCSTR,DWORD);
|
|
|
|
WINADVAPI LSTATUS WINAPI RegRestoreKeyW(HKEY,LPCWSTR,DWORD);
|
|
|
|
#define RegRestoreKey WINELIB_NAME_AW(RegRestoreKey)
|
|
|
|
WINADVAPI LSTATUS WINAPI RegSaveKeyA(HKEY,LPCSTR,LPSECURITY_ATTRIBUTES);
|
|
|
|
WINADVAPI LSTATUS WINAPI RegSaveKeyW(HKEY,LPCWSTR,LPSECURITY_ATTRIBUTES);
|
|
|
|
#define RegSaveKey WINELIB_NAME_AW(RegSaveKey)
|
2017-04-13 18:00:22 +02:00
|
|
|
WINADVAPI LSTATUS WINAPI RegSaveKeyExA(HKEY,LPCSTR,LPSECURITY_ATTRIBUTES,DWORD);
|
|
|
|
WINADVAPI LSTATUS WINAPI RegSaveKeyExW(HKEY,LPCWSTR,LPSECURITY_ATTRIBUTES,DWORD);
|
|
|
|
#define RegSaveKeyEx WINELIB_NAME_AW(RegSaveKeyEx)
|
2007-11-07 12:27:27 +01:00
|
|
|
WINADVAPI LSTATUS WINAPI RegSetKeySecurity(HKEY,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR);
|
2014-07-02 19:23:27 +02:00
|
|
|
WINADVAPI LSTATUS WINAPI RegSetKeyValueA(HKEY,LPCSTR,LPCSTR,DWORD,const void*,DWORD);
|
|
|
|
WINADVAPI LSTATUS WINAPI RegSetKeyValueW(HKEY,LPCWSTR,LPCWSTR,DWORD,const void*,DWORD);
|
2007-11-07 12:27:27 +01:00
|
|
|
WINADVAPI LSTATUS WINAPI RegSetValueA(HKEY,LPCSTR,DWORD,LPCSTR,DWORD);
|
|
|
|
WINADVAPI LSTATUS WINAPI RegSetValueW(HKEY,LPCWSTR,DWORD,LPCWSTR,DWORD);
|
|
|
|
#define RegSetValue WINELIB_NAME_AW(RegSetValue)
|
2013-09-27 00:30:19 +02:00
|
|
|
WINADVAPI LSTATUS WINAPI RegSetValueExA(HKEY,LPCSTR,DWORD,DWORD,const BYTE*,DWORD);
|
|
|
|
WINADVAPI LSTATUS WINAPI RegSetValueExW(HKEY,LPCWSTR,DWORD,DWORD,const BYTE*,DWORD);
|
2007-11-07 12:27:27 +01:00
|
|
|
#define RegSetValueEx WINELIB_NAME_AW(RegSetValueEx)
|
|
|
|
WINADVAPI LSTATUS WINAPI RegUnLoadKeyA(HKEY,LPCSTR);
|
|
|
|
WINADVAPI LSTATUS WINAPI RegUnLoadKeyW(HKEY,LPCWSTR);
|
|
|
|
#define RegUnLoadKey WINELIB_NAME_AW(RegUnLoadKey)
|
1999-02-09 16:46:25 +01:00
|
|
|
|
1999-06-12 12:53:06 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
} /* extern "C" */
|
|
|
|
#endif /* defined(__cplusplus) */
|
|
|
|
|
1996-03-31 18:40:13 +02:00
|
|
|
#endif /* __WINE_WINREG_H */
|