Store a relative pointer for registry entry points to avoid some text
[wine] / include / winreg.h
1 /*
2  * Win32 registry defines (see also winnt.h)
3  *
4  * Copyright (C) the Wine project
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19  */
20
21 #ifndef __WINE_WINREG_H
22 #define __WINE_WINREG_H
23
24 #ifdef __cplusplus
25 extern "C" {
26 #endif /* defined(__cplusplus) */
27
28 #define HKEY_CLASSES_ROOT       ((HKEY) 0x80000000)
29 #define HKEY_CURRENT_USER       ((HKEY) 0x80000001)
30 #define HKEY_LOCAL_MACHINE      ((HKEY) 0x80000002)
31 #define HKEY_USERS              ((HKEY) 0x80000003)
32 #define HKEY_PERFORMANCE_DATA   ((HKEY) 0x80000004)
33 #define HKEY_CURRENT_CONFIG     ((HKEY) 0x80000005)
34 #define HKEY_DYN_DATA           ((HKEY) 0x80000006)
35
36 /*
37  *      registry provider structs
38  */
39 typedef struct value_entA
40 {   LPSTR       ve_valuename;
41     DWORD       ve_valuelen;
42     DWORD_PTR   ve_valueptr;
43     DWORD       ve_type;
44 } VALENTA, *PVALENTA;
45
46 typedef struct value_entW {
47     LPWSTR      ve_valuename;
48     DWORD       ve_valuelen;
49     DWORD_PTR   ve_valueptr;
50     DWORD       ve_type;
51 } VALENTW, *PVALENTW;
52
53 typedef ACCESS_MASK REGSAM;
54
55 /*
56  * InitiateSystemShutdown() reasons
57  */
58 #include <reason.h>
59
60 #define REASON_OTHER            (SHTDN_REASON_MAJOR_OTHER | SHTDN_REASON_MINOR_OTHER)
61 #define REASON_UNKNOWN          SHTDN_REASON_UNKNOWN
62 #define REASON_LEGACY_API       SHTDN_REASON_LEGACY_API
63 #define REASON_PLANNED_FLAG     SHTDN_REASON_FLAG_PLANNED
64
65 #define MAX_SHUTDOWN_TIMEOUT    (10*365*24*60*60)
66
67
68 BOOL        WINAPI AbortSystemShutdownA(LPSTR);
69 BOOL        WINAPI AbortSystemShutdownW(LPWSTR);
70 #define     AbortSystemShutdown WINELIB_NAME_AW(AbortSystemShutdown)
71 BOOL        WINAPI InitiateSystemShutdownA(LPSTR,LPSTR,DWORD,BOOL,BOOL);
72 BOOL        WINAPI InitiateSystemShutdownW(LPWSTR,LPWSTR,DWORD,BOOL,BOOL);
73 #define     InitiateSystemShutdown WINELIB_NAME_AW(InitiateSystemShutdown);
74 BOOL        WINAPI InitiateSystemShutdownExA(LPSTR,LPSTR,DWORD,BOOL,BOOL,DWORD);
75 BOOL        WINAPI InitiateSystemShutdownExW(LPWSTR,LPWSTR,DWORD,BOOL,BOOL,DWORD);
76 #define     InitiateSystemShutdownEx WINELIB_NAME_AW(InitiateSystemShutdownEx);
77 DWORD       WINAPI RegCreateKeyExA(HKEY,LPCSTR,DWORD,LPCSTR,DWORD,REGSAM,
78                                      LPSECURITY_ATTRIBUTES,PHKEY,LPDWORD);
79 DWORD       WINAPI RegCreateKeyExW(HKEY,LPCWSTR,DWORD,LPCWSTR,DWORD,REGSAM,
80                                      LPSECURITY_ATTRIBUTES,PHKEY,LPDWORD);
81 #define     RegCreateKeyEx WINELIB_NAME_AW(RegCreateKeyEx)
82 LONG        WINAPI RegSaveKeyA(HKEY,LPCSTR,LPSECURITY_ATTRIBUTES);
83 LONG        WINAPI RegSaveKeyW(HKEY,LPCWSTR,LPSECURITY_ATTRIBUTES);
84 #define     RegSaveKey WINELIB_NAME_AW(RegSaveKey)
85 LONG        WINAPI RegSetKeySecurity(HKEY,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR);
86 LONG        WINAPI RegConnectRegistryA(LPCSTR,HKEY,PHKEY);
87 LONG        WINAPI RegConnectRegistryW(LPCWSTR,HKEY,PHKEY);
88 #define     RegConnectRegistry WINELIB_NAME_AW(RegConnectRegistry)
89 DWORD       WINAPI RegEnumKeyExA(HKEY,DWORD,LPSTR,LPDWORD,LPDWORD,LPSTR,
90                                    LPDWORD,LPFILETIME);
91 DWORD       WINAPI RegEnumKeyExW(HKEY,DWORD,LPWSTR,LPDWORD,LPDWORD,LPWSTR,
92                                    LPDWORD,LPFILETIME);
93 #define     RegEnumKeyEx WINELIB_NAME_AW(RegEnumKeyEx)
94 LONG        WINAPI RegGetKeySecurity(HKEY,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR,LPDWORD);
95 LONG        WINAPI RegLoadKeyA(HKEY,LPCSTR,LPCSTR);
96 LONG        WINAPI RegLoadKeyW(HKEY,LPCWSTR,LPCWSTR);
97 #define     RegLoadKey WINELIB_NAME_AW(RegLoadKey)
98 LONG        WINAPI RegNotifyChangeKeyValue(HKEY,BOOL,DWORD,HANDLE,BOOL);
99 DWORD       WINAPI RegOpenCurrentUser(REGSAM,PHKEY);
100 DWORD       WINAPI RegOpenKeyExW(HKEY,LPCWSTR,DWORD,REGSAM,PHKEY);
101 DWORD       WINAPI RegOpenKeyExA(HKEY,LPCSTR,DWORD,REGSAM,PHKEY);
102 #define     RegOpenKeyEx WINELIB_NAME_AW(RegOpenKeyEx)
103 LONG        WINAPI RegOpenUserClassesRoot(HANDLE,DWORD,REGSAM,PHKEY);
104 DWORD       WINAPI RegQueryInfoKeyW(HKEY,LPWSTR,LPDWORD,LPDWORD,LPDWORD,
105                                       LPDWORD,LPDWORD,LPDWORD,LPDWORD,LPDWORD,
106                                       LPDWORD,LPFILETIME);
107 DWORD       WINAPI RegQueryInfoKeyA(HKEY,LPSTR,LPDWORD,LPDWORD,LPDWORD,
108                                       LPDWORD,LPDWORD,LPDWORD,LPDWORD,LPDWORD,
109                                       LPDWORD,LPFILETIME);
110 #define     RegQueryInfoKey WINELIB_NAME_AW(RegQueryInfoKey)
111 DWORD       WINAPI RegQueryMultipleValuesA(HKEY,PVALENTA,DWORD,LPSTR,LPDWORD);
112 DWORD       WINAPI RegQueryMultipleValuesW(HKEY,PVALENTW,DWORD,LPWSTR,LPDWORD);
113 #define     RegQueryMultipleValues WINELIB_NAME_AW(RegQueryMultipleValues)
114 LONG        WINAPI RegReplaceKeyA(HKEY,LPCSTR,LPCSTR,LPCSTR);
115 LONG        WINAPI RegReplaceKeyW(HKEY,LPCWSTR,LPCWSTR,LPCWSTR);
116 #define     RegReplaceKey WINELIB_NAME_AW(RegReplaceKey)
117 LONG        WINAPI RegRestoreKeyA(HKEY,LPCSTR,DWORD);
118 LONG        WINAPI RegRestoreKeyW(HKEY,LPCWSTR,DWORD);
119 #define     RegRestoreKey WINELIB_NAME_AW(RegRestoreKey)
120 LONG        WINAPI RegUnLoadKeyA(HKEY,LPCSTR);
121 LONG        WINAPI RegUnLoadKeyW(HKEY,LPCWSTR);
122 #define     RegUnLoadKey WINELIB_NAME_AW(RegUnLoadKey)
123
124 /* Declarations for functions that are the same in Win16 and Win32 */
125
126 DWORD       WINAPI RegCloseKey(HKEY);
127 DWORD       WINAPI RegFlushKey(HKEY);
128
129 DWORD       WINAPI RegCreateKeyA(HKEY,LPCSTR,PHKEY);
130 DWORD       WINAPI RegCreateKeyW(HKEY,LPCWSTR,PHKEY);
131 #define     RegCreateKey WINELIB_NAME_AW(RegCreateKey)
132 DWORD       WINAPI RegDeleteKeyA(HKEY,LPCSTR);
133 DWORD       WINAPI RegDeleteKeyW(HKEY,LPCWSTR);
134 #define     RegDeleteKey WINELIB_NAME_AW(RegDeleteKey)
135 DWORD       WINAPI RegDeleteValueA(HKEY,LPCSTR);
136 DWORD       WINAPI RegDeleteValueW(HKEY,LPCWSTR);
137 #define     RegDeleteValue WINELIB_NAME_AW(RegDeleteValue)
138 DWORD       WINAPI RegEnumKeyA(HKEY,DWORD,LPSTR,DWORD);
139 DWORD       WINAPI RegEnumKeyW(HKEY,DWORD,LPWSTR,DWORD);
140 #define     RegEnumKey WINELIB_NAME_AW(RegEnumKey)
141 DWORD       WINAPI RegEnumValueA(HKEY,DWORD,LPSTR,LPDWORD,LPDWORD,LPDWORD,LPBYTE,LPDWORD);
142 DWORD       WINAPI RegEnumValueW(HKEY,DWORD,LPWSTR,LPDWORD,LPDWORD,LPDWORD,LPBYTE,LPDWORD);
143 #define     RegEnumValue WINELIB_NAME_AW(RegEnumValue)
144 DWORD       WINAPI RegOpenKeyA(HKEY,LPCSTR,PHKEY);
145 DWORD       WINAPI RegOpenKeyW(HKEY,LPCWSTR,PHKEY);
146 #define     RegOpenKey WINELIB_NAME_AW(RegOpenKey)
147 DWORD       WINAPI RegQueryValueA(HKEY,LPCSTR,LPSTR,LPLONG);
148 DWORD       WINAPI RegQueryValueW(HKEY,LPCWSTR,LPWSTR,LPLONG);
149 #define     RegQueryValue WINELIB_NAME_AW(RegQueryValue)
150 DWORD       WINAPI RegQueryValueExA(HKEY,LPCSTR,LPDWORD,LPDWORD,LPBYTE,LPDWORD);
151 DWORD       WINAPI RegQueryValueExW(HKEY,LPCWSTR,LPDWORD,LPDWORD,LPBYTE,LPDWORD);
152 #define     RegQueryValueEx WINELIB_NAME_AW(RegQueryValueEx)
153 DWORD       WINAPI RegSetValueA(HKEY,LPCSTR,DWORD,LPCSTR,DWORD);
154 DWORD       WINAPI RegSetValueW(HKEY,LPCWSTR,DWORD,LPCWSTR,DWORD);
155 #define     RegSetValue WINELIB_NAME_AW(RegSetValue)
156 DWORD       WINAPI RegSetValueExA(HKEY,LPCSTR,DWORD,DWORD,CONST BYTE*,DWORD);
157 DWORD       WINAPI RegSetValueExW(HKEY,LPCWSTR,DWORD,DWORD,CONST BYTE*,DWORD);
158 #define     RegSetValueEx WINELIB_NAME_AW(RegSetValueEx)
159
160 #ifdef __cplusplus
161 } /* extern "C" */
162 #endif /* defined(__cplusplus) */
163
164 #endif  /* __WINE_WINREG_H */