source: Daodan/MinGW/include/winreg.h@ 1122

Last change on this file since 1122 was 1046, checked in by alloc, 8 years ago

Daodan: Added Windows MinGW and build batch file

File size: 7.1 KB
RevLine 
[1046]1#ifndef _WINREG_H
2#define _WINREG_H
3#if __GNUC__ >= 3
4#pragma GCC system_header
5#endif
6
7#ifndef WINADVAPI
8#define WINADVAPI
9#endif
10
11#ifdef __cplusplus
12extern "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
43
44#ifndef RC_INVOKED
45typedef ACCESS_MASK REGSAM;
46typedef struct value_entA {
47 LPSTR ve_valuename;
48 DWORD ve_valuelen;
49 DWORD ve_valueptr;
50 DWORD ve_type;
51} VALENTA,*PVALENTA;
52typedef struct value_entW {
53 LPWSTR ve_valuename;
54 DWORD ve_valuelen;
55 DWORD ve_valueptr;
56 DWORD ve_type;
57} VALENTW,*PVALENTW;
58WINADVAPI BOOL WINAPI AbortSystemShutdownA(LPCSTR);
59WINADVAPI BOOL WINAPI AbortSystemShutdownW(LPCWSTR);
60WINADVAPI BOOL WINAPI InitiateSystemShutdownA(LPSTR,LPSTR,DWORD,BOOL,BOOL);
61WINADVAPI BOOL WINAPI InitiateSystemShutdownW(LPWSTR,LPWSTR,DWORD,BOOL,BOOL);
62WINADVAPI LONG WINAPI RegCloseKey(HKEY);
63WINADVAPI LONG WINAPI RegConnectRegistryA(LPCSTR,HKEY,PHKEY);
64WINADVAPI LONG WINAPI RegConnectRegistryW(LPCWSTR,HKEY,PHKEY);
65WINADVAPI LONG WINAPI RegCreateKeyA(HKEY,LPCSTR,PHKEY);
66WINADVAPI LONG WINAPI RegCreateKeyExA(HKEY,LPCSTR,DWORD,LPSTR,DWORD,REGSAM,LPSECURITY_ATTRIBUTES,PHKEY,PDWORD);
67WINADVAPI LONG WINAPI RegCreateKeyExW(HKEY,LPCWSTR,DWORD,LPWSTR,DWORD,REGSAM,LPSECURITY_ATTRIBUTES,PHKEY,PDWORD);
68WINADVAPI LONG WINAPI RegCreateKeyW(HKEY,LPCWSTR,PHKEY);
69WINADVAPI LONG WINAPI RegDeleteKeyA(HKEY,LPCSTR);
70WINADVAPI LONG WINAPI RegDeleteKeyW(HKEY,LPCWSTR);
71#if (WINVER >= 0x0502)
72WINADVAPI LONG WINAPI RegDeleteKeyExA(HKEY,LPCSTR,REGSAM,DWORD);
73WINADVAPI LONG WINAPI RegDeleteKeyExW(HKEY,LPCWSTR,REGSAM,DWORD);
74#endif
75WINADVAPI LONG WINAPI RegDeleteValueA(HKEY,LPCSTR);
76WINADVAPI LONG WINAPI RegDeleteValueW(HKEY,LPCWSTR);
77WINADVAPI LONG WINAPI RegEnumKeyA(HKEY,DWORD,LPSTR,DWORD);
78WINADVAPI LONG WINAPI RegEnumKeyW(HKEY,DWORD,LPWSTR,DWORD);
79WINADVAPI LONG WINAPI RegEnumKeyExA(HKEY,DWORD,LPSTR,PDWORD,PDWORD,LPSTR,PDWORD,PFILETIME);
80WINADVAPI LONG WINAPI RegEnumKeyExW(HKEY,DWORD,LPWSTR,PDWORD,PDWORD,LPWSTR,PDWORD,PFILETIME);
81WINADVAPI LONG WINAPI RegEnumValueA(HKEY,DWORD,LPSTR,PDWORD,PDWORD,PDWORD,LPBYTE,PDWORD);
82WINADVAPI LONG WINAPI RegEnumValueW(HKEY,DWORD,LPWSTR,PDWORD,PDWORD,PDWORD,LPBYTE,PDWORD);
83WINADVAPI LONG WINAPI RegFlushKey(HKEY);
84WINADVAPI LONG WINAPI RegGetKeySecurity(HKEY,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR,PDWORD);
85WINADVAPI LONG WINAPI RegLoadKeyA(HKEY,LPCSTR,LPCSTR);
86WINADVAPI LONG WINAPI RegLoadKeyW(HKEY,LPCWSTR,LPCWSTR);
87WINADVAPI LONG WINAPI RegNotifyChangeKeyValue(HKEY,BOOL,DWORD,HANDLE,BOOL);
88WINADVAPI LONG WINAPI RegOpenKeyA(HKEY,LPCSTR,PHKEY);
89WINADVAPI LONG WINAPI RegOpenKeyExA(HKEY,LPCSTR,DWORD,REGSAM,PHKEY);
90WINADVAPI LONG WINAPI RegOpenKeyExW(HKEY,LPCWSTR,DWORD,REGSAM,PHKEY);
91WINADVAPI LONG WINAPI RegOpenKeyW(HKEY,LPCWSTR,PHKEY);
92WINADVAPI LONG WINAPI RegQueryInfoKeyA(HKEY,LPSTR,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PFILETIME);
93WINADVAPI LONG WINAPI RegQueryInfoKeyW(HKEY,LPWSTR,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PFILETIME);
94WINADVAPI LONG WINAPI RegQueryMultipleValuesA(HKEY,PVALENTA,DWORD,LPSTR,LPDWORD);
95WINADVAPI LONG WINAPI RegQueryMultipleValuesW(HKEY,PVALENTW,DWORD,LPWSTR,LPDWORD);
96WINADVAPI LONG WINAPI RegQueryValueA(HKEY,LPCSTR,LPSTR,PLONG);
97WINADVAPI LONG WINAPI RegQueryValueExA(HKEY,LPCSTR,LPDWORD,LPDWORD,LPBYTE,LPDWORD);
98WINADVAPI LONG WINAPI RegQueryValueExW(HKEY,LPCWSTR,LPDWORD,LPDWORD,LPBYTE,LPDWORD);
99WINADVAPI LONG WINAPI RegQueryValueW(HKEY,LPCWSTR,LPWSTR,PLONG);
100WINADVAPI LONG WINAPI RegReplaceKeyA(HKEY,LPCSTR,LPCSTR,LPCSTR);
101WINADVAPI LONG WINAPI RegReplaceKeyW(HKEY,LPCWSTR,LPCWSTR,LPCWSTR);
102WINADVAPI LONG WINAPI RegRestoreKeyA(HKEY,LPCSTR,DWORD);
103WINADVAPI LONG WINAPI RegRestoreKeyW(HKEY,LPCWSTR,DWORD);
104WINADVAPI LONG WINAPI RegSaveKeyA(HKEY,LPCSTR,LPSECURITY_ATTRIBUTES);
105WINADVAPI LONG WINAPI RegSaveKeyW(HKEY,LPCWSTR,LPSECURITY_ATTRIBUTES);
106WINADVAPI LONG WINAPI RegSetKeySecurity(HKEY,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR);
107WINADVAPI LONG WINAPI RegSetValueA(HKEY,LPCSTR,DWORD,LPCSTR,DWORD);
108WINADVAPI LONG WINAPI RegSetValueExA(HKEY,LPCSTR,DWORD,DWORD,const BYTE*,DWORD);
109WINADVAPI LONG WINAPI RegSetValueExW(HKEY,LPCWSTR,DWORD,DWORD,const BYTE*,DWORD);
110WINADVAPI LONG WINAPI RegSetValueW(HKEY,LPCWSTR,DWORD,LPCWSTR,DWORD);
111WINADVAPI LONG WINAPI RegUnLoadKeyA(HKEY,LPCSTR);
112WINADVAPI LONG WINAPI RegUnLoadKeyW(HKEY,LPCWSTR);
113
114#ifdef UNICODE
115typedef VALENTW VALENT,*PVALENT;
116#define AbortSystemShutdown AbortSystemShutdownW
117#define InitiateSystemShutdown InitiateSystemShutdownW
118#define RegConnectRegistry RegConnectRegistryW
119#define RegCreateKey RegCreateKeyW
120#define RegCreateKeyEx RegCreateKeyExW
121#define RegDeleteKey RegDeleteKeyW
122#if (WINVER >= 0x0502)
123#define RegDeleteKeyEx RegDeleteKeyExW
124#endif
125#define RegDeleteValue RegDeleteValueW
126#define RegEnumKey RegEnumKeyW
127#define RegEnumKeyEx RegEnumKeyExW
128#define RegEnumValue RegEnumValueW
129#define RegLoadKey RegLoadKeyW
130#define RegOpenKey RegOpenKeyW
131#define RegOpenKeyEx RegOpenKeyExW
132#define RegQueryInfoKey RegQueryInfoKeyW
133#define RegQueryMultipleValues RegQueryMultipleValuesW
134#define RegQueryValue RegQueryValueW
135#define RegQueryValueEx RegQueryValueExW
136#define RegReplaceKey RegReplaceKeyW
137#define RegRestoreKey RegRestoreKeyW
138#define RegSaveKey RegSaveKeyW
139#define RegSetValue RegSetValueW
140#define RegSetValueEx RegSetValueExW
141#define RegUnLoadKey RegUnLoadKeyW
142#else
143typedef VALENTA VALENT,*PVALENT;
144#define AbortSystemShutdown AbortSystemShutdownA
145#define InitiateSystemShutdown InitiateSystemShutdownA
146#define RegConnectRegistry RegConnectRegistryA
147#define RegCreateKey RegCreateKeyA
148#define RegCreateKeyEx RegCreateKeyExA
149#define RegDeleteKey RegDeleteKeyA
150#if (WINVER >= 0x0502)
151#define RegDeleteKeyEx RegDeleteKeyExA
152#endif
153#define RegDeleteValue RegDeleteValueA
154#define RegEnumKey RegEnumKeyA
155#define RegEnumKeyEx RegEnumKeyExA
156#define RegEnumValue RegEnumValueA
157#define RegLoadKey RegLoadKeyA
158#define RegOpenKey RegOpenKeyA
159#define RegOpenKeyEx RegOpenKeyExA
160#define RegQueryInfoKey RegQueryInfoKeyA
161#define RegQueryMultipleValues RegQueryMultipleValuesA
162#define RegQueryValue RegQueryValueA
163#define RegQueryValueEx RegQueryValueExA
164#define RegReplaceKey RegReplaceKeyA
165#define RegRestoreKey RegRestoreKeyA
166#define RegSaveKey RegSaveKeyA
167#define RegSetValue RegSetValueA
168#define RegSetValueEx RegSetValueExA
169#define RegUnLoadKey RegUnLoadKeyA
170#endif
171#endif
172#ifdef __cplusplus
173}
174#endif
175#endif
Note: See TracBrowser for help on using the repository browser.