Initial bulk commit for "Git on MSys"
[msysgit/historical-msysgit.git] / mingw / include / winreg.h
blob0e5fbf118664c37e8178baa2cb06910fb4fbed9c
1 #ifndef _WINREG_H
2 #define _WINREG_H
3 #if __GNUC__ >= 3
4 #pragma GCC system_header
5 #endif
7 #ifndef WINADVAPI
8 #define WINADVAPI
9 #endif
11 #ifdef __cplusplus
12 extern "C" {
13 #endif
14 #define HKEY_CLASSES_ROOT ((HKEY)0x80000000)
15 #define HKEY_CURRENT_USER ((HKEY)0x80000001)
16 #define HKEY_LOCAL_MACHINE ((HKEY)0x80000002)
17 #define HKEY_USERS ((HKEY)0x80000003)
18 #define HKEY_PERFORMANCE_DATA ((HKEY)0x80000004)
19 #define HKEY_CURRENT_CONFIG ((HKEY)0x80000005)
20 #define HKEY_DYN_DATA ((HKEY)0x80000006)
21 #define REG_OPTION_VOLATILE 1
22 #define REG_OPTION_NON_VOLATILE 0
23 #define REG_CREATED_NEW_KEY 1
24 #define REG_OPENED_EXISTING_KEY 2
25 #define REG_NONE 0
26 #define REG_SZ 1
27 #define REG_EXPAND_SZ 2
28 #define REG_BINARY 3
29 #define REG_DWORD_LITTLE_ENDIAN 4
30 #define REG_DWORD 4
31 #define REG_DWORD_BIG_ENDIAN 5
32 #define REG_LINK 6
33 #define REG_MULTI_SZ 7
34 #define REG_RESOURCE_LIST 8
35 #define REG_FULL_RESOURCE_DESCRIPTOR 9
36 #define REG_RESOURCE_REQUIREMENTS_LIST 10
37 #define REG_QWORD_LITTLE_ENDIAN 11
38 #define REG_QWORD 11
39 #define REG_NOTIFY_CHANGE_NAME 1
40 #define REG_NOTIFY_CHANGE_ATTRIBUTES 2
41 #define REG_NOTIFY_CHANGE_LAST_SET 4
42 #define REG_NOTIFY_CHANGE_SECURITY 8
44 #if (WINVER >= 0x0502)
45 #define KEY_WOW64_32KEY 0x0200
46 #define KEY_WOW64_64KEY 0x0100
47 #endif
49 #ifndef RC_INVOKED
50 typedef ACCESS_MASK REGSAM;
51 typedef struct value_entA {
52 LPSTR ve_valuename;
53 DWORD ve_valuelen;
54 DWORD ve_valueptr;
55 DWORD ve_type;
56 } VALENTA,*PVALENTA;
57 typedef struct value_entW {
58 LPWSTR ve_valuename;
59 DWORD ve_valuelen;
60 DWORD ve_valueptr;
61 DWORD ve_type;
62 } VALENTW,*PVALENTW;
63 WINADVAPI BOOL WINAPI AbortSystemShutdownA(LPCSTR);
64 WINADVAPI BOOL WINAPI AbortSystemShutdownW(LPCWSTR);
65 WINADVAPI BOOL WINAPI InitiateSystemShutdownA(LPSTR,LPSTR,DWORD,BOOL,BOOL);
66 WINADVAPI BOOL WINAPI InitiateSystemShutdownW(LPWSTR,LPWSTR,DWORD,BOOL,BOOL);
67 WINADVAPI LONG WINAPI RegCloseKey(HKEY);
68 WINADVAPI LONG WINAPI RegConnectRegistryA(LPCSTR,HKEY,PHKEY);
69 WINADVAPI LONG WINAPI RegConnectRegistryW(LPCWSTR,HKEY,PHKEY);
70 WINADVAPI LONG WINAPI RegCreateKeyA(HKEY,LPCSTR,PHKEY);
71 WINADVAPI LONG WINAPI RegCreateKeyExA(HKEY,LPCSTR,DWORD,LPSTR,DWORD,REGSAM,LPSECURITY_ATTRIBUTES,PHKEY,PDWORD);
72 WINADVAPI LONG WINAPI RegCreateKeyExW(HKEY,LPCWSTR,DWORD,LPWSTR,DWORD,REGSAM,LPSECURITY_ATTRIBUTES,PHKEY,PDWORD);
73 WINADVAPI LONG WINAPI RegCreateKeyW(HKEY,LPCWSTR,PHKEY);
74 WINADVAPI LONG WINAPI RegDeleteKeyA(HKEY,LPCSTR);
75 WINADVAPI LONG WINAPI RegDeleteKeyW(HKEY,LPCWSTR);
76 #if (WINVER >= 0x0502)
77 WINADVAPI LONG WINAPI RegDeleteKeyExA(HKEY,LPCSTR,REGSAM,DWORD);
78 WINADVAPI LONG WINAPI RegDeleteKeyExW(HKEY,LPCWSTR,REGSAM,DWORD);
79 #endif
80 WINADVAPI LONG WINAPI RegDeleteValueA(HKEY,LPCSTR);
81 WINADVAPI LONG WINAPI RegDeleteValueW(HKEY,LPCWSTR);
82 WINADVAPI LONG WINAPI RegEnumKeyA(HKEY,DWORD,LPSTR,DWORD);
83 WINADVAPI LONG WINAPI RegEnumKeyW(HKEY,DWORD,LPWSTR,DWORD);
84 WINADVAPI LONG WINAPI RegEnumKeyExA(HKEY,DWORD,LPSTR,PDWORD,PDWORD,LPSTR,PDWORD,PFILETIME);
85 WINADVAPI LONG WINAPI RegEnumKeyExW(HKEY,DWORD,LPWSTR,PDWORD,PDWORD,LPWSTR,PDWORD,PFILETIME);
86 WINADVAPI LONG WINAPI RegEnumValueA(HKEY,DWORD,LPSTR,PDWORD,PDWORD,PDWORD,LPBYTE,PDWORD);
87 WINADVAPI LONG WINAPI RegEnumValueW(HKEY,DWORD,LPWSTR,PDWORD,PDWORD,PDWORD,LPBYTE,PDWORD);
88 WINADVAPI LONG WINAPI RegFlushKey(HKEY);
89 WINADVAPI LONG WINAPI RegGetKeySecurity(HKEY,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR,PDWORD);
90 WINADVAPI LONG WINAPI RegLoadKeyA(HKEY,LPCSTR,LPCSTR);
91 WINADVAPI LONG WINAPI RegLoadKeyW(HKEY,LPCWSTR,LPCWSTR);
92 WINADVAPI LONG WINAPI RegNotifyChangeKeyValue(HKEY,BOOL,DWORD,HANDLE,BOOL);
93 WINADVAPI LONG WINAPI RegOpenKeyA(HKEY,LPCSTR,PHKEY);
94 WINADVAPI LONG WINAPI RegOpenKeyExA(HKEY,LPCSTR,DWORD,REGSAM,PHKEY);
95 WINADVAPI LONG WINAPI RegOpenKeyExW(HKEY,LPCWSTR,DWORD,REGSAM,PHKEY);
96 WINADVAPI LONG WINAPI RegOpenKeyW(HKEY,LPCWSTR,PHKEY);
97 WINADVAPI LONG WINAPI RegQueryInfoKeyA(HKEY,LPSTR,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PFILETIME);
98 WINADVAPI LONG WINAPI RegQueryInfoKeyW(HKEY,LPWSTR,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PFILETIME);
99 WINADVAPI LONG WINAPI RegQueryMultipleValuesA(HKEY,PVALENTA,DWORD,LPSTR,LPDWORD);
100 WINADVAPI LONG WINAPI RegQueryMultipleValuesW(HKEY,PVALENTW,DWORD,LPWSTR,LPDWORD);
101 WINADVAPI LONG WINAPI RegQueryValueA(HKEY,LPCSTR,LPSTR,PLONG);
102 WINADVAPI LONG WINAPI RegQueryValueExA(HKEY,LPCSTR,LPDWORD,LPDWORD,LPBYTE,LPDWORD);
103 WINADVAPI LONG WINAPI RegQueryValueExW(HKEY,LPCWSTR,LPDWORD,LPDWORD,LPBYTE,LPDWORD);
104 WINADVAPI LONG WINAPI RegQueryValueW(HKEY,LPCWSTR,LPWSTR,PLONG);
105 WINADVAPI LONG WINAPI RegReplaceKeyA(HKEY,LPCSTR,LPCSTR,LPCSTR);
106 WINADVAPI LONG WINAPI RegReplaceKeyW(HKEY,LPCWSTR,LPCWSTR,LPCWSTR);
107 WINADVAPI LONG WINAPI RegRestoreKeyA(HKEY,LPCSTR,DWORD);
108 WINADVAPI LONG WINAPI RegRestoreKeyW(HKEY,LPCWSTR,DWORD);
109 WINADVAPI LONG WINAPI RegSaveKeyA(HKEY,LPCSTR,LPSECURITY_ATTRIBUTES);
110 WINADVAPI LONG WINAPI RegSaveKeyW(HKEY,LPCWSTR,LPSECURITY_ATTRIBUTES);
111 WINADVAPI LONG WINAPI RegSetKeySecurity(HKEY,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR);
112 WINADVAPI LONG WINAPI RegSetValueA(HKEY,LPCSTR,DWORD,LPCSTR,DWORD);
113 WINADVAPI LONG WINAPI RegSetValueExA(HKEY,LPCSTR,DWORD,DWORD,const BYTE*,DWORD);
114 WINADVAPI LONG WINAPI RegSetValueExW(HKEY,LPCWSTR,DWORD,DWORD,const BYTE*,DWORD);
115 WINADVAPI LONG WINAPI RegSetValueW(HKEY,LPCWSTR,DWORD,LPCWSTR,DWORD);
116 WINADVAPI LONG WINAPI RegUnLoadKeyA(HKEY,LPCSTR);
117 WINADVAPI LONG WINAPI RegUnLoadKeyW(HKEY,LPCWSTR);
119 #ifdef UNICODE
120 typedef VALENTW VALENT,*PVALENT;
121 #define AbortSystemShutdown AbortSystemShutdownW
122 #define InitiateSystemShutdown InitiateSystemShutdownW
123 #define RegConnectRegistry RegConnectRegistryW
124 #define RegCreateKey RegCreateKeyW
125 #define RegCreateKeyEx RegCreateKeyExW
126 #define RegDeleteKey RegDeleteKeyW
127 #if (WINVER >= 0x0502)
128 #define RegDeleteKeyEx RegDeleteKeyExW
129 #endif
130 #define RegDeleteValue RegDeleteValueW
131 #define RegEnumKey RegEnumKeyW
132 #define RegEnumKeyEx RegEnumKeyExW
133 #define RegEnumValue RegEnumValueW
134 #define RegLoadKey RegLoadKeyW
135 #define RegOpenKey RegOpenKeyW
136 #define RegOpenKeyEx RegOpenKeyExW
137 #define RegQueryInfoKey RegQueryInfoKeyW
138 #define RegQueryMultipleValues RegQueryMultipleValuesW
139 #define RegQueryValue RegQueryValueW
140 #define RegQueryValueEx RegQueryValueExW
141 #define RegReplaceKey RegReplaceKeyW
142 #define RegRestoreKey RegRestoreKeyW
143 #define RegSaveKey RegSaveKeyW
144 #define RegSetValue RegSetValueW
145 #define RegSetValueEx RegSetValueExW
146 #define RegUnLoadKey RegUnLoadKeyW
147 #else
148 typedef VALENTA VALENT,*PVALENT;
149 #define AbortSystemShutdown AbortSystemShutdownA
150 #define InitiateSystemShutdown InitiateSystemShutdownA
151 #define RegConnectRegistry RegConnectRegistryA
152 #define RegCreateKey RegCreateKeyA
153 #define RegCreateKeyEx RegCreateKeyExA
154 #define RegDeleteKey RegDeleteKeyA
155 #if (WINVER >= 0x0502)
156 #define RegDeleteKeyEx RegDeleteKeyExA
157 #endif
158 #define RegDeleteValue RegDeleteValueA
159 #define RegEnumKey RegEnumKeyA
160 #define RegEnumKeyEx RegEnumKeyExA
161 #define RegEnumValue RegEnumValueA
162 #define RegLoadKey RegLoadKeyA
163 #define RegOpenKey RegOpenKeyA
164 #define RegOpenKeyEx RegOpenKeyExA
165 #define RegQueryInfoKey RegQueryInfoKeyA
166 #define RegQueryMultipleValues RegQueryMultipleValuesA
167 #define RegQueryValue RegQueryValueA
168 #define RegQueryValueEx RegQueryValueExA
169 #define RegReplaceKey RegReplaceKeyA
170 #define RegRestoreKey RegRestoreKeyA
171 #define RegSaveKey RegSaveKeyA
172 #define RegSetValue RegSetValueA
173 #define RegSetValueEx RegSetValueExA
174 #define RegUnLoadKey RegUnLoadKeyA
175 #endif
176 #endif
177 #ifdef __cplusplus
179 #endif
180 #endif