Added macros and definitions for using exception inside Wine or
[wine] / dlls / ntdll / reg.c
1 /*
2  *      registry functions
3  */
4
5 #include "debug.h"
6 #include "winreg.h"
7
8 #include "ntddk.h"
9
10 DEFAULT_DEBUG_CHANNEL(ntdll)
11
12
13 /******************************************************************************
14  * NtCreateKey [NTDLL]
15  * ZwCreateKey
16  */
17 NTSTATUS WINAPI NtCreateKey(
18         PHANDLE KeyHandle,
19         ACCESS_MASK DesiredAccess,
20         POBJECT_ATTRIBUTES ObjectAttributes,
21         ULONG TitleIndex,
22         PUNICODE_STRING Class,
23         ULONG CreateOptions,
24         PULONG Disposition)
25 {
26         FIXME(ntdll,"(%p,0x%08lx,%p (%s),0x%08lx, %p(%s),0x%08lx,%p),stub!\n",
27         KeyHandle, DesiredAccess, ObjectAttributes,debugstr_w(ObjectAttributes->ObjectName->Buffer),
28         TitleIndex, Class, debugstr_w(Class->Buffer), CreateOptions, Disposition);
29         return 0;
30 }
31
32 /******************************************************************************
33  * NtDeleteKey [NTDLL]
34  * ZwDeleteKey
35  */
36 NTSTATUS NtDeleteKey(HANDLE KeyHandle)
37 {
38         FIXME(ntdll,"(0x%08x) stub!\n",
39         KeyHandle);
40         return 1;
41 }
42
43 /******************************************************************************
44  * NtDeleteValueKey [NTDLL]
45  * ZwDeleteValueKey
46  */
47 NTSTATUS WINAPI NtDeleteValueKey(
48         IN HANDLE KeyHandle,
49         IN PUNICODE_STRING ValueName)
50 {
51         FIXME(ntdll,"(0x%08x,%p(%s)) stub!\n",
52         KeyHandle, ValueName,debugstr_w(ValueName->Buffer));
53         return 1;
54
55 }
56 /******************************************************************************
57  * NtEnumerateKey [NTDLL]
58  * ZwEnumerateKey
59  */
60 NTSTATUS WINAPI NtEnumerateKey(
61         HANDLE KeyHandle,
62         ULONG Index,
63         KEY_INFORMATION_CLASS KeyInformationClass,
64         PVOID KeyInformation,
65         ULONG Length,
66         PULONG ResultLength)
67 {
68         FIXME(ntdll,"(0x%08x,0x%08lx,0x%08x,%p,0x%08lx,%p) stub\n",
69         KeyHandle, Index, KeyInformationClass, KeyInformation, Length, ResultLength);
70         return 1;
71 }
72
73 /******************************************************************************
74  *  NtEnumerateValueKey [NTDLL] 
75  *  ZwEnumerateValueKey
76  */
77 NTSTATUS WINAPI NtEnumerateValueKey(
78         HANDLE KeyHandle,
79         ULONG Index,
80         KEY_VALUE_INFORMATION_CLASS KeyInformationClass,
81         PVOID KeyInformation,
82         ULONG Length,
83         PULONG ResultLength)
84 {
85         FIXME(ntdll,"(0x%08x,0x%08lx,0x%08x,%p,0x%08lx,%p) stub!\n",
86         KeyHandle, Index, KeyInformationClass, KeyInformation, Length, ResultLength);
87         return 1;
88 }
89
90 /******************************************************************************
91  *  NtFlushKey  [NTDLL] 
92  *  ZwFlushKey
93  */
94 NTSTATUS NtFlushKey(HANDLE KeyHandle)
95 {
96         FIXME(ntdll,"(0x%08x) stub!\n",
97         KeyHandle);
98         return 1;
99 }
100
101 /******************************************************************************
102  *  NtLoadKey   [NTDLL] 
103  *  ZwLoadKey
104  */
105 NTSTATUS WINAPI NtLoadKey(
106         PHANDLE KeyHandle,
107         POBJECT_ATTRIBUTES ObjectAttributes)
108 {
109         FIXME(ntdll,"(%p,%p (%s)),stub!\n",
110         KeyHandle, ObjectAttributes,debugstr_w(ObjectAttributes->ObjectName->Buffer));
111         return 0;
112
113 }
114
115 /******************************************************************************
116  *  NtNotifyChangeKey   [NTDLL] 
117  *  ZwNotifyChangeKey
118  */
119 NTSTATUS WINAPI NtNotifyChangeKey(
120         IN HANDLE KeyHandle,
121         IN HANDLE Event,
122         IN PIO_APC_ROUTINE ApcRoutine OPTIONAL,
123         IN PVOID ApcContext OPTIONAL,
124         OUT PIO_STATUS_BLOCK IoStatusBlock,
125         IN ULONG CompletionFilter,
126         IN BOOLEAN Asynchroneous,
127         OUT PVOID ChangeBuffer,
128         IN ULONG Length,
129         IN BOOLEAN WatchSubtree)
130 {
131         FIXME(ntdll,"(0x%08x,0x%08x,%p,%p,%p,0x%08lx, 0x%08x,%p,0x%08lx,0x%08x) stub!\n",
132         KeyHandle, Event, ApcRoutine, ApcContext, IoStatusBlock, CompletionFilter,
133         Asynchroneous, ChangeBuffer, Length, WatchSubtree);
134         return 0;
135 }
136
137
138 /******************************************************************************
139  * NtOpenKey [NTDLL.129]
140  * ZwOpenKey
141  *   OUT        PHANDLE                 KeyHandle,
142  *   IN         ACCESS_MASK             DesiredAccess,
143  *   IN         POBJECT_ATTRIBUTES      ObjectAttributes 
144  */
145 NTSTATUS WINAPI NtOpenKey(
146         PHANDLE KeyHandle,
147         ACCESS_MASK DesiredAccess,
148         POBJECT_ATTRIBUTES ObjectAttributes) 
149 {
150         FIXME(ntdll,"(%p,0x%08lx,%p (%s)),stub!\n",
151         KeyHandle, DesiredAccess, ObjectAttributes,debugstr_w(ObjectAttributes->ObjectName->Buffer));
152         return 0;
153 }
154
155 /******************************************************************************
156  * NtQueryKey [NTDLL]
157  * ZwQueryKey
158  */
159 NTSTATUS WINAPI NtQueryKey(
160         HANDLE KeyHandle,
161         KEY_INFORMATION_CLASS KeyInformationClass,
162         PVOID KeyInformation,
163         ULONG Length,
164         PULONG ResultLength)
165 {
166         FIXME(ntdll,"(0x%08x,0x%08x,%p,0x%08lx,%p) stub\n",
167         KeyHandle, KeyInformationClass, KeyInformation, Length, ResultLength);
168         return 0;
169 }
170
171 /******************************************************************************
172  * NtQueryMultipleValueKey [NTDLL]
173  * ZwQueryMultipleValueKey
174  */
175
176 NTSTATUS WINAPI NtQueryMultipleValueKey(
177         HANDLE KeyHandle,
178         PVALENTW ListOfValuesToQuery,
179         ULONG NumberOfItems,
180         PVOID MultipleValueInformation,
181         ULONG Length,
182         PULONG  ReturnLength)
183 {
184         FIXME(ntdll,"(0x%08x,%p,0x%08lx,%p,0x%08lx,%p) stub!\n",
185         KeyHandle, ListOfValuesToQuery, NumberOfItems, MultipleValueInformation,
186         Length,ReturnLength);
187         return 0;
188 }
189
190 /******************************************************************************
191  * NtQueryValueKey [NTDLL]
192  * ZwQueryValueKey
193  */
194 NTSTATUS WINAPI NtQueryValueKey(
195         HANDLE KeyHandle,
196         PUNICODE_STRING ValueName,
197         KEY_VALUE_INFORMATION_CLASS KeyValueInformationClass,
198         PVOID KeyValueInformation,
199         ULONG Length,
200         PULONG ResultLength)
201 {
202         FIXME(ntdll,"(0x%08x,%p,0x%08x,%p,0x%08lx,%p) stub\n",
203         KeyHandle, ValueName, KeyValueInformationClass, KeyValueInformation, Length, ResultLength);
204         return 0;
205 }
206
207 /******************************************************************************
208  * NtReplaceKey [NTDLL]
209  * ZwReplaceKey
210  */
211 NTSTATUS WINAPI NtReplaceKey(
212         IN POBJECT_ATTRIBUTES ObjectAttributes,
213         IN HANDLE Key,
214         IN POBJECT_ATTRIBUTES ReplacedObjectAttributes)
215 {
216         FIXME(ntdll,"(%p(%s),0x%08x,%p (%s)),stub!\n",
217         ObjectAttributes,debugstr_w(ObjectAttributes->ObjectName->Buffer),Key,
218         ReplacedObjectAttributes,debugstr_w(ReplacedObjectAttributes->ObjectName->Buffer));
219         return 0;
220
221 }
222 /******************************************************************************
223  * NtRestoreKey [NTDLL]
224  * ZwRestoreKey
225  */
226 NTSTATUS WINAPI NtRestoreKey(
227         HANDLE KeyHandle,
228         HANDLE FileHandle,
229         ULONG RestoreFlags)
230 {
231         FIXME(ntdll,"(0x%08x,0x%08x,0x%08lx) stub\n",
232         KeyHandle, FileHandle, RestoreFlags);
233         return 0;
234
235 }
236 /******************************************************************************
237  * NtSaveKey [NTDLL]
238  * ZwSaveKey
239  */
240 NTSTATUS WINAPI NtSaveKey(
241         IN HANDLE KeyHandle,
242         IN HANDLE FileHandle)
243 {
244         FIXME(ntdll,"(0x%08x,0x%08x) stub\n",
245         KeyHandle, FileHandle);
246         return 0;
247 }
248 /******************************************************************************
249  * NtSetInformationKey [NTDLL]
250  * ZwSetInformationKey
251  */
252 NTSTATUS WINAPI NtSetInformationKey(
253         IN HANDLE KeyHandle,
254         IN const int KeyInformationClass,
255         IN PVOID KeyInformation,
256         IN ULONG KeyInformationLength)
257 {
258         FIXME(ntdll,"(0x%08x,0x%08x,%p,0x%08lx) stub\n",
259         KeyHandle, KeyInformationClass, KeyInformation, KeyInformationLength);
260         return 0;
261 }
262 /******************************************************************************
263  * NtSetValueKey [NTDLL]
264  * ZwSetValueKey
265  */
266 NTSTATUS WINAPI NtSetValueKey(
267         HANDLE KeyHandle,
268         PUNICODE_STRING ValueName,
269         ULONG TitleIndex,
270         ULONG Type,
271         PVOID Data,
272         ULONG DataSize)
273 {
274         FIXME(ntdll,"(0x%08x,%p(%s), 0x%08lx, 0x%08lx, %p, 0x%08lx) stub!\n",
275         KeyHandle, ValueName,debugstr_w(ValueName->Buffer), TitleIndex, Type, Data, DataSize);
276         return 1;
277
278 }
279
280 /******************************************************************************
281  * NtUnloadKey [NTDLL]
282  * ZwUnloadKey
283  */
284 NTSTATUS WINAPI NtUnloadKey(
285         IN HANDLE KeyHandle)
286 {
287         FIXME(ntdll,"(0x%08x) stub\n",
288         KeyHandle);
289         return 0;
290 }