win32u: Avoid unnecessary copy of adapter path and device name.
[wine.git] / include / winreg.h
blobda92fb11f94f60c5b95bf782afff66d8d8eb5537
1 /*
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
24 #ifdef __cplusplus
25 extern "C" {
26 #endif /* defined(__cplusplus) */
28 #define HKEY_CLASSES_ROOT ((HKEY)(LONG_PTR)(LONG)0x80000000)
29 #define HKEY_CURRENT_USER ((HKEY)(LONG_PTR)(LONG)0x80000001)
30 #define HKEY_LOCAL_MACHINE ((HKEY)(LONG_PTR)(LONG)0x80000002)
31 #define HKEY_USERS ((HKEY)(LONG_PTR)(LONG)0x80000003)
32 #define HKEY_PERFORMANCE_DATA ((HKEY)(LONG_PTR)(LONG)0x80000004)
33 #define HKEY_CURRENT_CONFIG ((HKEY)(LONG_PTR)(LONG)0x80000005)
34 #define HKEY_DYN_DATA ((HKEY)(LONG_PTR)(LONG)0x80000006)
35 #define HKEY_PERFORMANCE_TEXT ((HKEY)(LONG_PTR)(LONG)0x80000050)
36 #define HKEY_PERFORMANCE_NLSTEXT ((HKEY)(LONG_PTR)(LONG)0x80000060)
39 * registry provider structs
41 typedef struct value_entA
42 { LPSTR ve_valuename;
43 DWORD ve_valuelen;
44 DWORD_PTR ve_valueptr;
45 DWORD ve_type;
46 } VALENTA, *PVALENTA;
48 typedef struct value_entW {
49 LPWSTR ve_valuename;
50 DWORD ve_valuelen;
51 DWORD_PTR ve_valueptr;
52 DWORD ve_type;
53 } VALENTW, *PVALENTW;
55 typedef ACCESS_MASK REGSAM;
56 typedef LONG LSTATUS;
59 * InitiateSystemShutdown() reasons
61 #include <reason.h>
63 #define REASON_OTHER (SHTDN_REASON_MAJOR_OTHER | SHTDN_REASON_MINOR_OTHER)
64 #define REASON_UNKNOWN SHTDN_REASON_UNKNOWN
65 #define REASON_LEGACY_API SHTDN_REASON_LEGACY_API
66 #define REASON_PLANNED_FLAG SHTDN_REASON_FLAG_PLANNED
68 #define MAX_SHUTDOWN_TIMEOUT (10*365*24*60*60)
71 * RegGetValue() restrictions
74 #define RRF_RT_REG_NONE (1 << 0)
75 #define RRF_RT_REG_SZ (1 << 1)
76 #define RRF_RT_REG_EXPAND_SZ (1 << 2)
77 #define RRF_RT_REG_BINARY (1 << 3)
78 #define RRF_RT_REG_DWORD (1 << 4)
79 #define RRF_RT_REG_MULTI_SZ (1 << 5)
80 #define RRF_RT_REG_QWORD (1 << 6)
81 #define RRF_RT_DWORD (RRF_RT_REG_BINARY | RRF_RT_REG_DWORD)
82 #define RRF_RT_QWORD (RRF_RT_REG_BINARY | RRF_RT_REG_QWORD)
83 #define RRF_RT_ANY 0xffff
84 #define RRF_SUBKEY_WOW6464KEY (1 << 16)
85 #define RRF_SUBKEY_WOW6432KEY (1 << 17)
86 #define RRF_WOW64_MASK (RRF_SUBKEY_WOW6432KEY | RRF_SUBKEY_WOW6464KEY)
87 #define RRF_NOEXPAND (1 << 28)
88 #define RRF_ZEROONFAILURE (1 << 29)
90 #define REG_PROCESS_APPKEY 0x00000001
92 #define REG_MUI_STRING_TRUNCATE 0x00000001
94 WINADVAPI BOOL WINAPI AbortSystemShutdownA(LPSTR);
95 WINADVAPI BOOL WINAPI AbortSystemShutdownW(LPWSTR);
96 #define AbortSystemShutdown WINELIB_NAME_AW(AbortSystemShutdown)
97 WINADVAPI DWORD WINAPI InitiateShutdownA(char*,char*,DWORD,DWORD,DWORD);
98 WINADVAPI DWORD WINAPI InitiateShutdownW(WCHAR*,WCHAR*,DWORD,DWORD,DWORD);
99 #define InitiateShutdown WINELIB_NAME_AW(InitiateShutdown)
100 WINADVAPI BOOL WINAPI InitiateSystemShutdownA(LPSTR,LPSTR,DWORD,BOOL,BOOL);
101 WINADVAPI BOOL WINAPI InitiateSystemShutdownW(LPWSTR,LPWSTR,DWORD,BOOL,BOOL);
102 #define InitiateSystemShutdown WINELIB_NAME_AW(InitiateSystemShutdown)
103 WINADVAPI BOOL WINAPI InitiateSystemShutdownExA(LPSTR,LPSTR,DWORD,BOOL,BOOL,DWORD);
104 WINADVAPI BOOL WINAPI InitiateSystemShutdownExW(LPWSTR,LPWSTR,DWORD,BOOL,BOOL,DWORD);
105 #define InitiateSystemShutdownEx WINELIB_NAME_AW(InitiateSystemShutdownEx)
106 WINADVAPI LSTATUS WINAPI RegCloseKey(HKEY);
107 WINADVAPI LSTATUS WINAPI RegConnectRegistryA(LPCSTR,HKEY,PHKEY);
108 WINADVAPI LSTATUS WINAPI RegConnectRegistryW(LPCWSTR,HKEY,PHKEY);
109 #define RegConnectRegistry WINELIB_NAME_AW(RegConnectRegistry)
110 WINADVAPI LSTATUS WINAPI RegCopyTreeA(HKEY,const char*,HKEY);
111 WINADVAPI LSTATUS WINAPI RegCopyTreeW(HKEY,const WCHAR*,HKEY);
112 #define RegCopyTree WINELIB_NAME_AW(RegCopyTree)
113 WINADVAPI LSTATUS WINAPI RegCreateKeyA(HKEY,LPCSTR,PHKEY);
114 WINADVAPI LSTATUS WINAPI RegCreateKeyW(HKEY,LPCWSTR,PHKEY);
115 #define RegCreateKey WINELIB_NAME_AW(RegCreateKey)
116 WINADVAPI LSTATUS WINAPI RegCreateKeyExA(HKEY,LPCSTR,DWORD,LPSTR,DWORD,REGSAM,LPSECURITY_ATTRIBUTES,PHKEY,LPDWORD);
117 WINADVAPI LSTATUS WINAPI RegCreateKeyExW(HKEY,LPCWSTR,DWORD,LPWSTR,DWORD,REGSAM,LPSECURITY_ATTRIBUTES,PHKEY,LPDWORD);
118 #define RegCreateKeyEx WINELIB_NAME_AW(RegCreateKeyEx)
119 WINADVAPI LSTATUS WINAPI RegDeleteKeyA(HKEY,LPCSTR);
120 WINADVAPI LSTATUS WINAPI RegDeleteKeyW(HKEY,LPCWSTR);
121 #define RegDeleteKey WINELIB_NAME_AW(RegDeleteKey)
122 WINADVAPI LSTATUS WINAPI RegDeleteKeyExA(HKEY,LPCSTR,REGSAM,DWORD);
123 WINADVAPI LSTATUS WINAPI RegDeleteKeyExW(HKEY,LPCWSTR,REGSAM,DWORD);
124 #define RegDeleteKeyEx WINELIB_NAME_AW(RegDeleteKeyEx)
125 WINADVAPI LSTATUS WINAPI RegDeleteKeyValueA(HKEY,LPCSTR,LPCSTR);
126 WINADVAPI LSTATUS WINAPI RegDeleteKeyValueW(HKEY,LPCWSTR,LPCWSTR);
127 #define RegDeleteKeyValue WINELIB_NAME_AW(RegDeleteKeyValue)
128 WINADVAPI LSTATUS WINAPI RegDeleteTreeA(HKEY,LPCSTR);
129 WINADVAPI LSTATUS WINAPI RegDeleteTreeW(HKEY,LPCWSTR);
130 #define RegDeleteTree WINELIB_NAME_AW(RegDeleteTree)
131 WINADVAPI LSTATUS WINAPI RegDeleteValueA(HKEY,LPCSTR);
132 WINADVAPI LSTATUS WINAPI RegDeleteValueW(HKEY,LPCWSTR);
133 #define RegDeleteValue WINELIB_NAME_AW(RegDeleteValue)
134 WINADVAPI LSTATUS WINAPI RegDisablePredefinedCache(void);
135 WINADVAPI LSTATUS WINAPI RegEnumKeyA(HKEY,DWORD,LPSTR,DWORD);
136 WINADVAPI LSTATUS WINAPI RegEnumKeyW(HKEY,DWORD,LPWSTR,DWORD);
137 #define RegEnumKey WINELIB_NAME_AW(RegEnumKey)
138 WINADVAPI LSTATUS WINAPI RegEnumKeyExA(HKEY,DWORD,LPSTR,LPDWORD,LPDWORD,LPSTR,LPDWORD,LPFILETIME);
139 WINADVAPI LSTATUS WINAPI RegEnumKeyExW(HKEY,DWORD,LPWSTR,LPDWORD,LPDWORD,LPWSTR,LPDWORD,LPFILETIME);
140 #define RegEnumKeyEx WINELIB_NAME_AW(RegEnumKeyEx)
141 WINADVAPI LSTATUS WINAPI RegEnumValueA(HKEY,DWORD,LPSTR,LPDWORD,LPDWORD,LPDWORD,LPBYTE,LPDWORD);
142 WINADVAPI LSTATUS WINAPI RegEnumValueW(HKEY,DWORD,LPWSTR,LPDWORD,LPDWORD,LPDWORD,LPBYTE,LPDWORD);
143 #define RegEnumValue WINELIB_NAME_AW(RegEnumValue)
144 WINADVAPI LSTATUS WINAPI RegFlushKey(HKEY);
145 WINADVAPI LSTATUS WINAPI RegGetKeySecurity(HKEY,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR,LPDWORD);
146 WINADVAPI LSTATUS WINAPI RegGetValueA(HKEY,LPCSTR,LPCSTR,DWORD,LPDWORD,PVOID,LPDWORD);
147 WINADVAPI LSTATUS WINAPI RegGetValueW(HKEY,LPCWSTR,LPCWSTR,DWORD,LPDWORD,PVOID,LPDWORD);
148 #define RegGetValue WINELIB_NAME_AW(RegGetValue)
149 WINADVAPI LSTATUS WINAPI RegLoadAppKeyA(const char*,HKEY*,REGSAM,DWORD,DWORD);
150 WINADVAPI LSTATUS WINAPI RegLoadAppKeyW(const WCHAR*,HKEY*,REGSAM,DWORD,DWORD);
151 #define RegLoadAppKey WINELIB_NAME_AW(RegLoadAppKey)
152 WINADVAPI LSTATUS WINAPI RegLoadKeyA(HKEY,LPCSTR,LPCSTR);
153 WINADVAPI LSTATUS WINAPI RegLoadKeyW(HKEY,LPCWSTR,LPCWSTR);
154 #define RegLoadKey WINELIB_NAME_AW(RegLoadKey)
155 WINADVAPI LSTATUS WINAPI RegLoadMUIStringA(HKEY,LPCSTR,LPSTR,DWORD,LPDWORD,DWORD,LPCSTR);
156 WINADVAPI LSTATUS WINAPI RegLoadMUIStringW(HKEY,LPCWSTR,LPWSTR,DWORD,LPDWORD,DWORD,LPCWSTR);
157 #define RegLoadMUIString WINELIB_NAME_AW(RegLoadMUIString)
158 WINADVAPI LSTATUS WINAPI RegNotifyChangeKeyValue(HKEY,BOOL,DWORD,HANDLE,BOOL);
159 WINADVAPI LSTATUS WINAPI RegOpenCurrentUser(REGSAM,PHKEY);
160 WINADVAPI LSTATUS WINAPI RegOpenKeyA(HKEY,LPCSTR,PHKEY);
161 WINADVAPI LSTATUS WINAPI RegOpenKeyW(HKEY,LPCWSTR,PHKEY);
162 #define RegOpenKey WINELIB_NAME_AW(RegOpenKey)
163 WINADVAPI LSTATUS WINAPI RegOpenKeyExW(HKEY,LPCWSTR,DWORD,REGSAM,PHKEY);
164 WINADVAPI LSTATUS WINAPI RegOpenKeyExA(HKEY,LPCSTR,DWORD,REGSAM,PHKEY);
165 #define RegOpenKeyEx WINELIB_NAME_AW(RegOpenKeyEx)
166 WINADVAPI LSTATUS WINAPI RegOpenUserClassesRoot(HANDLE,DWORD,REGSAM,PHKEY);
167 WINADVAPI LSTATUS WINAPI RegOverridePredefKey(HKEY,HKEY);
168 WINADVAPI LSTATUS WINAPI RegQueryInfoKeyW(HKEY,LPWSTR,LPDWORD,LPDWORD,LPDWORD,LPDWORD,LPDWORD,LPDWORD,LPDWORD,LPDWORD,LPDWORD,LPFILETIME);
169 WINADVAPI LSTATUS WINAPI RegQueryInfoKeyA(HKEY,LPSTR,LPDWORD,LPDWORD,LPDWORD,LPDWORD,LPDWORD,LPDWORD,LPDWORD,LPDWORD,LPDWORD,LPFILETIME);
170 #define RegQueryInfoKey WINELIB_NAME_AW(RegQueryInfoKey)
171 WINADVAPI LSTATUS WINAPI RegQueryMultipleValuesA(HKEY,PVALENTA,DWORD,LPSTR,LPDWORD);
172 WINADVAPI LSTATUS WINAPI RegQueryMultipleValuesW(HKEY,PVALENTW,DWORD,LPWSTR,LPDWORD);
173 #define RegQueryMultipleValues WINELIB_NAME_AW(RegQueryMultipleValues)
174 WINADVAPI LONG WINAPI RegQueryReflectionKey(HKEY,BOOL*);
175 WINADVAPI LSTATUS WINAPI RegQueryValueA(HKEY,LPCSTR,LPSTR,LPLONG);
176 WINADVAPI LSTATUS WINAPI RegQueryValueW(HKEY,LPCWSTR,LPWSTR,LPLONG);
177 #define RegQueryValue WINELIB_NAME_AW(RegQueryValue)
178 WINADVAPI LSTATUS WINAPI RegQueryValueExA(HKEY,LPCSTR,LPDWORD,LPDWORD,LPBYTE,LPDWORD);
179 WINADVAPI LSTATUS WINAPI RegQueryValueExW(HKEY,LPCWSTR,LPDWORD,LPDWORD,LPBYTE,LPDWORD);
180 #define RegQueryValueEx WINELIB_NAME_AW(RegQueryValueEx)
181 WINADVAPI LSTATUS WINAPI RegRenameKey(HKEY,LPCWSTR,LPCWSTR);
182 WINADVAPI LSTATUS WINAPI RegReplaceKeyA(HKEY,LPCSTR,LPCSTR,LPCSTR);
183 WINADVAPI LSTATUS WINAPI RegReplaceKeyW(HKEY,LPCWSTR,LPCWSTR,LPCWSTR);
184 #define RegReplaceKey WINELIB_NAME_AW(RegReplaceKey)
185 WINADVAPI LSTATUS WINAPI RegRestoreKeyA(HKEY,LPCSTR,DWORD);
186 WINADVAPI LSTATUS WINAPI RegRestoreKeyW(HKEY,LPCWSTR,DWORD);
187 #define RegRestoreKey WINELIB_NAME_AW(RegRestoreKey)
188 WINADVAPI LSTATUS WINAPI RegSaveKeyA(HKEY,LPCSTR,LPSECURITY_ATTRIBUTES);
189 WINADVAPI LSTATUS WINAPI RegSaveKeyW(HKEY,LPCWSTR,LPSECURITY_ATTRIBUTES);
190 #define RegSaveKey WINELIB_NAME_AW(RegSaveKey)
191 WINADVAPI LSTATUS WINAPI RegSaveKeyExA(HKEY,LPCSTR,LPSECURITY_ATTRIBUTES,DWORD);
192 WINADVAPI LSTATUS WINAPI RegSaveKeyExW(HKEY,LPCWSTR,LPSECURITY_ATTRIBUTES,DWORD);
193 #define RegSaveKeyEx WINELIB_NAME_AW(RegSaveKeyEx)
194 WINADVAPI LSTATUS WINAPI RegSetKeySecurity(HKEY,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR);
195 WINADVAPI LSTATUS WINAPI RegSetKeyValueA(HKEY,LPCSTR,LPCSTR,DWORD,const void*,DWORD);
196 WINADVAPI LSTATUS WINAPI RegSetKeyValueW(HKEY,LPCWSTR,LPCWSTR,DWORD,const void*,DWORD);
197 WINADVAPI LSTATUS WINAPI RegSetValueA(HKEY,LPCSTR,DWORD,LPCSTR,DWORD);
198 WINADVAPI LSTATUS WINAPI RegSetValueW(HKEY,LPCWSTR,DWORD,LPCWSTR,DWORD);
199 #define RegSetValue WINELIB_NAME_AW(RegSetValue)
200 WINADVAPI LSTATUS WINAPI RegSetValueExA(HKEY,LPCSTR,DWORD,DWORD,const BYTE*,DWORD);
201 WINADVAPI LSTATUS WINAPI RegSetValueExW(HKEY,LPCWSTR,DWORD,DWORD,const BYTE*,DWORD);
202 #define RegSetValueEx WINELIB_NAME_AW(RegSetValueEx)
203 WINADVAPI LSTATUS WINAPI RegUnLoadKeyA(HKEY,LPCSTR);
204 WINADVAPI LSTATUS WINAPI RegUnLoadKeyW(HKEY,LPCWSTR);
205 #define RegUnLoadKey WINELIB_NAME_AW(RegUnLoadKey)
207 #ifdef __cplusplus
208 } /* extern "C" */
209 #endif /* defined(__cplusplus) */
211 #endif /* __WINE_WINREG_H */