Xiang Li
[wine/multimedia.git] / include / winreg.h
blobf072694f8f73f1e1ed1693c7acd869b4575857bd
1 /*
2 * Shell Library definitions
3 */
4 #ifndef __WINE_WINREG_H
5 #define __WINE_WINREG_H
7 #include "winbase.h"
8 #include "winnt.h"
10 #ifdef __cplusplus
11 extern "C" {
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 */
54 #define REG_CREATED_NEW_KEY 0x00000001
55 #define REG_OPENED_EXISTING_KEY 0x00000002
57 /* For RegNotifyChangeKeyValue */
58 #define REG_NOTIFY_CHANGE_NAME 0x1
60 #define KEY_QUERY_VALUE 0x00000001
61 #define KEY_SET_VALUE 0x00000002
62 #define KEY_CREATE_SUB_KEY 0x00000004
63 #define KEY_ENUMERATE_SUB_KEYS 0x00000008
64 #define KEY_NOTIFY 0x00000010
65 #define KEY_CREATE_LINK 0x00000020
67 #define KEY_READ (STANDARD_RIGHTS_READ| \
68 KEY_QUERY_VALUE| \
69 KEY_ENUMERATE_SUB_KEYS|\
70 KEY_NOTIFY \
72 #define KEY_WRITE (STANDARD_RIGHTS_WRITE| \
73 KEY_SET_VALUE| \
74 KEY_CREATE_SUB_KEY \
76 #define KEY_EXECUTE KEY_READ
77 #define KEY_ALL_ACCESS (STANDARD_RIGHTS_ALL| \
78 KEY_READ|KEY_WRITE| \
79 KEY_CREATE_LINK \
83 * registry provider structs
85 typedef struct value_entA
86 { LPSTR ve_valuename;
87 DWORD ve_valuelen;
88 DWORD_PTR ve_valueptr;
89 DWORD ve_type;
90 } VALENTA, *PVALENTA;
92 typedef struct value_entW {
93 LPWSTR ve_valuename;
94 DWORD ve_valuelen;
95 DWORD_PTR ve_valueptr;
96 DWORD ve_type;
97 } VALENTW, *PVALENTW;
99 typedef ACCESS_MASK REGSAM;
101 DWORD WINAPI RegCreateKeyExA(HKEY,LPCSTR,DWORD,LPSTR,DWORD,REGSAM,
102 LPSECURITY_ATTRIBUTES,LPHKEY,LPDWORD);
103 DWORD WINAPI RegCreateKeyExW(HKEY,LPCWSTR,DWORD,LPWSTR,DWORD,REGSAM,
104 LPSECURITY_ATTRIBUTES,LPHKEY,LPDWORD);
105 #define RegCreateKeyEx WINELIB_NAME_AW(RegCreateKeyEx)
106 LONG WINAPI RegSaveKeyA(HKEY,LPCSTR,LPSECURITY_ATTRIBUTES);
107 LONG WINAPI RegSaveKeyW(HKEY,LPCWSTR,LPSECURITY_ATTRIBUTES);
108 #define RegSaveKey WINELIB_NAME_AW(RegSaveKey)
109 LONG WINAPI RegSetKeySecurity(HKEY,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR);
110 LONG WINAPI RegConnectRegistryA(LPCSTR,HKEY,LPHKEY);
111 LONG WINAPI RegConnectRegistryW(LPCWSTR,HKEY,LPHKEY);
112 #define RegConnectRegistry WINELIB_NAME_AW(RegConnectRegistry)
113 DWORD WINAPI RegEnumKeyExA(HKEY,DWORD,LPSTR,LPDWORD,LPDWORD,LPSTR,
114 LPDWORD,LPFILETIME);
115 DWORD WINAPI RegEnumKeyExW(HKEY,DWORD,LPWSTR,LPDWORD,LPDWORD,LPWSTR,
116 LPDWORD,LPFILETIME);
117 #define RegEnumKeyEx WINELIB_NAME_AW(RegEnumKeyEx)
118 LONG WINAPI RegGetKeySecurity(HKEY,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR,LPDWORD);
119 LONG WINAPI RegLoadKeyA(HKEY,LPCSTR,LPCSTR);
120 LONG WINAPI RegLoadKeyW(HKEY,LPCWSTR,LPCWSTR);
121 #define RegLoadKey WINELIB_NAME_AW(RegLoadKey)
122 LONG WINAPI RegNotifyChangeKeyValue(HKEY,BOOL,DWORD,HANDLE,BOOL);
123 DWORD WINAPI RegOpenKeyExW(HKEY,LPCWSTR,DWORD,REGSAM,LPHKEY);
124 DWORD WINAPI RegOpenKeyExA(HKEY,LPCSTR,DWORD,REGSAM,LPHKEY);
125 #define RegOpenKeyEx WINELIB_NAME_AW(RegOpenKeyEx)
126 DWORD WINAPI RegQueryInfoKeyW(HKEY,LPWSTR,LPDWORD,LPDWORD,LPDWORD,
127 LPDWORD,LPDWORD,LPDWORD,LPDWORD,LPDWORD,
128 LPDWORD,LPFILETIME);
129 DWORD WINAPI RegQueryInfoKeyA(HKEY,LPSTR,LPDWORD,LPDWORD,LPDWORD,
130 LPDWORD,LPDWORD,LPDWORD,LPDWORD,LPDWORD,
131 LPDWORD,LPFILETIME);
132 #define RegQueryInfoKey WINELIB_NAME_AW(RegQueryInfoKey)
133 LONG WINAPI RegReplaceKeyA(HKEY,LPCSTR,LPCSTR,LPCSTR);
134 LONG WINAPI RegReplaceKeyW(HKEY,LPCWSTR,LPCWSTR,LPCWSTR);
135 #define RegReplaceKey WINELIB_NAME_AW(RegReplaceKey)
136 LONG WINAPI RegRestoreKeyA(HKEY,LPCSTR,DWORD);
137 LONG WINAPI RegRestoreKeyW(HKEY,LPCWSTR,DWORD);
138 #define RegRestoreKey WINELIB_NAME_AW(RegRestoreKey)
139 LONG WINAPI RegUnLoadKeyA(HKEY,LPCSTR);
140 LONG WINAPI RegUnLoadKeyW(HKEY,LPCWSTR);
141 #define RegUnLoadKey WINELIB_NAME_AW(RegUnLoadKey)
143 /* Declarations for functions that are the same in Win16 and Win32 */
145 DWORD WINAPI RegCloseKey(HKEY);
146 DWORD WINAPI RegFlushKey(HKEY);
148 DWORD WINAPI RegCreateKeyA(HKEY,LPCSTR,LPHKEY);
149 DWORD WINAPI RegCreateKeyW(HKEY,LPCWSTR,LPHKEY);
150 #define RegCreateKey WINELIB_NAME_AW(RegCreateKey)
151 DWORD WINAPI RegDeleteKeyA(HKEY,LPCSTR);
152 DWORD WINAPI RegDeleteKeyW(HKEY,LPCWSTR);
153 #define RegDeleteKey WINELIB_NAME_AW(RegDeleteKey)
154 DWORD WINAPI RegDeleteValueA(HKEY,LPCSTR);
155 DWORD WINAPI RegDeleteValueW(HKEY,LPCWSTR);
156 #define RegDeleteValue WINELIB_NAME_AW(RegDeleteValue)
157 DWORD WINAPI RegEnumKeyA(HKEY,DWORD,LPSTR,DWORD);
158 DWORD WINAPI RegEnumKeyW(HKEY,DWORD,LPWSTR,DWORD);
159 #define RegEnumKey WINELIB_NAME_AW(RegEnumKey)
160 DWORD WINAPI RegEnumValueA(HKEY,DWORD,LPSTR,LPDWORD,LPDWORD,LPDWORD,LPBYTE,LPDWORD);
161 DWORD WINAPI RegEnumValueW(HKEY,DWORD,LPWSTR,LPDWORD,LPDWORD,LPDWORD,LPBYTE,LPDWORD);
162 #define RegEnumValue WINELIB_NAME_AW(RegEnumValue)
163 DWORD WINAPI RegOpenKeyA(HKEY,LPCSTR,LPHKEY);
164 DWORD WINAPI RegOpenKeyW(HKEY,LPCWSTR,LPHKEY);
165 #define RegOpenKey WINELIB_NAME_AW(RegOpenKey)
166 DWORD WINAPI RegQueryValueA(HKEY,LPCSTR,LPSTR,LPLONG);
167 DWORD WINAPI RegQueryValueW(HKEY,LPCWSTR,LPWSTR,LPLONG);
168 #define RegQueryValue WINELIB_NAME_AW(RegQueryValue)
169 DWORD WINAPI RegQueryValueExA(HKEY,LPCSTR,LPDWORD,LPDWORD,LPBYTE,LPDWORD);
170 DWORD WINAPI RegQueryValueExW(HKEY,LPCWSTR,LPDWORD,LPDWORD,LPBYTE,LPDWORD);
171 #define RegQueryValueEx WINELIB_NAME_AW(RegQueryValueEx)
172 DWORD WINAPI RegSetValueA(HKEY,LPCSTR,DWORD,LPCSTR,DWORD);
173 DWORD WINAPI RegSetValueW(HKEY,LPCWSTR,DWORD,LPCWSTR,DWORD);
174 #define RegSetValue WINELIB_NAME_AW(RegSetValue)
175 DWORD WINAPI RegSetValueExA(HKEY,LPCSTR,DWORD,DWORD,CONST BYTE*,DWORD);
176 DWORD WINAPI RegSetValueExW(HKEY,LPCWSTR,DWORD,DWORD,CONST BYTE*,DWORD);
177 #define RegSetValueEx WINELIB_NAME_AW(RegSetValueEx)
179 #ifdef __cplusplus
180 } /* extern "C" */
181 #endif /* defined(__cplusplus) */
183 #endif /* __WINE_WINREG_H */