2 * Win32 registry defines (see also winnt.h)
4 * Copyright (C) the Wine project
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 #ifndef __WINE_WINREG_H
22 #define __WINE_WINREG_H
26 #endif /* defined(__cplusplus) */
28 #define HKEY_CLASSES_ROOT ((HKEY) 0x80000000)
29 #define HKEY_CURRENT_USER ((HKEY) 0x80000001)
30 #define HKEY_LOCAL_MACHINE ((HKEY) 0x80000002)
31 #define HKEY_USERS ((HKEY) 0x80000003)
32 #define HKEY_PERFORMANCE_DATA ((HKEY) 0x80000004)
33 #define HKEY_CURRENT_CONFIG ((HKEY) 0x80000005)
34 #define HKEY_DYN_DATA ((HKEY) 0x80000006)
37 * registry provider structs
39 typedef struct value_entA
42 DWORD_PTR ve_valueptr
;
46 typedef struct value_entW
{
49 DWORD_PTR ve_valueptr
;
53 typedef ACCESS_MASK REGSAM
;
56 * InitiateSystemShutdown() reasons
60 #define REASON_OTHER (SHTDN_REASON_MAJOR_OTHER | SHTDN_REASON_MINOR_OTHER)
61 #define REASON_UNKNOWN SHTDN_REASON_UNKNOWN
62 #define REASON_LEGACY_API SHTDN_REASON_LEGACY_API
63 #define REASON_PLANNED_FLAG SHTDN_REASON_FLAG_PLANNED
65 #define MAX_SHUTDOWN_TIMEOUT (10*365*24*60*60)
68 * RegGetValue() restrictions
71 #define RRF_RT_REG_NONE (1 << 0)
72 #define RRF_RT_REG_SZ (1 << 1)
73 #define RRF_RT_REG_EXPAND_SZ (1 << 2)
74 #define RRF_RT_REG_BINARY (1 << 3)
75 #define RRF_RT_REG_DWORD (1 << 4)
76 #define RRF_RT_REG_MULTI_SZ (1 << 5)
77 #define RRF_RT_REG_QWORD (1 << 6)
78 #define RRF_RT_DWORD (RRF_RT_REG_BINARY | RRF_RT_REG_DWORD)
79 #define RRF_RT_QWORD (RRF_RT_REG_BINARY | RRF_RT_REG_QWORD)
80 #define RRF_NOEXPAND (1 << 28)
81 #define RRF_ZEROONFAILURE (1 << 29)
83 BOOL WINAPI
AbortSystemShutdownA(LPSTR
);
84 BOOL WINAPI
AbortSystemShutdownW(LPWSTR
);
85 #define AbortSystemShutdown WINELIB_NAME_AW(AbortSystemShutdown)
86 BOOL WINAPI
InitiateSystemShutdownA(LPSTR
,LPSTR
,DWORD
,BOOL
,BOOL
);
87 BOOL WINAPI
InitiateSystemShutdownW(LPWSTR
,LPWSTR
,DWORD
,BOOL
,BOOL
);
88 #define InitiateSystemShutdown WINELIB_NAME_AW(InitiateSystemShutdown);
89 BOOL WINAPI
InitiateSystemShutdownExA(LPSTR
,LPSTR
,DWORD
,BOOL
,BOOL
,DWORD
);
90 BOOL WINAPI
InitiateSystemShutdownExW(LPWSTR
,LPWSTR
,DWORD
,BOOL
,BOOL
,DWORD
);
91 #define InitiateSystemShutdownEx WINELIB_NAME_AW(InitiateSystemShutdownEx);
92 LONG WINAPI
RegCreateKeyExA(HKEY
,LPCSTR
,DWORD
,LPSTR
,DWORD
,REGSAM
,
93 LPSECURITY_ATTRIBUTES
,PHKEY
,LPDWORD
);
94 LONG WINAPI
RegCreateKeyExW(HKEY
,LPCWSTR
,DWORD
,LPWSTR
,DWORD
,REGSAM
,
95 LPSECURITY_ATTRIBUTES
,PHKEY
,LPDWORD
);
96 #define RegCreateKeyEx WINELIB_NAME_AW(RegCreateKeyEx)
97 LONG WINAPI
RegSaveKeyA(HKEY
,LPCSTR
,LPSECURITY_ATTRIBUTES
);
98 LONG WINAPI
RegSaveKeyW(HKEY
,LPCWSTR
,LPSECURITY_ATTRIBUTES
);
99 #define RegSaveKey WINELIB_NAME_AW(RegSaveKey)
100 LONG WINAPI
RegSetKeySecurity(HKEY
,SECURITY_INFORMATION
,PSECURITY_DESCRIPTOR
);
101 LONG WINAPI
RegConnectRegistryA(LPCSTR
,HKEY
,PHKEY
);
102 LONG WINAPI
RegConnectRegistryW(LPCWSTR
,HKEY
,PHKEY
);
103 #define RegConnectRegistry WINELIB_NAME_AW(RegConnectRegistry)
104 LONG WINAPI
RegEnumKeyExA(HKEY
,DWORD
,LPSTR
,LPDWORD
,LPDWORD
,LPSTR
,
106 LONG WINAPI
RegEnumKeyExW(HKEY
,DWORD
,LPWSTR
,LPDWORD
,LPDWORD
,LPWSTR
,
108 #define RegEnumKeyEx WINELIB_NAME_AW(RegEnumKeyEx)
109 LONG WINAPI
RegGetKeySecurity(HKEY
,SECURITY_INFORMATION
,PSECURITY_DESCRIPTOR
,LPDWORD
);
110 LONG WINAPI
RegGetValueA(HKEY
,LPCSTR
,LPCSTR
,DWORD
,LPDWORD
,PVOID
,LPDWORD
);
111 LONG WINAPI
RegGetValueW(HKEY
,LPCWSTR
,LPCWSTR
,DWORD
,LPDWORD
,PVOID
,LPDWORD
);
112 #define RegGetValue WINELIB_NAME_AW(RegGetValue)
113 LONG WINAPI
RegLoadKeyA(HKEY
,LPCSTR
,LPCSTR
);
114 LONG WINAPI
RegLoadKeyW(HKEY
,LPCWSTR
,LPCWSTR
);
115 #define RegLoadKey WINELIB_NAME_AW(RegLoadKey)
116 LONG WINAPI
RegLoadMUIStringA(HKEY
,LPCSTR
,LPSTR
,DWORD
,LPDWORD
,DWORD
,LPCSTR
);
117 LONG WINAPI
RegLoadMUIStringW(HKEY
,LPCWSTR
,LPWSTR
,DWORD
,LPDWORD
,DWORD
,LPCWSTR
);
118 #define RegLoadMUIString WINELIB_NAME_AW(RegLoadMUIString)
119 LONG WINAPI
RegNotifyChangeKeyValue(HKEY
,BOOL
,DWORD
,HANDLE
,BOOL
);
120 LONG WINAPI
RegOpenCurrentUser(REGSAM
,PHKEY
);
121 LONG WINAPI
RegOpenKeyExW(HKEY
,LPCWSTR
,DWORD
,REGSAM
,PHKEY
);
122 LONG WINAPI
RegOpenKeyExA(HKEY
,LPCSTR
,DWORD
,REGSAM
,PHKEY
);
123 #define RegOpenKeyEx WINELIB_NAME_AW(RegOpenKeyEx)
124 LONG WINAPI
RegOpenUserClassesRoot(HANDLE
,DWORD
,REGSAM
,PHKEY
);
125 LONG WINAPI
RegQueryInfoKeyW(HKEY
,LPWSTR
,LPDWORD
,LPDWORD
,LPDWORD
,
126 LPDWORD
,LPDWORD
,LPDWORD
,LPDWORD
,LPDWORD
,
128 LONG WINAPI
RegQueryInfoKeyA(HKEY
,LPSTR
,LPDWORD
,LPDWORD
,LPDWORD
,
129 LPDWORD
,LPDWORD
,LPDWORD
,LPDWORD
,LPDWORD
,
131 #define RegQueryInfoKey WINELIB_NAME_AW(RegQueryInfoKey)
132 LONG WINAPI
RegQueryMultipleValuesA(HKEY
,PVALENTA
,DWORD
,LPSTR
,LPDWORD
);
133 LONG WINAPI
RegQueryMultipleValuesW(HKEY
,PVALENTW
,DWORD
,LPWSTR
,LPDWORD
);
134 #define RegQueryMultipleValues WINELIB_NAME_AW(RegQueryMultipleValues)
135 LONG WINAPI
RegReplaceKeyA(HKEY
,LPCSTR
,LPCSTR
,LPCSTR
);
136 LONG WINAPI
RegReplaceKeyW(HKEY
,LPCWSTR
,LPCWSTR
,LPCWSTR
);
137 #define RegReplaceKey WINELIB_NAME_AW(RegReplaceKey)
138 LONG WINAPI
RegRestoreKeyA(HKEY
,LPCSTR
,DWORD
);
139 LONG WINAPI
RegRestoreKeyW(HKEY
,LPCWSTR
,DWORD
);
140 #define RegRestoreKey WINELIB_NAME_AW(RegRestoreKey)
141 LONG WINAPI
RegUnLoadKeyA(HKEY
,LPCSTR
);
142 LONG WINAPI
RegUnLoadKeyW(HKEY
,LPCWSTR
);
143 #define RegUnLoadKey WINELIB_NAME_AW(RegUnLoadKey)
145 /* Declarations for functions that are the same in Win16 and Win32 */
147 LONG WINAPI
RegCloseKey(HKEY
);
148 LONG WINAPI
RegFlushKey(HKEY
);
150 LONG WINAPI
RegCreateKeyA(HKEY
,LPCSTR
,PHKEY
);
151 LONG WINAPI
RegCreateKeyW(HKEY
,LPCWSTR
,PHKEY
);
152 #define RegCreateKey WINELIB_NAME_AW(RegCreateKey)
153 LONG WINAPI
RegDeleteKeyA(HKEY
,LPCSTR
);
154 LONG WINAPI
RegDeleteKeyW(HKEY
,LPCWSTR
);
155 #define RegDeleteKey WINELIB_NAME_AW(RegDeleteKey)
156 LONG WINAPI
RegDeleteValueA(HKEY
,LPCSTR
);
157 LONG WINAPI
RegDeleteValueW(HKEY
,LPCWSTR
);
158 #define RegDeleteValue WINELIB_NAME_AW(RegDeleteValue)
159 LONG WINAPI
RegEnumKeyA(HKEY
,DWORD
,LPSTR
,DWORD
);
160 LONG WINAPI
RegEnumKeyW(HKEY
,DWORD
,LPWSTR
,DWORD
);
161 #define RegEnumKey WINELIB_NAME_AW(RegEnumKey)
162 LONG WINAPI
RegEnumValueA(HKEY
,DWORD
,LPSTR
,LPDWORD
,LPDWORD
,LPDWORD
,LPBYTE
,LPDWORD
);
163 LONG WINAPI
RegEnumValueW(HKEY
,DWORD
,LPWSTR
,LPDWORD
,LPDWORD
,LPDWORD
,LPBYTE
,LPDWORD
);
164 #define RegEnumValue WINELIB_NAME_AW(RegEnumValue)
165 LONG WINAPI
RegOpenKeyA(HKEY
,LPCSTR
,PHKEY
);
166 LONG WINAPI
RegOpenKeyW(HKEY
,LPCWSTR
,PHKEY
);
167 #define RegOpenKey WINELIB_NAME_AW(RegOpenKey)
168 LONG WINAPI
RegQueryValueA(HKEY
,LPCSTR
,LPSTR
,LPLONG
);
169 LONG WINAPI
RegQueryValueW(HKEY
,LPCWSTR
,LPWSTR
,LPLONG
);
170 #define RegQueryValue WINELIB_NAME_AW(RegQueryValue)
171 LONG WINAPI
RegQueryValueExA(HKEY
,LPCSTR
,LPDWORD
,LPDWORD
,LPBYTE
,LPDWORD
);
172 LONG WINAPI
RegQueryValueExW(HKEY
,LPCWSTR
,LPDWORD
,LPDWORD
,LPBYTE
,LPDWORD
);
173 #define RegQueryValueEx WINELIB_NAME_AW(RegQueryValueEx)
174 LONG WINAPI
RegSetValueA(HKEY
,LPCSTR
,DWORD
,LPCSTR
,DWORD
);
175 LONG WINAPI
RegSetValueW(HKEY
,LPCWSTR
,DWORD
,LPCWSTR
,DWORD
);
176 #define RegSetValue WINELIB_NAME_AW(RegSetValue)
177 LONG WINAPI
RegSetValueExA(HKEY
,LPCSTR
,DWORD
,DWORD
,CONST BYTE
*,DWORD
);
178 LONG WINAPI
RegSetValueExW(HKEY
,LPCWSTR
,DWORD
,DWORD
,CONST BYTE
*,DWORD
);
179 #define RegSetValueEx WINELIB_NAME_AW(RegSetValueEx)
183 #endif /* defined(__cplusplus) */
185 #endif /* __WINE_WINREG_H */