2 * Shell Library definitions
4 #ifndef __WINE_WINREG_H
5 #define __WINE_WINREG_H
12 #endif /* defined(__cplusplus) */
15 #define SHELL_ERROR_SUCCESS 0L
16 #define SHELL_ERROR_BADDB 1L
17 #define SHELL_ERROR_BADKEY 2L
18 #define SHELL_ERROR_CANTOPEN 3L
19 #define SHELL_ERROR_CANTREAD 4L
20 #define SHELL_ERROR_CANTWRITE 5L
21 #define SHELL_ERROR_OUTOFMEMORY 6L
22 #define SHELL_ERROR_INVALID_PARAMETER 7L
23 #define SHELL_ERROR_ACCESS_DENIED 8L
26 #define REG_NONE 0 /* no type */
27 #define REG_SZ 1 /* string type (ASCII) */
28 #define REG_EXPAND_SZ 2 /* string, includes %ENVVAR% (expanded by caller) (ASCII) */
29 #define REG_BINARY 3 /* binary format, callerspecific */
30 /* YES, REG_DWORD == REG_DWORD_LITTLE_ENDIAN */
31 #define REG_DWORD 4 /* DWORD in little endian format */
32 #define REG_DWORD_LITTLE_ENDIAN 4 /* DWORD in little endian format */
33 #define REG_DWORD_BIG_ENDIAN 5 /* DWORD in big endian format */
34 #define REG_LINK 6 /* symbolic link (UNICODE) */
35 #define REG_MULTI_SZ 7 /* multiple strings, delimited by \0, terminated by \0\0 (ASCII) */
36 #define REG_RESOURCE_LIST 8 /* resource list? huh? */
37 #define REG_FULL_RESOURCE_DESCRIPTOR 9 /* full resource descriptor? huh? */
38 #define REG_RESOURCE_REQUIREMENTS_LIST 10
40 #define HKEY_CLASSES_ROOT ((HKEY) 0x80000000)
41 #define HKEY_CURRENT_USER ((HKEY) 0x80000001)
42 #define HKEY_LOCAL_MACHINE ((HKEY) 0x80000002)
43 #define HKEY_USERS ((HKEY) 0x80000003)
44 #define HKEY_PERFORMANCE_DATA ((HKEY) 0x80000004)
45 #define HKEY_CURRENT_CONFIG ((HKEY) 0x80000005)
46 #define HKEY_DYN_DATA ((HKEY) 0x80000006)
48 #define REG_OPTION_RESERVED 0x00000000
49 #define REG_OPTION_NON_VOLATILE 0x00000000
50 #define REG_OPTION_VOLATILE 0x00000001
51 #define REG_OPTION_CREATE_LINK 0x00000002
52 #define REG_OPTION_BACKUP_RESTORE 0x00000004 /* FIXME */
53 #define REG_OPTION_TAINTED 0x80000000 /* Internal? */
55 #define REG_CREATED_NEW_KEY 0x00000001
56 #define REG_OPENED_EXISTING_KEY 0x00000002
58 /* For RegNotifyChangeKeyValue */
59 #define REG_NOTIFY_CHANGE_NAME 0x1
61 #define KEY_QUERY_VALUE 0x00000001
62 #define KEY_SET_VALUE 0x00000002
63 #define KEY_CREATE_SUB_KEY 0x00000004
64 #define KEY_ENUMERATE_SUB_KEYS 0x00000008
65 #define KEY_NOTIFY 0x00000010
66 #define KEY_CREATE_LINK 0x00000020
68 #define KEY_READ (STANDARD_RIGHTS_READ| \
70 KEY_ENUMERATE_SUB_KEYS|\
73 #define KEY_WRITE (STANDARD_RIGHTS_WRITE| \
77 #define KEY_EXECUTE KEY_READ
78 #define KEY_ALL_ACCESS (STANDARD_RIGHTS_ALL| \
84 * registry provider structs
86 typedef struct value_entA
89 DWORD_PTR ve_valueptr;
93 typedef struct value_entW {
96 DWORD_PTR ve_valueptr;
100 typedef ACCESS_MASK REGSAM;
102 DWORD WINAPI RegCreateKeyExA(HKEY,LPCSTR,DWORD,LPSTR,DWORD,REGSAM,
103 LPSECURITY_ATTRIBUTES,LPHKEY,LPDWORD);
104 DWORD WINAPI RegCreateKeyExW(HKEY,LPCWSTR,DWORD,LPWSTR,DWORD,REGSAM,
105 LPSECURITY_ATTRIBUTES,LPHKEY,LPDWORD);
106 #define RegCreateKeyEx WINELIB_NAME_AW(RegCreateKeyEx)
107 LONG WINAPI RegSaveKeyA(HKEY,LPCSTR,LPSECURITY_ATTRIBUTES);
108 LONG WINAPI RegSaveKeyW(HKEY,LPCWSTR,LPSECURITY_ATTRIBUTES);
109 #define RegSaveKey WINELIB_NAME_AW(RegSaveKey)
110 LONG WINAPI RegSetKeySecurity(HKEY,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR);
111 LONG WINAPI RegConnectRegistryA(LPCSTR,HKEY,LPHKEY);
112 LONG WINAPI RegConnectRegistryW(LPCWSTR,HKEY,LPHKEY);
113 #define RegConnectRegistry WINELIB_NAME_AW(RegConnectRegistry)
114 DWORD WINAPI RegEnumKeyExA(HKEY,DWORD,LPSTR,LPDWORD,LPDWORD,LPSTR,
116 DWORD WINAPI RegEnumKeyExW(HKEY,DWORD,LPWSTR,LPDWORD,LPDWORD,LPWSTR,
118 #define RegEnumKeyEx WINELIB_NAME_AW(RegEnumKeyEx)
119 LONG WINAPI RegGetKeySecurity(HKEY,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR,LPDWORD);
120 LONG WINAPI RegLoadKeyA(HKEY,LPCSTR,LPCSTR);
121 LONG WINAPI RegLoadKeyW(HKEY,LPCWSTR,LPCWSTR);
122 #define RegLoadKey WINELIB_NAME_AW(RegLoadKey)
123 LONG WINAPI RegNotifyChangeKeyValue(HKEY,BOOL,DWORD,HANDLE,BOOL);
124 DWORD WINAPI RegOpenKeyExW(HKEY,LPCWSTR,DWORD,REGSAM,LPHKEY);
125 DWORD WINAPI RegOpenKeyExA(HKEY,LPCSTR,DWORD,REGSAM,LPHKEY);
126 #define RegOpenKeyEx WINELIB_NAME_AW(RegOpenKeyEx)
127 DWORD WINAPI RegQueryInfoKeyW(HKEY,LPWSTR,LPDWORD,LPDWORD,LPDWORD,
128 LPDWORD,LPDWORD,LPDWORD,LPDWORD,LPDWORD,
130 DWORD WINAPI RegQueryInfoKeyA(HKEY,LPSTR,LPDWORD,LPDWORD,LPDWORD,
131 LPDWORD,LPDWORD,LPDWORD,LPDWORD,LPDWORD,
133 #define RegQueryInfoKey WINELIB_NAME_AW(RegQueryInfoKey)
134 LONG WINAPI RegReplaceKeyA(HKEY,LPCSTR,LPCSTR,LPCSTR);
135 LONG WINAPI RegReplaceKeyW(HKEY,LPCWSTR,LPCWSTR,LPCWSTR);
136 #define RegReplaceKey WINELIB_NAME_AW(RegReplaceKey)
137 LONG WINAPI RegRestoreKeyA(HKEY,LPCSTR,DWORD);
138 LONG WINAPI RegRestoreKeyW(HKEY,LPCWSTR,DWORD);
139 #define RegRestoreKey WINELIB_NAME_AW(RegRestoreKey)
140 LONG WINAPI RegUnLoadKeyA(HKEY,LPCSTR);
141 LONG WINAPI RegUnLoadKeyW(HKEY,LPCWSTR);
142 #define RegUnLoadKey WINELIB_NAME_AW(RegUnLoadKey)
144 /* Declarations for functions that are the same in Win16 and Win32 */
146 DWORD WINAPI RegCloseKey(HKEY);
147 DWORD WINAPI RegFlushKey(HKEY);
149 DWORD WINAPI RegCreateKeyA(HKEY,LPCSTR,LPHKEY);
150 DWORD WINAPI RegCreateKeyW(HKEY,LPCWSTR,LPHKEY);
151 #define RegCreateKey WINELIB_NAME_AW(RegCreateKey)
152 DWORD WINAPI RegDeleteKeyA(HKEY,LPCSTR);
153 DWORD WINAPI RegDeleteKeyW(HKEY,LPCWSTR);
154 #define RegDeleteKey WINELIB_NAME_AW(RegDeleteKey)
155 DWORD WINAPI RegDeleteValueA(HKEY,LPCSTR);
156 DWORD WINAPI RegDeleteValueW(HKEY,LPCWSTR);
157 #define RegDeleteValue WINELIB_NAME_AW(RegDeleteValue)
158 DWORD WINAPI RegEnumKeyA(HKEY,DWORD,LPSTR,DWORD);
159 DWORD WINAPI RegEnumKeyW(HKEY,DWORD,LPWSTR,DWORD);
160 #define RegEnumKey WINELIB_NAME_AW(RegEnumKey)
161 DWORD WINAPI RegEnumValueA(HKEY,DWORD,LPSTR,LPDWORD,LPDWORD,LPDWORD,LPBYTE,LPDWORD);
162 DWORD WINAPI RegEnumValueW(HKEY,DWORD,LPWSTR,LPDWORD,LPDWORD,LPDWORD,LPBYTE,LPDWORD);
163 #define RegEnumValue WINELIB_NAME_AW(RegEnumValue)
164 DWORD WINAPI RegOpenKeyA(HKEY,LPCSTR,LPHKEY);
165 DWORD WINAPI RegOpenKeyW(HKEY,LPCWSTR,LPHKEY);
166 #define RegOpenKey WINELIB_NAME_AW(RegOpenKey)
167 DWORD WINAPI RegQueryValueA(HKEY,LPCSTR,LPSTR,LPLONG);
168 DWORD WINAPI RegQueryValueW(HKEY,LPCWSTR,LPWSTR,LPLONG);
169 #define RegQueryValue WINELIB_NAME_AW(RegQueryValue)
170 DWORD WINAPI RegQueryValueExA(HKEY,LPCSTR,LPDWORD,LPDWORD,LPBYTE,LPDWORD);
171 DWORD WINAPI RegQueryValueExW(HKEY,LPCWSTR,LPDWORD,LPDWORD,LPBYTE,LPDWORD);
172 #define RegQueryValueEx WINELIB_NAME_AW(RegQueryValueEx)
173 DWORD WINAPI RegSetValueA(HKEY,LPCSTR,DWORD,LPCSTR,DWORD);
174 DWORD WINAPI RegSetValueW(HKEY,LPCWSTR,DWORD,LPCWSTR,DWORD);
175 #define RegSetValue WINELIB_NAME_AW(RegSetValue)
176 DWORD WINAPI RegSetValueExA(HKEY,LPCSTR,DWORD,DWORD,CONST BYTE*,DWORD);
177 DWORD WINAPI RegSetValueExW(HKEY,LPCWSTR,DWORD,DWORD,CONST BYTE*,DWORD);
178 #define RegSetValueEx WINELIB_NAME_AW(RegSetValueEx)
182 #endif /* defined(__cplusplus) */
184 #endif /* __WINE_WINREG_H */