ad6265da3cd99a88dda48d8fd2886f15124598f8
[reactos.git] / reactos / include / ddk / zw.h
1 /*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS kernel
4 * PURPOSE: System call definitions
5 * FILE: include/ddk/zw.h
6 * REVISION HISTORY:
7 * ??/??/??: First few functions (David Welch)
8 * ??/??/??: Complete implementation by Boudewijn Dekker
9 * 13/07/98: Reorganised things a bit (David Welch)
10 */
11
12 #ifndef __DDK_ZW_H
13 #define __DDK_ZW_H
14
15 #include <windows.h>
16
17 /*
18 * FUNCTION: Closes an object handle
19 * ARGUMENTS:
20 * Handle = Handle to the object
21 * RETURNS: Status
22 */
23 NTSTATUS ZwClose(HANDLE Handle);
24
25 /*
26 * FUNCTION: Creates or opens a directory object, which is a container for
27 * other objects
28 * ARGUMENTS:
29 * DirectoryHandle (OUT) = Points to a variable which stores the
30 * handle for the directory on success
31 * DesiredAccess = Type of access the caller requires to the directory
32 * ObjectAttributes = Structures specifing the object attributes,
33 * initialized with InitializeObjectAttributes
34 * RETURNS: Status
35 */
36 NTSTATUS ZwCreateDirectoryObject(PHANDLE DirectoryHandle,
37 ACCESS_MASK DesiredAccess,
38 POBJECT_ATTRIBUTES ObjectAttributes);
39
40 /*
41 * FUNCTION: Creates or opens a registry key
42 * ARGUMENTS:
43 * KeyHandle (OUT) = Points to a variable which stores the handle
44 * for the key on success
45 * DesiredAccess = Access desired by the caller to the key
46 * ObjectAttributes = Initialized object attributes for the key
47 * TitleIndex = Who knows?
48 * Class = Object class of the key?
49 * CreateOptions = Options for the key creation
50 * Disposition (OUT) = Points to a variable which a status value
51 * indicating whether a new key was created
52 * RETURNS: Status
53 */
54 NTSTATUS ZwCreateKey(PHANDLE KeyHandle, ACCESS_MASK DesiredAccess,
55 POBJECT_ATTRIBUTES ObjectAttributes,
56 ULONG TitleIndex, PUNICODE_STRING Class,
57 ULONG CreateOptions, PULONG Disposition);
58
59 /*
60 * FUNCTION: Deletes a registry key
61 * ARGUMENTS:
62 * KeyHandle = Handle of the key
63 * RETURNS: Status
64 */
65 NTSTATUS ZwDeleteKey(HANDLE KeyHandle);
66
67 /*
68 * FUNCTION: Returns information about the subkeys of an open key
69 * ARGUMENTS:
70 * KeyHandle = Handle of the key whose subkeys are to enumerated
71 * Index = zero based index of the subkey for which information is
72 * request
73 * KeyInformationClass = Type of information returned
74 * KeyInformation (OUT) = Caller allocated buffer for the information
75 * about the key
76 * Length = Length in bytes of the KeyInformation buffer
77 * ResultLength (OUT) = Caller allocated storage which holds
78 * the number of bytes of information retrieved
79 * on return
80 * RETURNS: Status
81 */
82 NTSTATUS ZwEnumerateKey(HANDLE KeyHandle, ULONG Index,
83 KEY_INFORMATION_CLASS KeyInformationClass,
84 PVOID KeyInformation, ULONG Length,
85 PULONG ResultLength);
86
87 /*
88 * FUNCTION: Returns information about the value entries of an open key
89 * ARGUMENTS:
90 * KeyHandle = Handle of the key whose value entries are to enumerated
91 * Index = zero based index of the subkey for which information is
92 * request
93 * KeyInformationClass = Type of information returned
94 * KeyInformation (OUT) = Caller allocated buffer for the information
95 * about the key
96 * Length = Length in bytes of the KeyInformation buffer
97 * ResultLength (OUT) = Caller allocated storage which holds
98 * the number of bytes of information retrieved
99 * on return
100 * RETURNS: Status
101 */
102 NTSTATUS ZwEnumerateValueKey(HANDLE KeyHandle, ULONG Index,
103 KEY_VALUE_INFORMATION_CLASS KeyInformationClass,
104 PVOID KeyInformation, ULONG Length,
105 PULONG ResultLength);
106
107
108 /*
109 * FUNCTION: Forces a registry key to be committed to disk
110 * ARGUMENTS:
111 * KeyHandle = Handle of the key to be written to disk
112 * RETURNS: Status
113 */
114 NTSTATUS ZwFlushKey(HANDLE KeyHandle);
115
116 /*
117 * FUNCTION: Changes the attributes of an object to temporary
118 * ARGUMENTS:
119 * Handle = Handle for the object
120 * RETURNS: Status
121 */
122 NTSTATUS ZwMakeTemporaryObject(HANDLE Handle);
123
124 /*
125 * FUNCTION: Maps a view of a section into the virtual address space of a
126 * process
127 * ARGUMENTS:
128 * SectionHandle = Handle of the section
129 * ProcessHandle = Handle of the process
130 * BaseAddress = Desired base address (or NULL) on entry
131 * Actual base address of the view on exit
132 * ZeroBits = Number of high order address bits that must be zero
133 * CommitSize = Size in bytes of the initially committed section of
134 * the view
135 * SectionOffset = Offset in bytes from the beginning of the section
136 * to the beginning of the view
137 * ViewSize = Desired length of map (or zero to map all) on entry
138 * Actual length mapped on exit
139 * InheritDisposition = Specified how the view is to be shared with
140 * child processes
141 * AllocateType = Type of allocation for the pages
142 * Protect = Protection for the committed region of the view
143 * RETURNS: Status
144 */
145 NTSTATUS ZwMapViewOfSection(HANDLE SectionHandle,
146 HANDLE ProcessHandle,
147 PVOID* BaseAddress,
148 ULONG ZeroBits,
149 ULONG CommitSize,
150 PLARGE_INTEGER SectionOffset,
151 PULONG ViewSize,
152 SECTION_INHERIT InheritDisposition,
153 ULONG AllocationType,
154 ULONG Protect);
155
156 /*
157 * FUNCTION: Opens an existing key in the registry
158 * ARGUMENTS:
159 * KeyHandle (OUT) = Caller supplied storage for the resulting handle
160 * DesiredAccess = Requested access to the key
161 * ObjectAttribute = Initialized attributes for the object
162 * RETURNS: Status
163 */
164 NTSTATUS ZwOpenKey(PHANDLE KeyHandle, ACCESS_MASK DesiredAccess,
165 POBJECT_ATTRIBUTES ObjectAttributes);
166
167 /*
168 * FUNCTION: Opens an existing section object
169 * ARGUMENTS:
170 * KeyHandle (OUT) = Caller supplied storage for the resulting handle
171 * DesiredAccess = Requested access to the key
172 * ObjectAttribute = Initialized attributes for the object
173 * RETURNS: Status
174 */
175 NTSTATUS ZwOpenSection(PHANDLE KeyHandle, ACCESS_MASK DesiredAccess,
176 POBJECT_ATTRIBUTES ObjectAttributes);
177
178 /*
179 * FUNCTION: Returns information about an open file
180 * ARGUMENTS:
181 * FileHandle = Handle of the file to be queried
182 * IoStatusBlock (OUT) = Caller supplied storage for the result
183 * FileInformation (OUT) = Caller supplied storage for the file
184 * information
185 * Length = Length in bytes of the buffer for file information
186 * FileInformationClass = Type of information to be returned
187 * RETURNS: Status
188 */
189 NTSTATUS ZwQueryInformationFile(HANDLE FileHandle,
190 PIO_STATUS_BLOCK IoStatusBlock,
191 PVOID FileInformation,
192 ULONG Length,
193 FILE_INFORMATION_CLASS FileInformationClass);
194
195 #ifndef _NTNATIVE
196 #define _NTNATIVE
197
198 #ifdef __cplusplus
199 extern "C" {
200 #endif /* __cplusplus */
201
202 #include <kernel32/heap.h>
203
204 #if KERNEL_SUPPORTS_OBJECT_ATTRIBUTES_CORRECTLY
205 typedef struct _OBJECT_ATTRIBUTES {
206 ULONG Length;
207 HANDLE RootDirectory;
208 PUNICODE_STRING ObjectName;
209 ULONG Attributes;
210 SECURITY_DESCRIPTOR *SecurityDescriptor;
211 SECURITY_QUALITY_OF_SERVICE *SecurityQualityOfService;
212 } OBJECT_ATTRIBUTES, *POBJECT_ATTRIBUTES;
213 #endif
214
215 #if IOTYPES_DIDNT_DECLARE_THIS
216 typedef struct _IO_STATUS_BLOCK {
217 NTSTATUS Status;
218 ULONG Information;
219 } IO_STATUS_BLOCK, *PIO_STATUS_BLOCK;
220 #endif
221
222
223 //typedef LARGE_INTEGER *PLARGE_INTEGER;
224
225 //
226
227 #define NtCurrentProcess() ( (HANDLE) 0xFFFFFFFF )
228 #define NtCurrentThread() ( (HANDLE) 0xFFFFFFFE )
229
230
231
232 // event access mask
233
234 #define EVENT_READ_ACCESS 0x0001
235 #define EVENT_WRITE_ACCESS 0x0002
236
237
238 //process query / set information class
239
240 #define ProcessBasicInformation 0
241 #define ProcessQuotaLimits 1
242 #define ProcessIoCounters 2
243 #define ProcessVmCounters 3
244 #define ProcessTimes 4
245 #define ProcessBasePriority 5
246 #define ProcessRaisePriority 6
247 #define ProcessDebugPort 7
248 #define ProcessExceptionPort 8
249 #define ProcessAccessToken 9
250 #define ProcessLdtInformation 10
251 #define ProcessLdtSize 11
252 #define ProcessDefaultHardErrorMode 12
253 #define ProcessIoPortHandlers 13
254 #define ProcessPooledUsageAndLimits 14
255 #define ProcessWorkingSetWatch 15
256 #define ProcessUserModeIOPL 16
257 #define ProcessEnableAlignmentFaultFixup 17
258 #define ProcessPriorityClass 18
259 #define ProcessWx86Information 19
260 #define ProcessHandleCount 20
261 #define ProcessAffinityMask 21
262 #define MaxProcessInfoClass 22
263
264 // thread query / set information class
265
266 #define ThreadBasicInformation 0
267 #define ThreadTimes 1
268 #define ThreadPriority 2
269 #define ThreadBasePriority 3
270 #define ThreadAffinityMask 4
271 #define ThreadImpersonationToken 5
272 #define ThreadDescriptorTableEntry 6
273 #define ThreadEnableAlignmentFaultFixup 7
274 #define ThreadEventPair 8
275 #define ThreadQuerySetWin32StartAddress 9
276 #define ThreadZeroTlsCell 10
277 #define ThreadPerformanceCount 11
278 #define ThreadAmILastThread 12
279 #define ThreadIdealProcessor 13
280 #define ThreadPriorityBoost 14
281 #define MaxThreadInfoClass 15
282
283
284 // key query information class
285
286 #define KeyBasicInformation 0
287 #define KeyNodeInformation 1
288 #define KeyFullInformation 2
289
290
291 // key set information class
292
293 #define KeyWriteTimeInformation 0
294
295 // key value information class
296
297 #define KeyValueBasicInformation 0
298 #define KeyValueFullInformation 1
299 #define KeyValuePartialInformation 2
300
301 // object handle information
302
303 #define HandleBasicInformation 4
304
305 // system information
306
307 #define SystemTimeAdjustmentInformation 28
308
309
310 // file information
311
312
313 #define FileDirectoryInformation 1
314 #define FileFullDirectoryInformation 2
315 #define FileBothDirectoryInformation 3
316 #define FileBasicInformation 4
317 #define FileStandardInformation 5
318 #define FileInternalInformation 6
319 #define FileEaInformation 7
320 #define FileAccessInformation 8
321 #define FileNameInformation 9
322 #define FileRenameInformation 10
323 #define FileLinkInformation 11
324 #define FileNamesInformation 12
325 #define FileDispositionInformation 13
326 #define FilePositionInformation 14
327 #define FileFullEaInformation 15
328 #define FileModeInformation 16
329 #define FileAlignmentInformation 17
330 #define FileAllInformation 18
331 #define FileAllocationInformation 19
332 #define FileEndOfFileInformation 20
333 #define FileAlternateNameInformation 21
334 #define FileStreamInformation 22
335 #define FilePipeInformation 23
336 #define FilePipeLocalInformation 24
337 #define FilePipeRemoteInformation 25
338 #define FileMailslotQueryInformation 26
339 #define FileMailslotSetInformation 27
340 #define FileCompressionInformation 28
341 #define FileCopyOnWriteInformation 29
342 #define FileCompletionInformation 30
343 #define FileMoveClusterInformation 31
344 #define FileOleClassIdInformation 32
345 #define FileOleStateBitsInformation 33
346 #define FileNetworkOpenInformation 34
347 #define FileObjectIdInformation 35
348 #define FileOleAllInformation 36
349 #define FileOleDirectoryInformation 37
350 #define FileContentIndexInformation 38
351 #define FileInheritContentIndexInformation 39
352 #define FileOleInformation 40
353 #define FileMaximumInformation 41
354
355
356
357 //file system information class values
358
359
360
361 #define FileFsVolumeInformation 1
362 #define FileFsLabelInformation 2
363 #define FileFsSizeInformation 3
364 #define FileFsDeviceInformation 4
365 #define FileFsAttributeInformation 5
366 #define FileFsControlInformation 6
367 #define FileFsQuotaQueryInformation 7
368 #define FileFsQuotaSetInformation 8
369 #define FileFsMaximumInformation 9
370
371 // wait type
372
373 #define WaitAll 0
374 #define WaitAny 1
375
376
377 // key restore flags
378
379 #define REG_WHOLE_HIVE_VOLATILE (0x00000001L)
380 #define REG_REFRESH_HIVE (0x00000002L)
381
382
383 #define OBJ_NAME_PATH_SEPARATOR ((WCHAR)L'\\')
384
385 // object type access rights
386
387 #define OBJECT_TYPE_CREATE (0x0001)
388 #define OBJECT_TYPE_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | 0x1)
389
390
391 // directory access rights
392
393 #define DIRECTORY_QUERY (0x0001)
394 #define DIRECTORY_TRAVERSE (0x0002)
395 #define DIRECTORY_CREATE_OBJECT (0x0004)
396 #define DIRECTORY_CREATE_SUBDIRECTORY (0x0008)
397
398 #define DIRECTORY_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | 0xF)
399
400 // symbolic link access rights
401
402 #define SYMBOLIC_LINK_QUERY (0x0001)
403 #define SYMBOLIC_LINK_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | 0x1)
404
405 typedef struct _PROCESS_WS_WATCH_INFORMATION {
406 PVOID FaultingPc;
407 PVOID FaultingVa;
408 } PROCESS_WS_WATCH_INFORMATION, *PPROCESS_WS_WATCH_INFORMATION;
409
410 typedef struct _PROCESS_BASIC_INFORMATION {
411 NTSTATUS ExitStatus;
412 PPEB PebBaseAddress;
413 KAFFINITY AffinityMask;
414 KPRIORITY BasePriority;
415 ULONG UniqueProcessId;
416 ULONG InheritedFromUniqueProcessId;
417 } PROCESS_BASIC_INFORMATION, *PPROCESS_BASIC_INFORMATION;
418
419 typedef struct _QUOTA_LIMITS {
420 ULONG PagedPoolLimit;
421 ULONG NonPagedPoolLimit;
422 ULONG MinimumWorkingSetSize;
423 ULONG MaximumWorkingSetSize;
424 ULONG PagefileLimit;
425 LARGE_INTEGER TimeLimit;
426 } QUOTA_LIMITS, *PQUOTA_LIMITS;
427
428 typedef struct _IO_COUNTERS {
429 ULONG ReadOperationCount;
430 ULONG WriteOperationCount;
431 ULONG OtherOperationCount;
432 LARGE_INTEGER ReadTransferCount;
433 LARGE_INTEGER WriteTransferCount;
434 LARGE_INTEGER OtherTransferCount;
435 } IO_COUNTERS, *PIO_COUNTERS;
436
437
438 typedef struct _VM_COUNTERS {
439 ULONG PeakVirtualSize;
440 ULONG VirtualSize;
441 ULONG PageFaultCount;
442 ULONG PeakWorkingSetSize;
443 ULONG WorkingSetSize;
444 ULONG QuotaPeakPagedPoolUsage;
445 ULONG QuotaPagedPoolUsage;
446 ULONG QuotaPeakNonPagedPoolUsage;
447 ULONG QuotaNonPagedPoolUsage;
448 ULONG PagefileUsage;
449 ULONG PeakPagefileUsage;
450 } VM_COUNTERS, *PVM_COUNTERS;
451
452
453 typedef struct _POOLED_USAGE_AND_LIMITS {
454 ULONG PeakPagedPoolUsage;
455 ULONG PagedPoolUsage;
456 ULONG PagedPoolLimit;
457 ULONG PeakNonPagedPoolUsage;
458 ULONG NonPagedPoolUsage;
459 ULONG NonPagedPoolLimit;
460 ULONG PeakPagefileUsage;
461 ULONG PagefileUsage;
462 ULONG PagefileLimit;
463 } POOLED_USAGE_AND_LIMITS, *PPOOLED_USAGE_AND_LIMITS;
464
465
466 typedef struct _PROCESS_ACCESS_TOKEN {
467 HANDLE Token;
468 HANDLE Thread;
469
470 } PROCESS_ACCESS_TOKEN, *PPROCESS_ACCESS_TOKEN;
471
472 typedef struct _KERNEL_USER_TIMES {
473 LARGE_INTEGER CreateTime;
474 LARGE_INTEGER ExitTime;
475 LARGE_INTEGER KernelTime;
476 LARGE_INTEGER UserTime;
477 } KERNEL_USER_TIMES;
478 typedef KERNEL_USER_TIMES *PKERNEL_USER_TIMES;
479
480 // exception structures
481
482
483 #define TEB_EXCEPTION_FRAME(pcontext) ((PEXCEPTION_FRAME)((TEB *)GET_SEL_BASE((pcontext)->SegFs))->except)
484
485
486 typedef struct _OBJECT_NAME_INFORMATION {
487 UNICODE_STRING Name;
488 } OBJECT_NAME_INFORMATION, *POBJECT_NAME_INFORMATION;
489
490
491 // section information
492
493
494 // handle information
495
496 //#define HANDLE_FLAG_INHERIT 0x00000001
497 //#define HANDLE_FLAG_PROTECT_FROM_CLOSE 0x00000002
498
499
500 typedef struct _HANDLE_INFO
501 {
502 BOOL bInheritHanlde;
503 BOOL bProtectFromClose;
504 } HANDLE_INFO;
505 typedef HANDLE_INFO *PHANDLE_INFO;
506
507
508
509 typedef struct _SYSTEM_TIME_ADJUSTMENT
510 {
511 DWORD dwTimeAdjustment;
512 BOOL bTimeAdjustmentDisabled;
513 } SYSTEM_TIME_ADJUSTMENT, *PSYSTEM_TIME_ADJUSTMENT;
514
515
516 // file information
517
518 // asynchorneous procedure call
519
520
521 typedef struct _FILE_BASIC_INFORMATION {
522 LARGE_INTEGER CreationTime;
523 LARGE_INTEGER LastAccessTime;
524 LARGE_INTEGER LastWriteTime;
525 LARGE_INTEGER ChangeTime;
526 ULONG FileAttributes;
527 } FILE_BASIC_INFORMATION, *PFILE_BASIC_INFORMATION;
528
529 typedef struct _FILE_STANDARD_INFORMATION {
530 LARGE_INTEGER AllocationSize;
531 LARGE_INTEGER EndOfFile;
532 ULONG NumberOfLinks;
533 BOOLEAN DeletePending;
534 BOOLEAN Directory;
535 } FILE_STANDARD_INFORMATION, *PFILE_STANDARD_INFORMATION;
536
537 typedef struct _FILE_POSITION_INFORMATION {
538 LARGE_INTEGER CurrentByteOffset;
539 } FILE_POSITION_INFORMATION, *PFILE_POSITION_INFORMATION;
540
541 typedef struct _FILE_ALIGNMENT_INFORMATION {
542 ULONG AlignmentRequirement;
543 } FILE_ALIGNMENT_INFORMATION, *PFILE_ALIGNMENT_INFORMATION;
544
545 typedef struct _FILE_DISPOSITION_INFORMATION {
546 BOOLEAN DeleteFile;
547 } FILE_DISPOSITION_INFORMATION, *PFILE_DISPOSITION_INFORMATION;
548
549 typedef struct _FILE_END_OF_FILE_INFORMATION {
550 LARGE_INTEGER EndOfFile;
551 } FILE_END_OF_FILE_INFORMATION, *PFILE_END_OF_FILE_INFORMATION;
552
553
554 typedef struct _FILE_FULL_EA_INFORMATION {
555 ULONG NextEntryOffset;
556 UCHAR Flags;
557 UCHAR EaNameLength;
558 USHORT EaValueLength;
559 CHAR EaName[1];
560 } FILE_FULL_EA_INFORMATION;
561 typedef FILE_FULL_EA_INFORMATION *PFILE_FULL_EA_INFORMATION;
562
563
564
565 // file system information structures
566
567 typedef struct _FILE_FS_DEVICE_INFORMATION {
568 DEVICE_TYPE DeviceType;
569 ULONG Characteristics;
570 } FILE_FS_DEVICE_INFORMATION;
571 typedef FILE_FS_DEVICE_INFORMATION *PFILE_FS_DEVICE_INFORMATION;
572
573
574 // timer apc routine [ possible incompatible with ms winnt ]
575
576 typedef
577 VOID
578 (*PTIMERAPCROUTINE) (
579 PVOID Argument,
580 PVOID Context
581 );
582
583 // shutdown action [ possible incompatible with ms winnt ]
584 // this might be parameter to specify how to shutdown
585 typedef
586 VOID
587 (*SHUTDOWN_ACTION) (
588 VOID
589 );
590
591 //NtAcceptConnectPort
592 //NtAccessCheck
593 //NtAccessCheckAndAuditAlarm
594
595 NTSTATUS
596 STDCALL
597 NtAddAtom(
598 IN PUNICODE_STRING pString
599 );
600
601 //NtAdjustGroupsToken
602 //NtAdjustPrivilegesToken
603 //NtAlertResumeThread
604 //NtAlertThread
605 //NtAllocateLocallyUniqueId
606 //NtAllocateUuids
607
608
609 NTSTATUS
610 STDCALL
611 NtAllocateVirtualMemory(
612 IN HANDLE hProcess,
613 OUT LPVOID lpAddress,
614 IN ULONG uWillThingAbThis,
615 IN DWORD dwSize,
616 IN DWORD flAllocationType,
617 IN DWORD flProtect
618 );
619
620 // NtCallbackReturn
621 // NtCancelIoFile
622
623 NTSTATUS
624 STDCALL
625 NtCancelTimer(
626 IN HANDLE TimerHandle,
627 IN BOOL Resume
628 );
629
630 NTSTATUS
631 STDCALL
632 NtClearEvent(
633 IN HANDLE EventHandle
634 );
635
636
637 NTSTATUS
638 STDCALL
639 NtClose(
640 IN HANDLE Handle
641 );
642
643 // NtCloseObjectAuditAlarm
644 // NtCompleteConnectPort
645 // NtConnectPort
646
647 NTSTATUS
648 STDCALL
649 NtContinue(
650 IN PCONTEXT Context
651 );
652
653 //NtCreateChannel
654
655
656 NTSTATUS
657 STDCALL
658 NtCreateDirectoryObject(
659 OUT PHANDLE DirectoryHandle,
660 IN ACCESS_MASK DesiredAccess,
661 IN POBJECT_ATTRIBUTES ObjectAttributes
662 );
663
664 NTSTATUS
665 STDCALL
666 NtCreateEvent(
667 OUT PHANDLE FileHandle,
668 IN ACCESS_MASK DesiredAccess,
669 IN POBJECT_ATTRIBUTES ObjectAttributes,
670 IN BOOL ManualReset,
671 IN BOOL InitialState
672 );
673 //NtCreateEventPair
674
675
676 NTSTATUS
677 STDCALL
678 NtCreateFile(
679 OUT PHANDLE FileHandle,
680 IN ACCESS_MASK DesiredAccess,
681 IN POBJECT_ATTRIBUTES ObjectAttributes,
682 OUT PIO_STATUS_BLOCK IoStatusBlock,
683 IN PLARGE_INTEGER AllocationSize OPTIONAL,
684 IN ULONG FileAttributes,
685 IN ULONG ShareAccess,
686 IN ULONG CreateDisposition,
687 IN ULONG CreateOptions,
688 IN PVOID EaBuffer OPTIONAL,
689 IN ULONG EaLength
690 );
691
692 // NtCreateIoCompletion
693
694 NTSTATUS
695 STDCALL
696 NtCreateKey(
697 OUT PHANDLE KeyHandle,
698 IN ACCESS_MASK DesiredAccess,
699 IN POBJECT_ATTRIBUTES ObjectAttributes,
700 IN ULONG TitleIndex,
701 IN PUNICODE_STRING Class OPTIONAL,
702 IN ULONG CreateOptions,
703 IN PULONG Disposition OPTIONAL
704 );
705 // NtCreateMailslotFile
706 //-- NtCreateMutant
707 //-- NtCreateNamedPipeFile
708 //-- NtCreatePagingFile
709 //-- NtCreatePort
710
711 NTSTATUS
712 STDCALL
713 NtCreateProcess(
714 OUT PHANDLE ProcessHandle,
715 IN ACCESS_MASK DesiredAccess,
716 IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL,
717 IN HANDLE ParentProcess,
718 IN BOOLEAN InheritObjectTable,
719 IN HANDLE SectionHandle OPTIONAL,
720 IN HANDLE DebugPort OPTIONAL,
721 IN HANDLE ExceptionPort OPTIONAL
722 );
723 // NtCreateProfile
724
725 NTSTATUS
726 STDCALL
727 NtCreateSection(
728 OUT PHANDLE SectionHandle,
729 IN ACCESS_MASK DesiredAccess,
730 IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL,
731 IN PLARGE_INTEGER MaximumSize OPTIONAL,
732 IN ULONG SectionPageProtection OPTIONAL,
733 IN ULONG AllocationAttributes,
734 IN HANDLE FileHandle OPTIONAL
735 );
736
737 NTSTATUS
738 STDCALL
739 NtCreateSemaphore(
740 OUT PHANDLE SemaphoreHandle,
741 IN ACCESS_MASK DesiredAccess,
742 IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL,
743 IN ULONG InitialCount,
744 IN ULONG MaximumCount
745 );
746 // NtCreateSymbolicLinkObject
747
748 NTSTATUS
749 STDCALL
750 NtCreateThread(
751 OUT PHANDLE ThreadHandle,
752 IN ACCESS_MASK DesiredAccess,
753 IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL,
754 IN HANDLE ProcessHandle,
755 IN PCLIENT_ID ClientId,
756 IN PCONTEXT ThreadContext,
757 IN PINITIAL_TEB InitialTeb,
758 IN BOOLEAN CreateSuspended
759 );
760
761 NTSTATUS
762 STDCALL
763 NtCreateTimer(
764 OUT PHANDLE TimerHandle,
765 IN ACCESS_MASK DesiredAccess,
766 IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL,
767 IN LONG ManualReset
768 );
769 //-- NtCreateToken
770
771 NT_TEB
772 STDCALL
773 NtCurrentTeb(
774 VOID
775 );
776
777 NTSTATUS
778 STDCALL
779 NtDelayExecution(
780 IN BOOL Alertable,
781 IN PLARGE_INTEGER Interval
782 );
783
784
785 NTSTATUS
786 STDCALL
787 NtDeleteAtom(
788 IN ATOM Atom
789 );
790
791
792 NTSTATUS
793 STDCALL
794 NtDeleteFile(
795 IN HANDLE FileHandle
796 );
797
798
799 NTSTATUS
800 STDCALL
801 NtDeleteKey(
802 IN HANDLE KeyHandle
803 );
804 // NtDeleteObjectAuditAlarm
805 // NtDeleteValueKey
806 // NtDeviceIoControlFile
807
808 NTSTATUS
809 STDCALL
810 NtDisplayString(
811 IN PUNICODE_STRING DisplayString
812 );
813
814 NTSTATUS
815 STDCALL
816 NtDuplicateObject(
817 IN HANDLE SourceProcessHandle,
818 IN PHANDLE SourceHandle,
819 IN HANDLE TargetProcessHandle,
820 OUT PHANDLE TargetHandle,
821 IN ULONG dwDesiredAccess,
822 IN ULONG InheritHandle
823 );
824 // NtDuplicateToken
825
826 NTSTATUS
827 STDCALL
828 NtEnumerateKey(
829 IN HANDLE KeyHandle,
830 IN ULONG Index,
831 IN CINT KeyInformationClass,
832 OUT PVOID KeyInformation,
833 IN ULONG Length,
834 OUT PULONG ResultLength
835 );
836
837 NTSTATUS
838 STDCALL
839 NtEnumerateValueKey(
840 IN HANDLE KeyHandle,
841 IN ULONG Index,
842 IN CINT KeyValueInformationClass,
843 OUT PVOID KeyValueInformation,
844 IN ULONG Length,
845 OUT PULONG ResultLength
846 );
847 //NtExtendSection
848
849 ATOM
850 STDCALL
851 NtFindAtom(
852 IN PUNICODE_STRING AtomString
853 );
854
855 NTSTATUS
856 STDCALL
857 NtFlushBuffersFile(
858 IN HANDLE FileHandle
859 );
860
861 NTSTATUS
862 STDCALL
863 NtFlushInstructionCache(
864 IN HANDLE ProcessHandle,
865 IN PVOID BaseAddress,
866 IN UINT Size
867 );
868
869 NTSTATUS
870 STDCALL
871 NtFlushKey(
872 IN HANDLE KeyHandle
873 );
874
875 /*
876 * FIXME: Is the return type correct? (David Welch)
877 */
878 NTSTATUS
879 STDCALL
880 NtFlushVirtualMemory(
881 IN HANDLE ProcessHandle,
882 IN VOID *BaseAddress,
883 IN ULONG NumberOfBytesToFlush,
884 IN PULONG NumberOfBytesFlushed
885 );
886
887 VOID
888 STDCALL
889 NtFlushWriteBuffer (
890 VOID
891 );
892
893 NTSTATUS
894 STDCALL
895 NtFreeVirtualMemory(
896 IN PHANDLE hProcess,
897 IN LPVOID lpAddress, // address of region of committed pages
898 IN DWORD dwSize, // size of region
899 IN DWORD dwFreeType
900 );
901 //-- NtFsControlFile
902
903 NTSTATUS
904 STDCALL
905 NtGetContextThread(
906 IN HANDLE ThreadHandle,
907 OUT PCONTEXT Context
908 );
909 // NtGetPlugPlayEvent
910 // NtGetTickCount
911 // NtImpersonateClientOfPort
912 // NtImpersonateThread
913 // NtInitializeRegistry
914 // NtListenChannel
915 // NtListenPort
916
917 NTSTATUS
918 STDCALL
919 NtLoadDriver(
920 IN PUNICODE_STRING DriverServiceName
921 );
922
923 //NtLoadKey2
924 //NtLoadKey
925 //NtLockFile
926 //NtLockVirtualMemory
927
928 NTSTATUS
929 STDCALL
930 NtMakeTemporaryObject(
931 OUT HANDLE Handle
932 );
933
934 NTSTATUS
935 STDCALL
936 NtMapViewOfSection(
937 IN HANDLE SectionHandle,
938 IN HANDLE ProcessHandle,
939 IN OUT PVOID *BaseAddress,
940 IN ULONG ZeroBits,
941 IN ULONG CommitSize,
942 IN OUT PLARGE_INTEGER SectionOffset OPTIONAL,
943 IN OUT PULONG ViewSize,
944 IN SECTION_INHERIT InheritDisposition,
945 IN ULONG AllocationType,
946 IN ULONG Protect
947 );
948
949 // NtNotifyChangeDirectoryFile
950 // NtNotifyChangeKey
951 // NtOpenChannel
952
953 NTSTATUS
954 STDCALL
955 NtOpenDirectoryObject(
956 OUT PHANDLE DirectoryHandle,
957 IN ACCESS_MASK DesiredAccess,
958 IN POBJECT_ATTRIBUTES ObjectAttributes
959 );
960
961 NTSTATUS
962 STDCALL
963 NtOpenEvent(
964 OUT PHANDLE EventHandle,
965 IN ACCESS_MASK DesiredAccess,
966 IN POBJECT_ATTRIBUTES ObjectAttributes
967 );
968 // NtOpenEventPair
969
970 NTSTATUS
971 STDCALL
972 NtOpenFile(
973 OUT PHANDLE FileHandle,
974 IN ACCESS_MASK DesiredAccess,
975 IN POBJECT_ATTRIBUTES ObjectAttributes,
976 OUT PIO_STATUS_BLOCK IoStatusBlock,
977 IN ULONG ShareAccess,
978 IN ULONG FileAttributes
979 );
980 // NtOpenIoCompletion
981
982 NTSTATUS
983 STDCALL
984 NtOpenKey(
985 OUT PHANDLE KeyHandle,
986 IN ACCESS_MASK DesiredAccess,
987 IN POBJECT_ATTRIBUTES ObjectAttributes
988 );
989 // NtOpenMutant
990 // NtOpenObjectAuditAlarm
991 NTSTATUS NtOpenProcess (
992 OUT PHANDLE ProcessHandle,
993 IN ACCESS_MASK DesiredAccess,
994 IN POBJECT_ATTRIBUTES ObjectAttributes,
995 IN PCLIENT_ID ClientId
996 );
997
998 // NtOpenProcessToken
999
1000 NTSTATUS
1001 STDCALL
1002 NtOpenSection(
1003 OUT PHANDLE SectionHandle,
1004 IN ACCESS_MASK DesiredAccess,
1005 IN POBJECT_ATTRIBUTES ObjectAttributes
1006 );
1007 // NtOpenSemaphore
1008 NTSTATUS
1009 STDCALL
1010 NtOpenSymbolicLinkObject(
1011 OUT PHANDLE SymbolicLinkHandle,
1012 IN ACCESS_MASK DesiredAccess,
1013 IN POBJECT_ATTRIBUTES ObjectAttributes
1014 );
1015
1016 NTSTATUS
1017 STDCALL
1018 NtOpenThread(
1019 OUT PHANDLE ThreadHandle,
1020 IN ACCESS_MASK DesiredAccess,
1021 IN POBJECT_ATTRIBUTES ObjectAttributes
1022 );
1023 //NtOpenThreadToken
1024
1025 NTSTATUS
1026 STDCALL
1027 NtOpenTimer(
1028 OUT PHANDLE TimerHandle,
1029 IN ACCESS_MASK DesiredAccess,
1030 IN POBJECT_ATTRIBUTES ObjectAttributes
1031 );
1032 // NtPlugPlayControl
1033 // NtPrivilegeCheck
1034 // NtPrivilegeObjectAuditAlarm
1035 // NtPrivilegedServiceAuditAlarm
1036 // NtProtectVirtualMemory
1037
1038 NTSTATUS
1039 STDCALL
1040 NtPulseEvent(
1041 IN HANDLE EventHandle,
1042 IN BOOL Unknown OPTIONAL
1043 );
1044 // NtQueryAttributesFile
1045 // NtQueryDefaultLocale
1046 // NtQueryDirectoryFile
1047
1048 NTSTATUS
1049 STDCALL
1050 NtQueryDirectoryObject(
1051 IN HANDLE DirectoryHandle,
1052 OUT PIO_STATUS_BLOCK IoStatusBlock,
1053 IN PLARGE_INTEGER AllocationSize OPTIONAL,
1054 IN ULONG FileAttributes,
1055 IN ULONG ShareAccess,
1056 IN PVOID Buffer ,
1057 IN ULONG Length
1058 );
1059
1060 NTSTATUS
1061 STDCALL
1062 NtQueryEaFile(
1063 IN HANDLE FileHandle,
1064 OUT PIO_STATUS_BLOCK IoStatusBlock,
1065 IN PVOID EaBuffer ,
1066 IN ULONG EaLength,
1067 ULONG Unknown1 ,
1068 ULONG Unknown2 ,
1069 ULONG Unknown3 ,
1070 ULONG Unknown4 ,
1071 IN CINT FileInformationClass
1072 );
1073 //-- NtQueryEvent
1074 //-- NtQueryFullAttributesFile
1075 //-- NtQueryInformationAtom
1076
1077 NTSTATUS
1078 STDCALL
1079 NtQueryInformationFile(
1080 IN HANDLE FileHandle,
1081 OUT PIO_STATUS_BLOCK IoStatusBlock,
1082 OUT PVOID FileInformation,
1083 IN ULONG Length,
1084 IN CINT FileInformationClass
1085 );
1086 //NtQueryInformationPort
1087
1088 /*
1089 ProcessWorkingSetWatch PROCESS_WS_WATCH_INFORMATION
1090 ProcessBasicInfo PROCESS_BASIC_INFORMATION
1091 ProcessQuotaLimits QUOTA_LIMITS
1092 ProcessPooledQuotaLimits QUOTA_LIMITS
1093 ProcessIoCounters IO_COUNTERS
1094 ProcessVmCounters VM_COUNTERS
1095 ProcessPooledUsageAndLimits POOLED_USAGE_AND_LIMITS
1096 ProcessTimes KERNEL_USER_TIMES
1097 */
1098
1099
1100
1101 NTSTATUS
1102 STDCALL
1103 NtQueryInformationProcess(
1104 IN HANDLE ProcessHandle,
1105 IN CINT ProcessInformationClass,
1106 OUT PVOID ProcessInformation,
1107 IN ULONG ProcessInformationLength,
1108 OUT PULONG ReturnLength
1109 );
1110
1111 /*
1112 ThreadTimes KERNEL_USER_TIMES
1113 */
1114
1115 NTSTATUS
1116 STDCALL
1117 NtQueryInformationThread(
1118 IN HANDLE ThreadHandle,
1119 IN CINT ThreadInformationClass,
1120 OUT PVOID ThreadInformation,
1121 IN ULONG ThreadInformationLength,
1122 OUT PULONG ReturnLength
1123 );
1124 // NtQueryInformationToken
1125 // NtQueryIntervalProfile
1126 // NtQueryIoCompletion
1127
1128 NTSTATUS
1129 STDCALL
1130 NtQueryKey(
1131 IN HANDLE KeyHandle,
1132 IN CINT KeyInformationClass,
1133 OUT PVOID KeyInformation,
1134 IN ULONG Length,
1135 OUT PULONG ResultLength
1136 );
1137 //-- NtQueryMultipleValueKey
1138 //-- NtQueryMutant
1139
1140 NTSTATUS
1141 STDCALL
1142 NtQueryObject(
1143 IN HANDLE ObjectHandle,
1144 IN CINT HandleInformationClass,
1145 OUT PHANDLE_INFO HandleInfo,
1146 IN ULONG Length,
1147 OUT PULONG ResultLength);
1148 //NtQueryOleDirectoryFile
1149
1150 NTSTATUS
1151 STDCALL
1152 NtQueryPerformanceCounter(
1153 IN PULONG Count,
1154 IN PULONG Frequency
1155 );
1156
1157 // NtQuerySection
1158 //-- NtQuerySecurityObject
1159 //-- NtQuerySemaphore
1160
1161 NTSTATUS
1162 STDCALL
1163 NtQuerySymbolicLinkObject(
1164 IN HANDLE SymbolicLinkHandle,
1165 OUT PUNICODE_STRING TargetName, /* target device name */
1166 IN PULONG Length
1167 );
1168 //-- NtQuerySystemEnvironmentValue
1169 NTSTATUS
1170 STDCALL
1171 NtQuerySystemInformation(
1172 IN CINT SystemInformationClass,
1173 OUT PVOID SystemInformation,
1174 IN ULONG SystemInformationLength
1175 );
1176
1177 NTSTATUS
1178 STDCALL
1179 NtQuerySystemTime (
1180 OUT PLARGE_INTEGER CurrentTime
1181 );
1182 //-- NtQueryTimer
1183 //-- NtQueryTimerResolution
1184
1185 NTSTATUS
1186 STDCALL
1187 NtQueryValueKey(
1188 IN HANDLE KeyHandle,
1189 IN PUNICODE_STRING ValueName,
1190 IN CINT KeyValueInformationClass,
1191 OUT PVOID KeyValueInformation,
1192 IN ULONG Length,
1193 OUT PULONG ResultLength
1194 );
1195 //-- NtQueryVirtualMemory
1196
1197 NTSTATUS
1198 STDCALL
1199 NtQueryVolumeInformationFile(
1200 IN HANDLE FileHandle,
1201 OUT PIO_STATUS_BLOCK IoStatusBlock,
1202 OUT PVOID VolumeInformation,
1203 IN ULONG Length,
1204 IN CINT FSInformationClass // dont know
1205 );
1206 // NtQueueApcThread
1207
1208 NTSTATUS
1209 STDCALL
1210 NtRaiseException(
1211 IN PEXCEPTION_RECORD ExceptionRecord,
1212 IN PCONTEXT CONTEXT,
1213 IN BOOL bUnknown OPTIONAL
1214 );
1215
1216 NTSTATUS
1217 STDCALL
1218 NtRaiseHardError(
1219 IN OUT ULONG Unknown1,
1220 IN OUT ULONG Unknown2,
1221 IN OUT PVOID Unknow3,
1222 IN OUT ULONG Unknow4,
1223 IN PEXCEPTION_RECORD ExceptionRecord
1224 );
1225
1226
1227 NTSTATUS
1228 STDCALL
1229 NtReadFile(
1230 IN HANDLE FileHandle,
1231 IN HANDLE Event OPTIONAL,
1232 IN PIO_APC_ROUTINE ApcRoutine OPTIONAL,
1233 IN PVOID ApcContext OPTIONAL,
1234 OUT PIO_STATUS_BLOCK IoStatusBlock,
1235 OUT PVOID Buffer,
1236 IN ULONG Length,
1237 IN PLARGE_INTEGER ByteOffset ,
1238 IN PULONG Key OPTIONAL
1239 );
1240 NTSTATUS
1241 NtReadFileScatter(
1242 IN HANDLE FileHandle,
1243 IN HANDLE Event OPTIONAL,
1244 IN PIO_APC_ROUTINE UserApcRoutine OPTIONAL,
1245 IN PVOID UserApcContext OPTIONAL,
1246 OUT PIO_STATUS_BLOCK UserIosb ,
1247 IN LARGE_INTEGER BufferDescription[],
1248 IN ULONG BufferLength,
1249 IN PLARGE_INTEGER ByteOffset,
1250 IN PULONG Key OPTIONAL
1251 );
1252
1253 //NtReadRequestData
1254
1255 NTSTATUS
1256 STDCALL
1257 NtReadVirtualMemory(
1258 IN HANDLE ProcessHandle,
1259 IN PVOID BaseAddress,
1260 OUT PVOID Buffer,
1261 IN DWORD nSize,
1262 OUT PDWORD lpNumberOfBytesRead
1263 );
1264 //--NtRegisterThreadTerminatePort
1265 //--NtReleaseMutant
1266
1267 NTSTATUS
1268 STDCALL
1269 NtReleaseSemaphore(
1270 IN HANDLE SemaphoreHandle,
1271 IN ULONG ReleaseCount,
1272 IN PULONG PreviousCount
1273 );
1274 //NtRemoveIoCompletion
1275 //NtReplaceKey
1276 //NtReplyPort
1277 //NtReplyWaitReceivePort
1278 //NtReplyWaitReplyPort
1279 //NtReplyWaitSendChannel
1280 //NtRequestPort
1281 //NtRequestWaitReplyPort
1282 //--NtResetEvent
1283 //NtRestoreKey
1284
1285 NTSTATUS
1286 STDCALL
1287 NtResumeThread(
1288 IN HANDLE ThreadHandle,
1289 IN PCONTEXT Context
1290 );
1291 //NtSaveKey
1292 //NtSendWaitReplyChannel
1293 //NtSetContextChannel
1294
1295 NTSTATUS
1296 STDCALL
1297 NtSetContextThread(
1298 IN HANDLE ThreadHandle,
1299 IN PCONTEXT Context
1300 );
1301 //--NtSetDefaultHardErrorPort
1302 //--NtSetDefaultLocale
1303 //--NtSetEaFile
1304 //--NtSetEvent
1305 //--NtSetHighEventPair
1306 //--NtSetHighWaitLowEventPair
1307 //--NtSetHighWaitLowThread
1308
1309
1310 NTSTATUS
1311 STDCALL
1312 NtSetInformationFile(
1313 IN HANDLE FileHandle,
1314 IN PIO_STATUS_BLOCK IoStatusBlock,
1315 IN PVOID FileInformation,
1316 IN ULONG Length,
1317 IN CINT FileInformationClass
1318 );
1319
1320 //KeyWriteTimeInformation KEY_WRITE_TIME_INFORMATION
1321
1322 NTSTATUS
1323 STDCALL
1324 NtSetInformationKey(
1325 IN HANDLE KeyHandle,
1326 IN CINT KeySetInformationClass,
1327 IN PVOID KeyInformation,
1328 IN ULONG KeyInformationLength
1329 );
1330 NTSTATUS
1331 STDCALL
1332 NtSetInformationObject(
1333 IN HANDLE ObjectHandle,
1334 IN CINT HandleInformationClass,
1335 IN PVOID HandleInfo,
1336 IN ULONG Length
1337 );
1338 /*
1339
1340 ProcessQuotaLimits QUOTA_LIMITS
1341 ProcessAccessToken PROCESS_ACCESS_TOKEN
1342
1343 */
1344
1345 NTSTATUS
1346 STDCALL
1347 NtSetInformationProcess(
1348 IN HANDLE ProcessHandle,
1349 IN CINT ProcessInformationClass,
1350 IN PVOID ProcessInformation,
1351 IN ULONG ProcessInformationLength
1352 );
1353
1354 NTSTATUS
1355 STDCALL
1356 NtSetInformationThread(
1357 IN HANDLE ThreadHandle,
1358 IN CINT ThreadInformationClass,
1359 IN PVOID ThreadInformation,
1360 IN ULONG ThreadInformationLength
1361 );
1362 // NtSetInformationToken
1363 // NtSetIntervalProfile
1364 // NtSetIoCompletion
1365 // NtSetLdtEntries
1366 // NtSetLowEventPair
1367 // NtSetLowWaitHighEventPair
1368 // NtSetLowWaitHighThread
1369 // NtSetSecurityObject
1370 //NtSetSystemEnvironmentValue
1371 /*
1372 SystemTimeAdjustmentInformation SYSTEM_TIME_ADJUSTMENT
1373 */
1374 NTSTATUS
1375 STDCALL
1376 NtSetSystemInformation(
1377 IN CINT SystemInformationClass,
1378 IN PVOID SystemInformation,
1379 IN ULONG SystemInformationLength
1380 );
1381 //NtSetSystemPowerState
1382
1383 NTSTATUS
1384 STDCALL
1385 NtSetSystemTime(
1386 IN PLARGE_INTEGER SystemTime,
1387 IN BOOL Unknown OPTIONAL
1388 );
1389
1390 NTSTATUS
1391 STDCALL
1392 NtSetTimer(
1393 IN HANDLE TimerHandle,
1394 IN PLARGE_INTEGER DueTime,
1395 IN PTIMERAPCROUTINE CompletionRoutine,
1396 IN LPVOID ArgToCompletionRoutine,
1397 IN BOOL Resume,
1398 IN LONG Period
1399 );
1400 // NtSetTimerResolution
1401
1402 NTSTATUS
1403 STDCALL
1404 NtSetValueKey(
1405 IN HANDLE KeyHandle,
1406 IN PUNICODE_STRING ValueName,
1407 IN ULONG TitleIndex ,
1408 IN ULONG Type,
1409 IN PVOID Data,
1410 IN ULONG DataSize
1411 );
1412
1413 //-- NtSetVolumeInformationFile
1414
1415 NTSTATUS
1416 STDCALL
1417 NtShutdownSystem(
1418 IN SHUTDOWN_ACTION Action
1419 );
1420 //-- NtSignalAndWaitForSingleObject
1421 // NtStartProfile
1422 // NtStopProfile
1423
1424 NTSTATUS
1425 STDCALL
1426 NtSuspendThread(
1427 IN HANDLE ThreadHandle,
1428 IN PULONG PreviousSuspendCount
1429 );
1430 //--NtSystemDebugControl
1431
1432 NTSTATUS
1433 STDCALL
1434 NtTerminateProcess(
1435 IN HANDLE ProcessHandle ,
1436 IN NTSTATUS ExitStatus
1437 );
1438
1439 NTSTATUS
1440 STDCALL
1441 NtTerminateThread(
1442 IN HANDLE ThreadHandle ,
1443 IN NTSTATUS ExitStatus
1444 );
1445
1446 //--NtTestAlert
1447
1448 NTSTATUS
1449 STDCALL
1450 NtUnloadDriver(
1451 IN PUNICODE_STRING DriverServiceName
1452 );
1453
1454 //--NtUnloadKey
1455 //--NtUnlockFile
1456 //--NtUnlockVirtualMemory
1457
1458 NTSTATUS
1459 STDCALL
1460 NtUnmapViewOfSection(
1461 IN HANDLE ProcessHandle,
1462 IN PVOID BaseAddress
1463 );
1464 //NtVdmControl
1465 //NtW32Call
1466
1467 NTSTATUS
1468 STDCALL
1469 NtWaitForMultipleObjects (
1470 IN ULONG Count,
1471 IN PVOID Object[],
1472 IN CINT WaitType,
1473 IN BOOLEAN Alertable,
1474 IN PLARGE_INTEGER Time
1475 );
1476
1477 NTSTATUS
1478 STDCALL
1479 NtWaitForSingleObject (
1480 IN PVOID Object,
1481 IN BOOLEAN Alertable,
1482 IN PLARGE_INTEGER Time
1483 );
1484 //--NtWaitHighEventPair
1485 //--NtWaitLowEventPair
1486
1487 NTSTATUS
1488 STDCALL
1489 NtWriteFile(
1490 IN HANDLE FileHandle,
1491 IN HANDLE Event ,
1492 IN PIO_APC_ROUTINE ApcRoutine OPTIONAL,
1493 IN PVOID ApcContext OPTIONAL,
1494 OUT PIO_STATUS_BLOCK IoStatusBlock,
1495 IN PVOID Buffer,
1496 IN ULONG Length,
1497 IN PLARGE_INTEGER ByteOffset ,
1498 IN PULONG Key OPTIONAL
1499 );
1500
1501 NTSTATUS
1502 STDCALL NtWriteFileScatter(
1503 IN HANDLE FileHandle,
1504 IN HANDLE Event OPTIONAL,
1505 IN PIO_APC_ROUTINE UserApcRoutine OPTIONAL,
1506 IN PVOID UserApcContext OPTIONAL,
1507 OUT PIO_STATUS_BLOCK UserIosb,
1508 IN LARGE_INTEGER BufferDescription[],
1509 IN ULONG BufferLength,
1510 IN PLARGE_INTEGER ByteOffset,
1511 IN PULONG Key OPTIONAL
1512 );
1513
1514 //NtWriteRequestData
1515
1516 NTSTATUS
1517 STDCALL
1518 NtWriteVirtualMemory(
1519 IN HANDLE ProcessHandle,
1520 IN VOID *Buffer,
1521 IN ULONG Size,
1522 OUT PULONG NumberOfBytesWritten
1523 );
1524
1525 NTSTATUS
1526 STDCALL
1527 NtYieldExecution(
1528 VOID
1529 );
1530
1531 #ifdef __cplusplus
1532 }
1533 #endif /* __cplusplus */
1534
1535 #endif
1536
1537 #endif /* __DDK_ZW_H */