Added LGPL standard comment, and copyright notices where necessary.
[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 #include "winbase.h"
25 #include "winnt.h"
26
27 #ifdef __cplusplus
28 extern "C" {
29 #endif /* defined(__cplusplus) */
30
31 #define HKEY_CLASSES_ROOT       ((HKEY) 0x80000000)
32 #define HKEY_CURRENT_USER       ((HKEY) 0x80000001)
33 #define HKEY_LOCAL_MACHINE      ((HKEY) 0x80000002)
34 #define HKEY_USERS              ((HKEY) 0x80000003)
35 #define HKEY_PERFORMANCE_DATA   ((HKEY) 0x80000004)
36 #define HKEY_CURRENT_CONFIG     ((HKEY) 0x80000005)
37 #define HKEY_DYN_DATA           ((HKEY) 0x80000006)
38
39 /*
40  *      registry provider structs
41  */
42 typedef struct value_entA 
43 {   LPSTR       ve_valuename;
44     DWORD       ve_valuelen;
45     DWORD_PTR   ve_valueptr;
46     DWORD       ve_type;
47 } VALENTA, *PVALENTA;
48
49 typedef struct value_entW {
50     LPWSTR      ve_valuename;
51     DWORD       ve_valuelen;
52     DWORD_PTR   ve_valueptr;
53     DWORD       ve_type;
54 } VALENTW, *PVALENTW;
55
56 typedef ACCESS_MASK REGSAM;
57
58 DWORD       WINAPI RegCreateKeyExA(HKEY,LPCSTR,DWORD,LPSTR,DWORD,REGSAM,
59                                      LPSECURITY_ATTRIBUTES,LPHKEY,LPDWORD);
60 DWORD       WINAPI RegCreateKeyExW(HKEY,LPCWSTR,DWORD,LPWSTR,DWORD,REGSAM,
61                                      LPSECURITY_ATTRIBUTES,LPHKEY,LPDWORD);
62 #define     RegCreateKeyEx WINELIB_NAME_AW(RegCreateKeyEx)
63 LONG        WINAPI RegSaveKeyA(HKEY,LPCSTR,LPSECURITY_ATTRIBUTES);
64 LONG        WINAPI RegSaveKeyW(HKEY,LPCWSTR,LPSECURITY_ATTRIBUTES);
65 #define     RegSaveKey WINELIB_NAME_AW(RegSaveKey)
66 LONG        WINAPI RegSetKeySecurity(HKEY,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR);
67 LONG        WINAPI RegConnectRegistryA(LPCSTR,HKEY,LPHKEY);
68 LONG        WINAPI RegConnectRegistryW(LPCWSTR,HKEY,LPHKEY);
69 #define     RegConnectRegistry WINELIB_NAME_AW(RegConnectRegistry)
70 DWORD       WINAPI RegEnumKeyExA(HKEY,DWORD,LPSTR,LPDWORD,LPDWORD,LPSTR,
71                                    LPDWORD,LPFILETIME);
72 DWORD       WINAPI RegEnumKeyExW(HKEY,DWORD,LPWSTR,LPDWORD,LPDWORD,LPWSTR,
73                                    LPDWORD,LPFILETIME);
74 #define     RegEnumKeyEx WINELIB_NAME_AW(RegEnumKeyEx)
75 LONG        WINAPI RegGetKeySecurity(HKEY,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR,LPDWORD);
76 LONG        WINAPI RegLoadKeyA(HKEY,LPCSTR,LPCSTR);
77 LONG        WINAPI RegLoadKeyW(HKEY,LPCWSTR,LPCWSTR);
78 #define     RegLoadKey WINELIB_NAME_AW(RegLoadKey)
79 LONG        WINAPI RegNotifyChangeKeyValue(HKEY,BOOL,DWORD,HANDLE,BOOL);
80 DWORD       WINAPI RegOpenKeyExW(HKEY,LPCWSTR,DWORD,REGSAM,LPHKEY);
81 DWORD       WINAPI RegOpenKeyExA(HKEY,LPCSTR,DWORD,REGSAM,LPHKEY);
82 #define     RegOpenKeyEx WINELIB_NAME_AW(RegOpenKeyEx)
83 DWORD       WINAPI RegQueryInfoKeyW(HKEY,LPWSTR,LPDWORD,LPDWORD,LPDWORD,
84                                       LPDWORD,LPDWORD,LPDWORD,LPDWORD,LPDWORD,
85                                       LPDWORD,LPFILETIME);
86 DWORD       WINAPI RegQueryInfoKeyA(HKEY,LPSTR,LPDWORD,LPDWORD,LPDWORD,
87                                       LPDWORD,LPDWORD,LPDWORD,LPDWORD,LPDWORD,
88                                       LPDWORD,LPFILETIME);
89 #define     RegQueryInfoKey WINELIB_NAME_AW(RegQueryInfoKey)
90 LONG        WINAPI RegReplaceKeyA(HKEY,LPCSTR,LPCSTR,LPCSTR);
91 LONG        WINAPI RegReplaceKeyW(HKEY,LPCWSTR,LPCWSTR,LPCWSTR);
92 #define     RegReplaceKey WINELIB_NAME_AW(RegReplaceKey)
93 LONG        WINAPI RegRestoreKeyA(HKEY,LPCSTR,DWORD);
94 LONG        WINAPI RegRestoreKeyW(HKEY,LPCWSTR,DWORD);
95 #define     RegRestoreKey WINELIB_NAME_AW(RegRestoreKey)
96 LONG        WINAPI RegUnLoadKeyA(HKEY,LPCSTR);
97 LONG        WINAPI RegUnLoadKeyW(HKEY,LPCWSTR);
98 #define     RegUnLoadKey WINELIB_NAME_AW(RegUnLoadKey)
99
100 /* Declarations for functions that are the same in Win16 and Win32 */
101
102 DWORD       WINAPI RegCloseKey(HKEY);
103 DWORD       WINAPI RegFlushKey(HKEY);
104
105 DWORD       WINAPI RegCreateKeyA(HKEY,LPCSTR,LPHKEY);
106 DWORD       WINAPI RegCreateKeyW(HKEY,LPCWSTR,LPHKEY);
107 #define     RegCreateKey WINELIB_NAME_AW(RegCreateKey)
108 DWORD       WINAPI RegDeleteKeyA(HKEY,LPCSTR);
109 DWORD       WINAPI RegDeleteKeyW(HKEY,LPCWSTR);
110 #define     RegDeleteKey WINELIB_NAME_AW(RegDeleteKey)
111 DWORD       WINAPI RegDeleteValueA(HKEY,LPCSTR);
112 DWORD       WINAPI RegDeleteValueW(HKEY,LPCWSTR);
113 #define     RegDeleteValue WINELIB_NAME_AW(RegDeleteValue)
114 DWORD       WINAPI RegEnumKeyA(HKEY,DWORD,LPSTR,DWORD);
115 DWORD       WINAPI RegEnumKeyW(HKEY,DWORD,LPWSTR,DWORD);
116 #define     RegEnumKey WINELIB_NAME_AW(RegEnumKey)
117 DWORD       WINAPI RegEnumValueA(HKEY,DWORD,LPSTR,LPDWORD,LPDWORD,LPDWORD,LPBYTE,LPDWORD);
118 DWORD       WINAPI RegEnumValueW(HKEY,DWORD,LPWSTR,LPDWORD,LPDWORD,LPDWORD,LPBYTE,LPDWORD);
119 #define     RegEnumValue WINELIB_NAME_AW(RegEnumValue)
120 DWORD       WINAPI RegOpenKeyA(HKEY,LPCSTR,LPHKEY);
121 DWORD       WINAPI RegOpenKeyW(HKEY,LPCWSTR,LPHKEY);
122 #define     RegOpenKey WINELIB_NAME_AW(RegOpenKey)
123 DWORD       WINAPI RegQueryValueA(HKEY,LPCSTR,LPSTR,LPLONG);
124 DWORD       WINAPI RegQueryValueW(HKEY,LPCWSTR,LPWSTR,LPLONG);
125 #define     RegQueryValue WINELIB_NAME_AW(RegQueryValue)
126 DWORD       WINAPI RegQueryValueExA(HKEY,LPCSTR,LPDWORD,LPDWORD,LPBYTE,LPDWORD);
127 DWORD       WINAPI RegQueryValueExW(HKEY,LPCWSTR,LPDWORD,LPDWORD,LPBYTE,LPDWORD);
128 #define     RegQueryValueEx WINELIB_NAME_AW(RegQueryValueEx)
129 DWORD       WINAPI RegSetValueA(HKEY,LPCSTR,DWORD,LPCSTR,DWORD);
130 DWORD       WINAPI RegSetValueW(HKEY,LPCWSTR,DWORD,LPCWSTR,DWORD);
131 #define     RegSetValue WINELIB_NAME_AW(RegSetValue)
132 DWORD       WINAPI RegSetValueExA(HKEY,LPCSTR,DWORD,DWORD,CONST BYTE*,DWORD);
133 DWORD       WINAPI RegSetValueExW(HKEY,LPCWSTR,DWORD,DWORD,CONST BYTE*,DWORD);
134 #define     RegSetValueEx WINELIB_NAME_AW(RegSetValueEx)
135
136 #ifdef __cplusplus
137 } /* extern "C" */
138 #endif /* defined(__cplusplus) */
139
140 #endif  /* __WINE_WINREG_H */