Fixed potential memory corruption in EVENT_QueryZOrder.
[wine/multimedia.git] / include / winreg.h
blobc2ef8a9902c16e0108ee151f9594ca2407e80a85
1 /*
2 * Shell Library definitions
3 */
4 #ifndef __WINE_WINREG_H
5 #define __WINE_WINREG_H
7 #include "winbase.h"
8 #include "winnt.h"
11 #define SHELL_ERROR_SUCCESS 0L
12 #define SHELL_ERROR_BADDB 1L
13 #define SHELL_ERROR_BADKEY 2L
14 #define SHELL_ERROR_CANTOPEN 3L
15 #define SHELL_ERROR_CANTREAD 4L
16 #define SHELL_ERROR_CANTWRITE 5L
17 #define SHELL_ERROR_OUTOFMEMORY 6L
18 #define SHELL_ERROR_INVALID_PARAMETER 7L
19 #define SHELL_ERROR_ACCESS_DENIED 8L
22 #define REG_NONE 0 /* no type */
23 #define REG_SZ 1 /* string type (ASCII) */
24 #define REG_EXPAND_SZ 2 /* string, includes %ENVVAR% (expanded by caller) (ASCII) */
25 #define REG_BINARY 3 /* binary format, callerspecific */
26 /* YES, REG_DWORD == REG_DWORD_LITTLE_ENDIAN */
27 #define REG_DWORD 4 /* DWORD in little endian format */
28 #define REG_DWORD_LITTLE_ENDIAN 4 /* DWORD in little endian format */
29 #define REG_DWORD_BIG_ENDIAN 5 /* DWORD in big endian format */
30 #define REG_LINK 6 /* symbolic link (UNICODE) */
31 #define REG_MULTI_SZ 7 /* multiple strings, delimited by \0, terminated by \0\0 (ASCII) */
32 #define REG_RESOURCE_LIST 8 /* resource list? huh? */
33 #define REG_FULL_RESOURCE_DESCRIPTOR 9 /* full resource descriptor? huh? */
34 #define REG_RESOURCE_REQUIREMENTS_LIST 10
36 #define HKEY_CLASSES_ROOT ((HKEY) 0x80000000)
37 #define HKEY_CURRENT_USER ((HKEY) 0x80000001)
38 #define HKEY_LOCAL_MACHINE ((HKEY) 0x80000002)
39 #define HKEY_USERS ((HKEY) 0x80000003)
40 #define HKEY_PERFORMANCE_DATA ((HKEY) 0x80000004)
41 #define HKEY_CURRENT_CONFIG ((HKEY) 0x80000005)
42 #define HKEY_DYN_DATA ((HKEY) 0x80000006)
44 #define REG_OPTION_RESERVED 0x00000000
45 #define REG_OPTION_NON_VOLATILE 0x00000000
46 #define REG_OPTION_VOLATILE 0x00000001
47 #define REG_OPTION_CREATE_LINK 0x00000002
48 #define REG_OPTION_BACKUP_RESTORE 0x00000004 /* FIXME */
49 #define REG_OPTION_TAINTED 0x80000000 /* Internal? */
51 #define REG_CREATED_NEW_KEY 0x00000001
52 #define REG_OPENED_EXISTING_KEY 0x00000002
54 /* For RegNotifyChangeKeyValue */
55 #define REG_NOTIFY_CHANGE_NAME 0x1
57 #define KEY_QUERY_VALUE 0x00000001
58 #define KEY_SET_VALUE 0x00000002
59 #define KEY_CREATE_SUB_KEY 0x00000004
60 #define KEY_ENUMERATE_SUB_KEYS 0x00000008
61 #define KEY_NOTIFY 0x00000010
62 #define KEY_CREATE_LINK 0x00000020
64 #define KEY_READ (STANDARD_RIGHTS_READ| \
65 KEY_QUERY_VALUE| \
66 KEY_ENUMERATE_SUB_KEYS|\
67 KEY_NOTIFY \
69 #define KEY_WRITE (STANDARD_RIGHTS_WRITE| \
70 KEY_SET_VALUE| \
71 KEY_CREATE_SUB_KEY \
73 #define KEY_EXECUTE KEY_READ
74 #define KEY_ALL_ACCESS (STANDARD_RIGHTS_ALL| \
75 KEY_READ|KEY_WRITE| \
76 KEY_CREATE_LINK \
79 /* fixme: move it to basetsd.h */
80 typedef ULONG_PTR DWORD_PTR, *PDWORD_PTR;
81 /* end fixme */
84 * registry provider structs
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;
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;
101 /* Used by: ControlService */
102 typedef struct _SERVICE_STATUS {
103 DWORD dwServiceType;
104 DWORD dwCurrentState;
105 DWORD dwControlsAccepted;
106 DWORD dwWin32ExitCode;
107 DWORD dwServiceSpecificExitCode;
108 DWORD dwCheckPoint;
109 DWORD dwWaitHint;
110 } SERVICE_STATUS, *LPSERVICE_STATUS;
112 HANDLE WINAPI OpenSCManagerA(LPCSTR,LPCSTR,DWORD);
113 HANDLE WINAPI OpenSCManagerW(LPCWSTR,LPCWSTR,DWORD);
114 #define OpenSCManager WINELIB_NAME_AW(OpenSCManager)
115 HANDLE WINAPI OpenServiceA(HANDLE,LPCSTR,DWORD);
116 HANDLE WINAPI OpenServiceW(HANDLE,LPCWSTR,DWORD);
117 #define OpenService WINELIB_NAME_AW(OpenService)
118 BOOL WINAPI LookupPrivilegeValueA(LPCSTR,LPCSTR,LPVOID);
119 BOOL WINAPI LookupPrivilegeValueW(LPCWSTR,LPCWSTR,LPVOID);
120 #define LookupPrivilegeValue WINELIB_NAME_AW(LookupPrivilegeValue)
121 HANDLE WINAPI RegisterEventSourceA(LPCSTR,LPCSTR);
122 HANDLE WINAPI RegisterEventSourceW(LPCWSTR,LPCWSTR);
123 #define RegisterEventSource WINELIB_NAME_AW(RegisterEventSource)
124 DWORD WINAPI RegCreateKeyExA(HKEY,LPCSTR,DWORD,LPSTR,DWORD,REGSAM,
125 LPSECURITY_ATTRIBUTES,LPHKEY,LPDWORD);
126 DWORD WINAPI RegCreateKeyExW(HKEY,LPCWSTR,DWORD,LPWSTR,DWORD,REGSAM,
127 LPSECURITY_ATTRIBUTES,LPHKEY,LPDWORD);
128 #define RegCreateKeyEx WINELIB_NAME_AW(RegCreateKeyEx)
129 LONG WINAPI RegSaveKeyA(HKEY,LPCSTR,LPSECURITY_ATTRIBUTES);
130 LONG WINAPI RegSaveKeyW(HKEY,LPCWSTR,LPSECURITY_ATTRIBUTES);
131 #define RegSaveKey WINELIB_NAME_AW(RegSaveKey)
132 LONG WINAPI RegSetKeySecurity(HKEY,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR);
133 BOOL WINAPI CloseServiceHandle(HANDLE);
134 BOOL WINAPI ControlService(HANDLE,DWORD,LPSERVICE_STATUS);
135 BOOL WINAPI DeleteService(HANDLE);
136 BOOL WINAPI DeregisterEventSource(HANDLE);
137 BOOL WINAPI GetFileSecurityA(LPCSTR,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR,DWORD,LPDWORD);
138 BOOL WINAPI GetFileSecurityW(LPCWSTR,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR,DWORD,LPDWORD);
139 #define GetFileSecurity WINELIB_NAME_AW(GetFileSecurity)
140 BOOL WINAPI GetUserNameA(LPSTR,LPDWORD);
141 BOOL WINAPI GetUserNameW(LPWSTR,LPDWORD);
142 #define GetUserName WINELIB_NAME_AW(GetUserName)
143 BOOL WINAPI OpenProcessToken(HANDLE,DWORD,HANDLE*);
144 LONG WINAPI RegConnectRegistryA(LPCSTR,HKEY,LPHKEY);
145 LONG WINAPI RegConnectRegistryW(LPCWSTR,HKEY,LPHKEY);
146 #define RegConnectRegistry WINELIB_NAME_AW(RegConnectRegistry)
147 DWORD WINAPI RegEnumKeyExA(HKEY,DWORD,LPSTR,LPDWORD,LPDWORD,LPSTR,
148 LPDWORD,LPFILETIME);
149 DWORD WINAPI RegEnumKeyExW(HKEY,DWORD,LPWSTR,LPDWORD,LPDWORD,LPWSTR,
150 LPDWORD,LPFILETIME);
151 #define RegEnumKeyEx WINELIB_NAME_AW(RegEnumKeyEx)
152 LONG WINAPI RegGetKeySecurity(HKEY,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR,LPDWORD);
153 LONG WINAPI RegLoadKeyA(HKEY,LPCSTR,LPCSTR);
154 LONG WINAPI RegLoadKeyW(HKEY,LPCWSTR,LPCWSTR);
155 #define RegLoadKey WINELIB_NAME_AW(RegLoadKey)
156 LONG WINAPI RegNotifyChangeKeyValue(HKEY,BOOL,DWORD,HANDLE,BOOL);
157 DWORD WINAPI RegOpenKeyExW(HKEY,LPCWSTR,DWORD,REGSAM,LPHKEY);
158 DWORD WINAPI RegOpenKeyExA(HKEY,LPCSTR,DWORD,REGSAM,LPHKEY);
159 #define RegOpenKeyEx WINELIB_NAME_AW(RegOpenKeyEx)
160 DWORD WINAPI RegQueryInfoKeyW(HKEY,LPWSTR,LPDWORD,LPDWORD,LPDWORD,
161 LPDWORD,LPDWORD,LPDWORD,LPDWORD,LPDWORD,
162 LPDWORD,LPFILETIME);
163 DWORD WINAPI RegQueryInfoKeyA(HKEY,LPSTR,LPDWORD,LPDWORD,LPDWORD,
164 LPDWORD,LPDWORD,LPDWORD,LPDWORD,LPDWORD,
165 LPDWORD,LPFILETIME);
166 #define RegQueryInfoKey WINELIB_NAME_AW(RegQueryInfoKey)
167 LONG WINAPI RegReplaceKeyA(HKEY,LPCSTR,LPCSTR,LPCSTR);
168 LONG WINAPI RegReplaceKeyW(HKEY,LPCWSTR,LPCWSTR,LPCWSTR);
169 #define RegReplaceKey WINELIB_NAME_AW(RegReplaceKey)
170 LONG WINAPI RegRestoreKeyA(HKEY,LPCSTR,DWORD);
171 LONG WINAPI RegRestoreKeyW(HKEY,LPCWSTR,DWORD);
172 #define RegRestoreKey WINELIB_NAME_AW(RegRestoreKey)
173 LONG WINAPI RegUnLoadKeyA(HKEY,LPCSTR);
174 LONG WINAPI RegUnLoadKeyW(HKEY,LPCWSTR);
175 #define RegUnLoadKey WINELIB_NAME_AW(RegUnLoadKey)
176 BOOL WINAPI SetFileSecurityA(LPCSTR,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR);
177 BOOL WINAPI SetFileSecurityW(LPCWSTR,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR);
178 #define SetFileSecurity WINELIB_NAME_AW(SetFileSecurity)
179 BOOL WINAPI StartServiceA(HANDLE,DWORD,LPCSTR*);
180 BOOL WINAPI StartServiceW(HANDLE,DWORD,LPCWSTR*);
181 #define StartService WINELIB_NAME_AW(StartService)
183 /* Declarations for functions that are the same in Win16 and Win32 */
185 DWORD WINAPI RegCloseKey(HKEY);
186 DWORD WINAPI RegFlushKey(HKEY);
188 DWORD WINAPI RegCreateKeyA(HKEY,LPCSTR,LPHKEY);
189 DWORD WINAPI RegCreateKeyW(HKEY,LPCWSTR,LPHKEY);
190 #define RegCreateKey WINELIB_NAME_AW(RegCreateKey)
191 DWORD WINAPI RegDeleteKeyA(HKEY,LPCSTR);
192 DWORD WINAPI RegDeleteKeyW(HKEY,LPWSTR);
193 #define RegDeleteKey WINELIB_NAME_AW(RegDeleteKey)
194 DWORD WINAPI RegDeleteValueA(HKEY,LPSTR);
195 DWORD WINAPI RegDeleteValueW(HKEY,LPWSTR);
196 #define RegDeleteValue WINELIB_NAME_AW(RegDeleteValue)
197 DWORD WINAPI RegEnumKeyA(HKEY,DWORD,LPSTR,DWORD);
198 DWORD WINAPI RegEnumKeyW(HKEY,DWORD,LPWSTR,DWORD);
199 #define RegEnumKey WINELIB_NAME_AW(RegEnumKey)
200 DWORD WINAPI RegEnumValueA(HKEY,DWORD,LPSTR,LPDWORD,LPDWORD,LPDWORD,LPBYTE,LPDWORD);
201 DWORD WINAPI RegEnumValueW(HKEY,DWORD,LPWSTR,LPDWORD,LPDWORD,LPDWORD,LPBYTE,LPDWORD);
202 #define RegEnumValue WINELIB_NAME_AW(RegEnumValue)
203 DWORD WINAPI RegOpenKeyA(HKEY,LPCSTR,LPHKEY);
204 DWORD WINAPI RegOpenKeyW(HKEY,LPCWSTR,LPHKEY);
205 #define RegOpenKey WINELIB_NAME_AW(RegOpenKey)
206 DWORD WINAPI RegQueryValueA(HKEY,LPCSTR,LPSTR,LPLONG);
207 DWORD WINAPI RegQueryValueW(HKEY,LPCWSTR,LPWSTR,LPLONG);
208 #define RegQueryValue WINELIB_NAME_AW(RegQueryValue)
209 DWORD WINAPI RegQueryValueExA(HKEY,LPSTR,LPDWORD,LPDWORD,LPBYTE,LPDWORD);
210 DWORD WINAPI RegQueryValueExW(HKEY,LPWSTR,LPDWORD,LPDWORD,LPBYTE,LPDWORD);
211 #define RegQueryValueEx WINELIB_NAME_AW(RegQueryValueEx)
212 DWORD WINAPI RegSetValueA(HKEY,LPCSTR,DWORD,LPCSTR,DWORD);
213 DWORD WINAPI RegSetValueW(HKEY,LPCWSTR,DWORD,LPCWSTR,DWORD);
214 #define RegSetValue WINELIB_NAME_AW(RegSetValue)
215 DWORD WINAPI RegSetValueExA(HKEY,LPSTR,DWORD,DWORD,LPBYTE,DWORD);
216 DWORD WINAPI RegSetValueExW(HKEY,LPWSTR,DWORD,DWORD,LPBYTE,DWORD);
217 #define RegSetValueEx WINELIB_NAME_AW(RegSetValueEx)
219 #endif /* __WINE_WINREG_H */