New stubs.
[wine/multimedia.git] / dlls / ntdll / nt.c
bloba634fdd48f8cfa81e4bfa225d6fec43353156418
1 /*
2 * NT basis DLL
3 *
4 * This file contains the Nt* API functions of NTDLL.DLL.
5 * In the original ntdll.dll they all seem to just call int 0x2e (down to the
6 * HAL), so parameter counts/parameters are just guesswork from -debugmsg
7 * +relay.
9 * Copyright 1996-1998 Marcus Meissner
12 #include <stdlib.h>
13 #include <string.h>
14 #include <time.h>
15 #include "win.h"
16 #include "file.h"
17 #include "windows.h"
18 #include "winnls.h"
19 #include "ntdll.h"
20 #include "heap.h"
21 #include "debug.h"
22 #include "module.h"
23 #include "debugstr.h"
24 #include "winreg.h"
26 /**************************************************************************
27 * NtOpenFile [NTDLL.127]
29 NTSTATUS WINAPI NtOpenFile(
30 DWORD x1, DWORD flags, DWORD x3, DWORD x4, DWORD alignment, DWORD x6
31 ) {
32 FIXME(ntdll,"(%08lx,0x%08lx,%08lx,%08lx,%08lx,%08lx): stub\n",
33 x1,flags,x3,x4,alignment,x6);
34 return 0;
37 /**************************************************************************
38 * NtCreateFile [NTDLL.73]
40 NTSTATUS WINAPI NtCreateFile(
41 PHANDLE filehandle, DWORD access, LPLONG attributes, LPLONG status,
42 LPVOID x5, DWORD x6, DWORD x7, LPLONG x8, DWORD x9, DWORD x10,
43 LPLONG x11
44 ) {
45 FIXME(ntdll,"(%p,%lx,%lx,%lx,%p,%08lx,%08lx,%p,%08lx,%08lx,%p): empty stub\n",
46 filehandle,access,*attributes,*status,x5,x6,x7,x8,x9,x10,x11);
47 return 0;
49 /**************************************************************************
50 * NtCreateTimer [NTDLL.87]
52 NTSTATUS WINAPI NtCreateTimer(DWORD x1, DWORD x2, DWORD x3)
54 FIXME(ntdll,"(%08lx,%08lx,%08lx), empty stub\n",x1,x2,x3);
55 return 0;
57 /**************************************************************************
58 * NtSetTimer [NTDLL.221]
60 NTSTATUS WINAPI NtSetTimer(DWORD x1,DWORD x2,DWORD x3,DWORD x4, DWORD x5,DWORD x6)
62 FIXME(ntdll,"(%08lx,%08lx,%08lx,%08lx,%08lx,%08lx): empty stub\n",
63 x1,x2,x3,x4,x5,x6);
64 return 0;
67 /**************************************************************************
68 * NtCreateEvent [NTDLL.71]
70 NTSTATUS WINAPI NtCreateEvent(PHANDLE eventhandle, DWORD desiredaccess,
71 DWORD attributes, DWORD eventtype, DWORD initialstate)
73 FIXME(ntdll,"(%p,%08lx,%08lx,%08lx,%08lx): empty stub\n",
74 eventhandle,desiredaccess,attributes,eventtype,initialstate);
75 return 0;
77 /**************************************************************************
78 * NtDeviceIoControlFile [NTDLL.94]
80 NTSTATUS WINAPI NtDeviceIoControlFile(HANDLE32 filehandle, HANDLE32 event,
81 DWORD x3, DWORD x4, DWORD x5, UINT32 iocontrolcode,
82 LPVOID inputbuffer, DWORD inputbufferlength,
83 LPVOID outputbuffer, DWORD outputbufferlength)
85 FIXME(ntdll,"(%x,%x,%08lx,%08lx,%08lx,%08x,%lx,%lx): empty stub\n",
86 filehandle,event,x3,x4,x5,iocontrolcode,inputbufferlength,outputbufferlength);
87 return 0;
90 /**************************************************************************
91 * NtOpenDirectoryObject [NTDLL.124]
93 NTSTATUS WINAPI NtOpenDirectoryObject(DWORD x1,DWORD x2,LPUNICODE_STRING name)
95 FIXME(ntdll,"(0x%08lx,0x%08lx,%s): stub\n",x1,x2,debugstr_w(name->Buffer));
96 return 0;
100 /******************************************************************************
101 * NtQueryDirectoryObject [NTDLL.149]
103 NTSTATUS WINAPI NtQueryDirectoryObject( DWORD x1, DWORD x2, DWORD x3, DWORD x4,
104 DWORD x5, DWORD x6, DWORD x7 )
106 FIXME(ntdll,"(%lx,%lx,%lx,%lx,%lx,%lx,%lx): stub\n",x1,x2,x3,x4,x5,x6,x7);
107 return 0xc0000000; /* We don't have any. Whatever. (Yet.) */
110 /******************************************************************************
111 * NtQuerySystemInformation [NTDLL.168]
113 NTSTATUS WINAPI NtQuerySystemInformation( DWORD x1, DWORD x2, DWORD x3, DWORD x4 )
115 FIXME(ntdll,"(%lx,%lx,%lx,%lx): stub\n",x1,x2,x3,x4);
116 return 0;
119 /******************************************************************************
120 * NtQueryObject [NTDLL.161]
122 NTSTATUS WINAPI NtQueryObject( DWORD x1, DWORD x2 ,DWORD x3, DWORD x4, DWORD x5 )
124 FIXME(ntdll,"(0x%lx,%lx,%lx,%lx,%lx): stub\n",x1,x2,x3,x4,x5);
125 return 0;
129 /******************************************************************************
130 * NtSetInformationProcess [NTDLL.207]
132 NTSTATUS WINAPI NtSetInformationProcess( DWORD x1, DWORD x2, DWORD x3, DWORD x4 )
134 FIXME(ntdll,"(%lx,%lx,%lx,%lx): stub\n",x1,x2,x3,x4);
135 return 0;
138 /******************************************************************************
139 * NtFsControlFile [NTDLL.108]
141 NTSTATUS WINAPI NtFsControlFile(
142 DWORD x1,DWORD x2,DWORD x3,DWORD x4,DWORD x5,DWORD x6,DWORD x7,DWORD x8,
143 DWORD x9,DWORD x10
145 FIXME(ntdll,"(0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx): stub\n",x1,x2,x3,x4,x5,x6,x7,x8,x9,x10);
146 return 0;
149 /******************************************************************************
150 * NtOpenKey [NTDLL.129]
152 NTSTATUS WINAPI NtOpenKey(DWORD x1,DWORD x2,LPUNICODE_STRING key) {
153 FIXME(ntdll,"(0x%08lx,0x%08lx,%s),stub!\n",x1,x2,debugstr_w(key->Buffer));
154 return RegOpenKey32W(HKEY_LOCAL_MACHINE,key->Buffer,(LPHKEY)x1);
157 /******************************************************************************
158 * NtQueryValueKey [NTDLL.129]
160 NTSTATUS WINAPI NtQueryValueKey(DWORD x1,LPUNICODE_STRING key,DWORD x3,DWORD x4,DWORD x5,DWORD x6) {
161 FIXME(ntdll,"(%08lx,%s,%08lx,%08lx,%08lx,%08lx),stub!\n",
162 x1,debugstr_w(key->Buffer),x3,x4,x5,x6
164 return 0;
167 NTSTATUS WINAPI NtQueryTimerResolution(DWORD x1,DWORD x2,DWORD x3) {
168 FIXME(ntdll,"(0x%08lx,0x%08lx,0x%08lx), stub!\n",x1,x2,x3);
169 return 1;
172 /**************************************************************************
173 * NtClose [NTDLL.65]
175 NTSTATUS WINAPI NtClose(DWORD x1) {
176 FIXME(ntdll,"(0x%08lx),stub!\n",x1);
177 return 1;
179 /******************************************************************************
180 * NtQueryInformationProcess [NTDLL.]
183 NTSTATUS WINAPI NtQueryInformationProcess(DWORD x1,DWORD x2,DWORD x3,DWORD x4,DWORD x5) {
184 FIXME(ntdll,"(0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx),stub!\n",
185 x1,x2,x3,x4,x5
187 return 0;
189 /******************************************************************************
190 * NtQueryInformationThread [NTDLL.]
193 NTSTATUS WINAPI NtQueryInformationThread(DWORD x1,DWORD x2,DWORD x3,DWORD x4,DWORD x5) {
194 FIXME(ntdll,"(0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx),stub!\n",
195 x1,x2,x3,x4,x5
197 return 0;
199 /******************************************************************************
200 * NtQueryInformationToken [NTDLL.156]
203 NTSTATUS WINAPI NtQueryInformationToken(DWORD x1,DWORD x2,DWORD x3,DWORD x4,DWORD x5) {
204 FIXME(ntdll,"(0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx),stub!\n",
205 x1,x2,x3,x4,x5
207 return 0;
210 /******************************************************************************
211 * NtCreatePagingFile [NTDLL]
213 NTSTATUS WINAPI NtCreatePagingFile(DWORD x1,DWORD x2,DWORD x3,DWORD x4) {
214 FIXME(ntdll,"(0x%08lx,0x%08lx,0x%08lx,0x%08lx),stub!\n",x1,x2,x3,x4);
215 return 0;
218 /******************************************************************************
219 * NtDuplicateObject [NTDLL]
221 NTSTATUS WINAPI NtDuplicateObject(DWORD x1,DWORD x2,DWORD x3,DWORD x4,DWORD x5,
222 DWORD x6,DWORD x7
224 FIXME(ntdll,"(0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx),stub!\n",x1,x2,x3,x4,x5,x6,x7);
225 return 0;
228 /******************************************************************************
229 * NtDuplicateToken [NTDLL]
231 NTSTATUS WINAPI NtDuplicateToken(
232 DWORD x1,DWORD x2,DWORD x3,DWORD x4,DWORD x5,DWORD x6
234 FIXME(ntdll,"(0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx),stub!\n",x1,x2,x3,x4,x5,x6);
235 return 0;
238 /******************************************************************************
239 * NtAdjustPrivilegesToken [NTDLL]
241 NTSTATUS WINAPI NtAdjustPrivilegesToken(
242 DWORD x1,DWORD x2,DWORD x3,DWORD x4,DWORD x5,DWORD x6
244 FIXME(ntdll,"(0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx),stub!\n",x1,x2,x3,x4,x5,x6);
245 return 0;
248 /******************************************************************************
249 * NtOpenProcessToken [NTDLL]
251 NTSTATUS WINAPI NtOpenProcessToken(DWORD x1,DWORD x2,DWORD x3) {
252 FIXME(ntdll,"(0x%08lx,0x%08lx,0x%08lx),stub!\n",x1,x2,x3);
253 return 0;
256 /******************************************************************************
257 * NtSetInformationThread [NTDLL]
259 NTSTATUS WINAPI NtSetInformationThread(DWORD x1,DWORD x2,DWORD x3,DWORD x4) {
260 FIXME(ntdll,"(0x%08lx,0x%08lx,0x%08lx,0x%08lx),stub!\n",x1,x2,x3,x4);
261 return 0;
264 /******************************************************************************
265 * NtOpenThreadToken [NTDLL]
267 NTSTATUS WINAPI NtOpenThreadToken(DWORD x1,DWORD x2,DWORD x3,DWORD x4) {
268 FIXME(ntdll,"(0x%08lx,0x%08lx,0x%08lx,0x%08lx),stub!\n",x1,x2,x3,x4);
269 return 0;
272 /******************************************************************************
273 * NtSetVolumeInformationFile [NTDLL]
275 NTSTATUS WINAPI NtSetVolumeInformationFile(DWORD x1,DWORD x2,DWORD x3,DWORD x4,
276 DWORD x5
278 FIXME(ntdll,"(0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx),stub!\n",x1,x2,x3,x4,x5);
279 return 0;
282 /******************************************************************************
283 * NtCreatePort [NTDLL]
285 NTSTATUS WINAPI NtCreatePort(DWORD x1,DWORD x2,DWORD x3,DWORD x4,DWORD x5) {
286 FIXME(ntdll,"(0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx),stub!\n",x1,x2,x3,x4,x5);
287 return 0;
290 /******************************************************************************
291 * NtSetInformationFile [NTDLL]
293 NTSTATUS WINAPI NtSetInformationFile(DWORD x1,DWORD x2,DWORD x3,DWORD x4,DWORD x5) {
294 FIXME(ntdll,"(0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx)\n",x1,x2,x3,x4,x5);
295 return 0;
298 /******************************************************************************
299 * NtSetEvent [NTDLL]
301 NTSTATUS WINAPI NtSetEvent(DWORD x1,DWORD x2) {
302 FIXME(ntdll,"(0x%08lx,0x%08lx)\n",x1,x2);
303 return 0;
306 /******************************************************************************
307 * NtCreateKey [NTDLL]
309 NTSTATUS WINAPI NtCreateKey(DWORD x1,DWORD x2,DWORD x3,DWORD x4,DWORD x5,DWORD x6,DWORD x7) {
310 FIXME(ntdll,"(0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx),stub!\n",x1,x2,x3,x4,x5,x6,x7);
311 return 0;
314 /******************************************************************************
315 * NtQueryInformationFile [NTDLL]
317 NTSTATUS WINAPI NtQueryInformationFile(DWORD x1,DWORD x2,DWORD x3,DWORD x4,DWORD x5) {
318 FIXME(ntdll,"(0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx),stub!\n",x1,x2,x3,x4,x5);
319 return 0;
322 /******************************************************************************
323 * NtSetValueKey [NTDLL]
325 NTSTATUS WINAPI NtSetValueKey(DWORD x1,LPUNICODE_STRING key,DWORD x3,DWORD x4,DWORD x5,DWORD x6) {
326 FIXME(ntdll,"(0x%08lx,%s,0x%08lx,0x%08lx,0x%08lx,0x%08lx),stub!\n",x1,debugstr_w(key->Buffer),x3,x4,x5,x6);
327 return 0;
330 /******************************************************************************
331 * NtOpenEvent [NTDLL]
333 NTSTATUS WINAPI NtOpenEvent(DWORD x1,DWORD x2,DWORD x3) {
334 FIXME(ntdll,"(0x%08lx,0x%08lx,0x%08lx),stub!\n",x1,x2,x3);
335 return 0;
338 /******************************************************************************
339 * NtWaitForSingleObject [NTDLL]
341 NTSTATUS WINAPI NtWaitForSingleObject(DWORD x1,DWORD x2,DWORD x3) {
342 FIXME(ntdll,"(0x%08lx,0x%08lx,0x%08lx),stub!\n",x1,x2,x3);
343 return 0;
346 /******************************************************************************
347 * NtConnectPort [NTDLL]
349 NTSTATUS WINAPI NtConnectPort(DWORD x1,LPUNICODE_STRING uni,DWORD x3,DWORD x4,DWORD x5,DWORD x6,DWORD x7,DWORD x8) {
350 FIXME(ntdll,"(0x%08lx,%s,0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx),stub!\n",x1,debugstr_w(uni->Buffer),x3,x4,x5,x6,x7,x8);
351 return 0;
354 /******************************************************************************
355 * NtListenPort [NTDLL]
357 NTSTATUS WINAPI NtListenPort(DWORD x1,DWORD x2) {
358 FIXME(ntdll,"(0x%08lx,0x%08lx),stub!\n",x1,x2);
359 return 0;
362 /******************************************************************************
363 * NtRequestWaitReplyPort [NTDLL]
365 NTSTATUS WINAPI NtRequestWaitReplyPort(DWORD x1,DWORD x2,DWORD x3) {
366 FIXME(ntdll,"(0x%08lx,0x%08lx,0x%08lx),stub!\n",x1,x2,x3);
367 return 0;
370 /******************************************************************************
371 * NtCreateDirectoryObject [NTDLL]
373 NTSTATUS WINAPI NtCreateDirectoryObject(DWORD x1,DWORD x2,DWORD x3) {
374 FIXME(ntdll,"(0x%08lx,0x%08lx,0x%08lx),stub!\n",x1,x2,x3);
375 return 0;
378 /******************************************************************************
379 * NtMapViewOfSection [NTDLL]
381 NTSTATUS WINAPI NtMapViewOfSection(
382 DWORD x1,DWORD x2,DWORD x3,DWORD x4,DWORD x5,DWORD x6,DWORD x7,
383 DWORD x8,DWORD x9,DWORD x10
385 FIXME(ntdll,"(0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx),stub!\n",x1,x2,x3,x4,x5,x6,x7,x8,x9,x10);
386 return 0;
389 /******************************************************************************
390 * NtCreateMailSlotFile [NTDLL]
392 NTSTATUS WINAPI NtCreateMailslotFile(DWORD x1,DWORD x2,DWORD x3,DWORD x4,DWORD x5,DWORD x6,DWORD x7,DWORD x8) {
393 FIXME(ntdll,"(0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx),stub!\n",x1,x2,x3,x4,x5,x6,x7,x8);
394 return 0;
397 /******************************************************************************
398 * NtReadFile [NTDLL]
400 NTSTATUS WINAPI NtReadFile(
401 DWORD x1,DWORD x2,DWORD x3,DWORD x4,DWORD x5,DWORD x6,DWORD x7,
402 DWORD x8,DWORD x9
404 FIXME(ntdll,"(0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx),stub!\n",x1,x2,x3,x4,x5,x6,x7,x8,x9);
405 return 0;
409 /******************************************************************************
410 * NtCreateSection [NTDLL]
412 NTSTATUS WINAPI NtCreateSection(
413 DWORD x1,DWORD x2,DWORD x3,DWORD x4,DWORD x5,DWORD x6,DWORD x7
415 FIXME(ntdll,"(0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx),stub!\n",x1,x2,x3,x4,x5,x6,x7);
416 return 0;
419 /******************************************************************************
420 * NtResumeThread [NTDLL]
422 NTSTATUS WINAPI NtResumeThread(DWORD x1,DWORD x2) {
423 FIXME(ntdll,"(0x%08lx,0x%08lx),stub!\n",x1,x2);
424 return 0;
427 /******************************************************************************
428 * NtReplyWaitReceivePort [NTDLL]
430 NTSTATUS WINAPI NtReplyWaitReceivePort(DWORD x1,DWORD x2,DWORD x3,DWORD x4) {
431 FIXME(ntdll,"(0x%08lx,0x%08lx,0x%08lx,0x%08lx),stub!\n",x1,x2,x3,x4);
432 return 0;
435 /******************************************************************************
436 * NtAcceptConnectPort [NTDLL]
438 NTSTATUS WINAPI NtAcceptConnectPort(DWORD x1,DWORD x2,DWORD x3,DWORD x4,DWORD x5,DWORD x6) {
439 FIXME(ntdll,"(0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx),stub!\n",x1,x2,x3,x4,x5,x6);
440 return 0;
443 /******************************************************************************
444 * NtCompleteConnectPort [NTDLL]
446 NTSTATUS WINAPI NtCompleteConnectPort(DWORD x1) {
447 FIXME(ntdll,"(0x%08lx),stub!\n",x1);
448 return 0;
451 /******************************************************************************
452 * NtRegisterThreadTerminatePort [NTDLL]
454 NTSTATUS WINAPI NtRegisterThreadTerminatePort(DWORD x1) {
455 FIXME(ntdll,"(0x%08lx),stub!\n",x1);
456 return 0;
459 /******************************************************************************
460 * NtTerminateThread [NTDLL]
462 NTSTATUS WINAPI NtTerminateThread(HANDLE32 hThread,DWORD exitcode) {
463 BOOL32 ret = TerminateThread(hThread,exitcode);
465 if (ret)
466 return 0;
467 return 0xc0000000; /* FIXME: lasterror->ntstatus */
470 /******************************************************************************
471 * NtSetIntervalProfile [NTDLL]
473 NTSTATUS WINAPI NtSetIntervalProfile(DWORD x1,DWORD x2) {
474 FIXME(ntdll,"(0x%08lx,0x%08lx),stub!\n",x1,x2);
475 return 0;
478 /******************************************************************************
479 * NtOpenSection [NTDLL]
481 NTSTATUS WINAPI NtOpenSection(DWORD x1,DWORD x2,DWORD x3) {
482 FIXME(ntdll,"(0x%08lx,0x%08lx,0x%08lx),stub!\n",x1,x2,x3);
483 return 0;
485 /******************************************************************************
486 * NtQueryPerformanceCounter [NTDLL]
488 BOOL32 WINAPI NtQueryPerformanceCounter(DWORD x1,DWORD x2) {
489 FIXME(ntdll,"(0x%08lx, 0x%08lx) stub!\n",x1,x2);
490 return 0;
492 /******************************************************************************
493 * NtQuerySection [NTDLL]
495 NTSTATUS WINAPI NtQuerySection(DWORD x1,DWORD x2,DWORD x3,DWORD x4,DWORD x5) {
496 FIXME(ntdll,"(0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx) stub!\n",x1,x2,x3,x4,x5);
497 return 0;
500 /******************************************************************************
501 * NtQuerySecurityObject [NTDLL]
503 NTSTATUS WINAPI NtQuerySecurityObject(DWORD x1,DWORD x2,DWORD x3,DWORD x4,DWORD x5) {
504 FIXME(ntdll,"(0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx) stub!\n",x1,x2,x3,x4,x5);
505 return 0;
507 /******************************************************************************
508 * NtQuerySemaphore [NTDLL]
510 NTSTATUS WINAPI NtQuerySemaphore(DWORD x1,DWORD x2,DWORD x3,DWORD x4,DWORD x5) {
511 FIXME(ntdll,"(0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx) stub!\n",x1,x2,x3,x4,x5);
512 return 0;
515 /******************************************************************************
516 * NtEnumerateValueKey [NTDLL]
518 NTSTATUS WINAPI NtEnumerateValueKey(DWORD x1,DWORD x2,DWORD x3,DWORD x4,DWORD x5, DWORD x6) {
519 FIXME(ntdll,"(0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx) stub!\n",x1,x2,x3,x4,x5, x6);
520 return 1;