source: trunk/include/win/winreg.h@ 5200

Last change on this file since 5200 was 5148, checked in by sandervl, 25 years ago

YD: header changes for compiling opera

File size: 9.3 KB
Line 
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/*
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
20*/
21
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
35
36#define HEX_REG_NONE 0x80000000
37#define HEX_REG_SZ 0x80000001
38#define HEX_REG_EXPAND_SZ 0x80000002
39#define HEX_REG_BINARY 0x80000003
40#define HEX_REG_DWORD 0x80000004
41#define HEX_REG_DWORD_LITTLE_ENDIAN 0x80000004
42#define HEX_REG_DWORD_BIG_ENDIAN 0x80000005
43#define HEX_REG_LINK 0x80000006
44#define HEX_REG_MULTI_SZ 0x80000007
45#define HEX_REG_RESOURCE_LIST 0x80000008
46#define HEX_REG_FULL_RESOURCE_DESCRIPTOR 0x80000009
47
48#define HKEY_CLASSES_ROOT ((HKEY) 0x80000000)
49#define HKEY_CURRENT_USER ((HKEY) 0x80000001)
50#define HKEY_LOCAL_MACHINE ((HKEY) 0x80000002)
51#define HKEY_USERS ((HKEY) 0x80000003)
52#define HKEY_PERFORMANCE_DATA ((HKEY) 0x80000004)
53#define HKEY_CURRENT_CONFIG ((HKEY) 0x80000005)
54#define HKEY_DYN_DATA ((HKEY) 0x80000006)
55
56#define REG_OPTION_RESERVED 0x00000000
57#define REG_OPTION_NON_VOLATILE 0x00000000
58#define REG_OPTION_VOLATILE 0x00000001
59#define REG_OPTION_CREATE_LINK 0x00000002
60#define REG_OPTION_BACKUP_RESTORE 0x00000004 /* FIXME */
61#define REG_OPTION_TAINTED 0x80000000 /* Internal? */
62
63#define REG_CREATED_NEW_KEY 0x00000001
64#define REG_OPENED_EXISTING_KEY 0x00000002
65
66/* For RegNotifyChangeKeyValue */
67#define REG_NOTIFY_CHANGE_NAME 0x1
68
69#define KEY_QUERY_VALUE 0x00000001
70#define KEY_SET_VALUE 0x00000002
71#define KEY_CREATE_SUB_KEY 0x00000004
72#define KEY_ENUMERATE_SUB_KEYS 0x00000008
73#define KEY_NOTIFY 0x00000010
74#define KEY_CREATE_LINK 0x00000020
75
76#define KEY_READ (STANDARD_RIGHTS_READ| \
77 KEY_QUERY_VALUE| \
78 KEY_ENUMERATE_SUB_KEYS|\
79 KEY_NOTIFY \
80 )
81#define KEY_WRITE (STANDARD_RIGHTS_WRITE| \
82 KEY_SET_VALUE| \
83 KEY_CREATE_SUB_KEY \
84 )
85#define KEY_EXECUTE KEY_READ
86#define KEY_ALL_ACCESS (STANDARD_RIGHTS_ALL| \
87 KEY_READ|KEY_WRITE| \
88 KEY_CREATE_LINK \
89 )
90
91/* fixme: move it to basetsd.h */
92typedef ULONG_PTR DWORD_PTR, *PDWORD_PTR;
93/* end fixme */
94
95/*
96 * registry provider structs
97 */
98typedef struct value_entA
99{ LPSTR ve_valuename;
100 DWORD ve_valuelen;
101 DWORD_PTR ve_valueptr;
102 DWORD ve_type;
103} VALENTA, *PVALENTA;
104
105typedef struct value_entW {
106 LPWSTR ve_valuename;
107 DWORD ve_valuelen;
108 DWORD_PTR ve_valueptr;
109 DWORD ve_type;
110} VALENTW, *PVALENTW;
111
112BOOL WINAPI LookupPrivilegeValueA(LPCSTR,LPCSTR,LPVOID);
113BOOL WINAPI LookupPrivilegeValueW(LPCWSTR,LPCWSTR,LPVOID);
114#define LookupPrivilegeValue WINELIB_NAME_AW(LookupPrivilegeValue)
115HANDLE WINAPI RegisterEventSourceA(LPCSTR,LPCSTR);
116HANDLE WINAPI RegisterEventSourceW(LPCWSTR,LPCWSTR);
117#define RegisterEventSource WINELIB_NAME_AW(RegisterEventSource)
118LONG WINAPI RegCreateKeyExA(HKEY,LPCSTR,DWORD,LPSTR,DWORD,REGSAM,
119 LPSECURITY_ATTRIBUTES,LPHKEY,LPDWORD);
120LONG WINAPI RegCreateKeyExW(HKEY,LPCWSTR,DWORD,LPWSTR,DWORD,REGSAM,
121 LPSECURITY_ATTRIBUTES,LPHKEY,LPDWORD);
122#define RegCreateKeyEx WINELIB_NAME_AW(RegCreateKeyEx)
123LONG WINAPI RegSaveKeyA(HKEY,LPCSTR,LPSECURITY_ATTRIBUTES);
124LONG WINAPI RegSaveKeyW(HKEY,LPCWSTR,LPSECURITY_ATTRIBUTES);
125#define RegSaveKey WINELIB_NAME_AW(RegSaveKey)
126LONG WINAPI RegSetKeySecurity(HKEY,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR);
127BOOL WINAPI DeregisterEventSource(HANDLE);
128BOOL WINAPI GetFileSecurityA(LPCSTR,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR,DWORD,LPDWORD);
129BOOL WINAPI GetFileSecurityW(LPCWSTR,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR,DWORD,LPDWORD);
130#define GetFileSecurity WINELIB_NAME_AW(GetFileSecurity)
131BOOL WINAPI GetUserNameA(LPSTR,LPDWORD);
132BOOL WINAPI GetUserNameW(LPWSTR,LPDWORD);
133#define GetUserName WINELIB_NAME_AW(GetUserName)
134BOOL WINAPI OpenProcessToken(HANDLE,DWORD,HANDLE*);
135LONG WINAPI RegConnectRegistryA(LPCSTR,HKEY,LPHKEY);
136LONG WINAPI RegConnectRegistryW(LPCWSTR,HKEY,LPHKEY);
137#define RegConnectRegistry WINELIB_NAME_AW(RegConnectRegistry)
138LONG WINAPI RegEnumKeyExA(HKEY,DWORD,LPSTR,LPDWORD,LPDWORD,LPSTR,
139 LPDWORD,LPFILETIME);
140LONG WINAPI RegEnumKeyExW(HKEY,DWORD,LPWSTR,LPDWORD,LPDWORD,LPWSTR,
141 LPDWORD,LPFILETIME);
142#define RegEnumKeyEx WINELIB_NAME_AW(RegEnumKeyEx)
143LONG WINAPI RegGetKeySecurity(HKEY,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR,LPDWORD);
144LONG WINAPI RegLoadKeyA(HKEY,LPCSTR,LPCSTR);
145LONG WINAPI RegLoadKeyW(HKEY,LPCWSTR,LPCWSTR);
146#define RegLoadKey WINELIB_NAME_AW(RegLoadKey)
147LONG WINAPI RegNotifyChangeKeyValue(HKEY,BOOL,DWORD,HANDLE,BOOL);
148LONG WINAPI RegOpenKeyExW(HKEY,LPCWSTR,DWORD,REGSAM,LPHKEY);
149LONG WINAPI RegOpenKeyExA(HKEY,LPCSTR,DWORD,REGSAM,LPHKEY);
150#define RegOpenKeyEx WINELIB_NAME_AW(RegOpenKeyEx)
151LONG WINAPI RegQueryInfoKeyW(HKEY,LPWSTR,LPDWORD,LPDWORD,LPDWORD,
152 LPDWORD,LPDWORD,LPDWORD,LPDWORD,LPDWORD,
153 LPDWORD,LPFILETIME);
154LONG WINAPI RegQueryInfoKeyA(HKEY,LPSTR,LPDWORD,LPDWORD,LPDWORD,
155 LPDWORD,LPDWORD,LPDWORD,LPDWORD,LPDWORD,
156 LPDWORD,LPFILETIME);
157#define RegQueryInfoKey WINELIB_NAME_AW(RegQueryInfoKey)
158LONG WINAPI RegReplaceKeyA(HKEY,LPCSTR,LPCSTR,LPCSTR);
159LONG WINAPI RegReplaceKeyW(HKEY,LPCWSTR,LPCWSTR,LPCWSTR);
160#define RegReplaceKey WINELIB_NAME_AW(RegReplaceKey)
161LONG WINAPI RegRestoreKeyA(HKEY,LPCSTR,DWORD);
162LONG WINAPI RegRestoreKeyW(HKEY,LPCWSTR,DWORD);
163#define RegRestoreKey WINELIB_NAME_AW(RegRestoreKey)
164LONG WINAPI RegUnLoadKeyA(HKEY,LPCSTR);
165LONG WINAPI RegUnLoadKeyW(HKEY,LPCWSTR);
166#define RegUnLoadKey WINELIB_NAME_AW(RegUnLoadKey)
167BOOL WINAPI SetFileSecurityA(LPCSTR,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR);
168BOOL WINAPI SetFileSecurityW(LPCWSTR,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR);
169#define SetFileSecurity WINELIB_NAME_AW(SetFileSecurity)
170
171/* Declarations for functions that are the same in Win16 and Win32 */
172
173LONG WINAPI RegCloseKey(HKEY);
174LONG WINAPI RegFlushKey(HKEY);
175
176LONG WINAPI RegCreateKeyA(HKEY,LPCSTR,LPHKEY);
177LONG WINAPI RegCreateKeyW(HKEY,LPCWSTR,LPHKEY);
178#define RegCreateKey WINELIB_NAME_AW(RegCreateKey)
179LONG WINAPI RegDeleteKeyA(HKEY,LPCSTR);
180LONG WINAPI RegDeleteKeyW(HKEY,LPWSTR);
181#define RegDeleteKey WINELIB_NAME_AW(RegDeleteKey)
182LONG WINAPI RegDeleteValueA(HKEY,LPSTR);
183LONG WINAPI RegDeleteValueW(HKEY,LPWSTR);
184#define RegDeleteValue WINELIB_NAME_AW(RegDeleteValue)
185LONG WINAPI RegEnumKeyA(HKEY,DWORD,LPSTR,DWORD);
186LONG WINAPI RegEnumKeyW(HKEY,DWORD,LPWSTR,DWORD);
187#define RegEnumKey WINELIB_NAME_AW(RegEnumKey)
188LONG WINAPI RegEnumValueA(HKEY,DWORD,LPSTR,LPDWORD,LPDWORD,LPDWORD,LPBYTE,LPDWORD);
189LONG WINAPI RegEnumValueW(HKEY,DWORD,LPWSTR,LPDWORD,LPDWORD,LPDWORD,LPBYTE,LPDWORD);
190#define RegEnumValue WINELIB_NAME_AW(RegEnumValue)
191LONG WINAPI RegOpenKeyA(HKEY,LPCSTR,LPHKEY);
192LONG WINAPI RegOpenKeyW(HKEY,LPCWSTR,LPHKEY);
193#define RegOpenKey WINELIB_NAME_AW(RegOpenKey)
194LONG WINAPI RegQueryValueA(HKEY,LPCSTR,LPSTR,LPLONG);
195LONG WINAPI RegQueryValueW(HKEY,LPCWSTR,LPWSTR,LPLONG);
196#define RegQueryValue WINELIB_NAME_AW(RegQueryValue)
197LONG WINAPI RegQueryValueExA(HKEY,LPSTR,LPDWORD,LPDWORD,LPBYTE,LPDWORD);
198LONG WINAPI RegQueryValueExW(HKEY,LPWSTR,LPDWORD,LPDWORD,LPBYTE,LPDWORD);
199#define RegQueryValueEx WINELIB_NAME_AW(RegQueryValueEx)
200LONG WINAPI RegSetValueA(HKEY,LPCSTR,DWORD,LPCSTR,DWORD);
201LONG WINAPI RegSetValueW(HKEY,LPCWSTR,DWORD,LPCWSTR,DWORD);
202#define RegSetValue WINELIB_NAME_AW(RegSetValue)
203LONG WINAPI RegSetValueExA(HKEY,LPCSTR,DWORD,DWORD,LPBYTE,DWORD);
204LONG WINAPI RegSetValueExW(HKEY,LPCWSTR,DWORD,DWORD,LPBYTE,DWORD);
205#define RegSetValueEx WINELIB_NAME_AW(RegSetValueEx)
206
207#endif /* __WINE_WINREG_H */
Note: See TracBrowser for help on using the repository browser.