Added get_page_size function.
[wine] / include / winreg.h
1 /*
2  *                              Shell Library definitions
3  */
4 #ifndef __WINE_WINREG_H
5 #define __WINE_WINREG_H
6
7 #include "winbase.h"
8 #include "winnt.h"
9
10 #ifdef __cplusplus
11 extern "C" {
12 #endif /* defined(__cplusplus) */
13
14 /*
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
24 */
25
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
39
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)
47
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? */
54
55 #define REG_CREATED_NEW_KEY     0x00000001
56 #define REG_OPENED_EXISTING_KEY 0x00000002
57
58 /* For RegNotifyChangeKeyValue */
59 #define REG_NOTIFY_CHANGE_NAME  0x1
60
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
67
68 #define KEY_READ                (STANDARD_RIGHTS_READ|  \
69                                  KEY_QUERY_VALUE|       \
70                                  KEY_ENUMERATE_SUB_KEYS|\
71                                  KEY_NOTIFY             \
72                                 )
73 #define KEY_WRITE               (STANDARD_RIGHTS_WRITE| \
74                                  KEY_SET_VALUE|         \
75                                  KEY_CREATE_SUB_KEY     \
76                                 )
77 #define KEY_EXECUTE             KEY_READ
78 #define KEY_ALL_ACCESS          (STANDARD_RIGHTS_ALL|   \
79                                  KEY_READ|KEY_WRITE|    \
80                                  KEY_CREATE_LINK        \
81                                 )
82
83 /*
84  *      registry provider structs
85  */
86 typedef struct value_entA 
87 {   LPSTR       ve_valuename;
88     DWORD       ve_valuelen;
89     DWORD_PTR   ve_valueptr;
90     DWORD       ve_type;
91 } VALENTA, *PVALENTA;
92
93 typedef struct value_entW {
94     LPWSTR      ve_valuename;
95     DWORD       ve_valuelen;
96     DWORD_PTR   ve_valueptr;
97     DWORD       ve_type;
98 } VALENTW, *PVALENTW;
99
100 typedef ACCESS_MASK REGSAM;
101
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,
115                                    LPDWORD,LPFILETIME);
116 DWORD       WINAPI RegEnumKeyExW(HKEY,DWORD,LPWSTR,LPDWORD,LPDWORD,LPWSTR,
117                                    LPDWORD,LPFILETIME);
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,
129                                       LPDWORD,LPFILETIME);
130 DWORD       WINAPI RegQueryInfoKeyA(HKEY,LPSTR,LPDWORD,LPDWORD,LPDWORD,
131                                       LPDWORD,LPDWORD,LPDWORD,LPDWORD,LPDWORD,
132                                       LPDWORD,LPFILETIME);
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)
143
144 /* Declarations for functions that are the same in Win16 and Win32 */
145
146 DWORD       WINAPI RegCloseKey(HKEY);
147 DWORD       WINAPI RegFlushKey(HKEY);
148
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)
179
180 #ifdef __cplusplus
181 } /* extern "C" */
182 #endif /* defined(__cplusplus) */
183
184 #endif  /* __WINE_WINREG_H */