d3d8: Hold the lock in IDirect3DIndexBuffer8 methods.
[wine.git] / include / ddk / wdm.h
blob38b36253dcf9f6f408059ba9b4571d544aa0610a
1 /*
2 * Copyright 2004-2005 Ivan Leo Puoti
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 #ifndef _WDMDDK_
20 #define _WDMDDK_
21 #define _NTDDK_
23 #include <ntstatus.h>
25 #ifdef _WIN64
26 #define POINTER_ALIGNMENT DECLSPEC_ALIGN(8)
27 #else
28 #define POINTER_ALIGNMENT
29 #endif
31 typedef ULONG_PTR KSPIN_LOCK, *PKSPIN_LOCK;
33 struct _KDPC;
34 struct _KAPC;
35 struct _IRP;
36 struct _DEVICE_OBJECT;
37 struct _DRIVER_OBJECT;
39 typedef VOID (WINAPI *PKDEFERRED_ROUTINE)(struct _KDPC *, PVOID, PVOID, PVOID);
41 typedef NTSTATUS (WINAPI *PDRIVER_INITIALIZE)(struct _DRIVER_OBJECT *, PUNICODE_STRING);
42 typedef NTSTATUS (WINAPI *PDRIVER_DISPATCH)(struct _DEVICE_OBJECT *, struct _IRP *);
43 typedef void (WINAPI *PDRIVER_STARTIO)(struct _DEVICE_OBJECT *, struct _IRP *);
44 typedef void (WINAPI *PDRIVER_UNLOAD)(struct _DRIVER_OBJECT *);
46 typedef struct _DISPATCHER_HEADER {
47 UCHAR Type;
48 UCHAR Absolute;
49 UCHAR Size;
50 UCHAR Inserted;
51 LONG SignalState;
52 LIST_ENTRY WaitListHead;
53 } DISPATCHER_HEADER, *PDISPATCHER_HEADER;
55 typedef struct _KEVENT {
56 DISPATCHER_HEADER Header;
57 } KEVENT, *PKEVENT, *RESTRICTED_POINTER PRKEVENT;
59 typedef struct _KDPC {
60 CSHORT Type;
61 UCHAR Number;
62 UCHAR Importance;
63 LIST_ENTRY DpcListEntry;
64 PKDEFERRED_ROUTINE DeferredRoutine;
65 PVOID DeferredContext;
66 PVOID SystemArgument1;
67 PVOID SystemArgument2;
68 PULONG_PTR Lock;
69 } KDPC, *PKDPC, *RESTRICTED_POINTER PRKDPC;
71 typedef struct _KDEVICE_QUEUE_ENTRY {
72 LIST_ENTRY DeviceListEntry;
73 ULONG SortKey;
74 BOOLEAN Inserted;
75 } KDEVICE_QUEUE_ENTRY, *PKDEVICE_QUEUE_ENTRY,
76 *RESTRICTED_POINTER PRKDEVICE_QUEUE_ENTRY;
78 typedef struct _KDEVICE_QUEUE {
79 CSHORT Type;
80 CSHORT Size;
81 LIST_ENTRY DeviceListHead;
82 KSPIN_LOCK Lock;
83 BOOLEAN Busy;
84 } KDEVICE_QUEUE, *PKDEVICE_QUEUE, *RESTRICTED_POINTER PRKDEVICE_QUEUE;
86 typedef struct _IO_TIMER *PIO_TIMER;
87 typedef struct _ETHREAD *PETHREAD;
88 typedef struct _KTHREAD *PKTHREAD;
89 typedef struct _EPROCESS *PEPROCESS;
91 #define MAXIMUM_VOLUME_LABEL_LENGTH (32 * sizeof(WCHAR))
93 typedef struct _VPB {
94 CSHORT Type;
95 CSHORT Size;
96 USHORT Flags;
97 USHORT VolumeLabelLength;
98 struct _DEVICE_OBJECT *DeviceObject;
99 struct _DEVICE_OBJECT *RealDevice;
100 ULONG SerialNumber;
101 ULONG ReferenceCount;
102 WCHAR VolumeLabel[MAXIMUM_VOLUME_LABEL_LENGTH / sizeof(WCHAR)];
103 } VPB, *PVPB;
105 typedef enum _POOL_TYPE {
106 NonPagedPool,
107 PagedPool,
108 NonPagedPoolMustSucceed,
109 UnkownType,
110 NonPagedPoolCacheAligned,
111 PagedPoolCacheAligned,
112 NonPagedPoolCacheAlignedMustS,
113 MaxPoolType
114 } POOL_TYPE;
116 typedef struct _WAIT_CONTEXT_BLOCK {
117 KDEVICE_QUEUE_ENTRY WaitQueueEntry;
118 struct _DRIVER_CONTROL *DeviceRoutine;
119 PVOID DeviceContext;
120 ULONG NumberOfMapRegisters;
121 PVOID DeviceObject;
122 PVOID CurrentIrp;
123 PKDPC BufferChainingDpc;
124 } WAIT_CONTEXT_BLOCK, *PWAIT_CONTEXT_BLOCK;
126 #ifndef DEVICE_TYPE
127 #define DEVICE_TYPE ULONG
128 #endif
129 #define IRP_MJ_MAXIMUM_FUNCTION 0x1b
130 #define IRP_MJ_DEVICE_CONTROL 0x0e
132 typedef struct _DEVICE_OBJECT {
133 CSHORT Type;
134 USHORT Size;
135 LONG ReferenceCount;
136 struct _DRIVER_OBJECT *DriverObject;
137 struct _DEVICE_OBJECT *NextDevice;
138 struct _DEVICE_OBJECT *AttachedDevice;
139 struct _IRP *CurrentIrp;
140 PIO_TIMER Timer;
141 ULONG Flags;
142 ULONG Characteristics;
143 PVPB Vpb;
144 PVOID DeviceExtension;
145 DEVICE_TYPE DeviceType;
146 CCHAR StackSize;
147 union {
148 LIST_ENTRY ListEntry;
149 WAIT_CONTEXT_BLOCK Wcb;
150 } Queue;
151 ULONG AlignmentRequirement;
152 KDEVICE_QUEUE DeviceQueue;
153 KDPC Dpc;
154 ULONG ActiveThreadCount;
155 PSECURITY_DESCRIPTOR SecurityDescriptor;
156 KEVENT DeviceLock;
157 USHORT SectorSize;
158 USHORT Spare1;
159 struct _DEVOBJ_EXTENSION *DeviceObjectExtension;
160 PVOID Reserved;
161 } DEVICE_OBJECT;
162 typedef struct _DEVICE_OBJECT *PDEVICE_OBJECT;
164 typedef struct _DRIVER_EXTENSION {
165 struct _DRIVER_OBJECT *DriverObject;
166 PVOID AddDevice;
167 ULONG Count;
168 UNICODE_STRING ServiceKeyName;
169 } DRIVER_EXTENSION, *PDRIVER_EXTENSION;
171 typedef struct _DRIVER_OBJECT {
172 CSHORT Type;
173 CSHORT Size;
174 PDEVICE_OBJECT DeviceObject;
175 ULONG Flags;
176 PVOID DriverStart;
177 ULONG DriverSize;
178 PVOID DriverSection;
179 PDRIVER_EXTENSION DriverExtension;
180 UNICODE_STRING DriverName;
181 PUNICODE_STRING HardwareDatabase;
182 PVOID FastIoDispatch;
183 PDRIVER_INITIALIZE DriverInit;
184 PDRIVER_STARTIO DriverStartIo;
185 PDRIVER_UNLOAD DriverUnload;
186 PDRIVER_DISPATCH MajorFunction[IRP_MJ_MAXIMUM_FUNCTION + 1];
187 } DRIVER_OBJECT;
188 typedef struct _DRIVER_OBJECT *PDRIVER_OBJECT;
190 /* Irp definitions */
191 typedef UCHAR KIRQL, *PKIRQL;
192 typedef CCHAR KPROCESSOR_MODE;
194 typedef VOID (WINAPI *PDRIVER_CANCEL)(
195 IN struct _DEVICE_OBJECT *DeviceObject,
196 IN struct _IRP *Irp);
198 typedef VOID (WINAPI *PKNORMAL_ROUTINE)(
199 IN PVOID NormalContext,
200 IN PVOID SystemArgument1,
201 IN PVOID SystemArgument2);
203 typedef VOID (WINAPI *PKKERNEL_ROUTINE)(
204 IN struct _KAPC *Apc,
205 IN OUT PKNORMAL_ROUTINE *NormalRoutine,
206 IN OUT PVOID *NormalContext,
207 IN OUT PVOID *SystemArgument1,
208 IN OUT PVOID *SystemArgument2);
210 typedef VOID (WINAPI *PKRUNDOWN_ROUTINE)(
211 IN struct _KAPC *Apc);
213 typedef struct _KAPC {
214 CSHORT Type;
215 CSHORT Size;
216 ULONG Spare0;
217 struct _KTHREAD *Thread;
218 LIST_ENTRY ApcListEntry;
219 PKKERNEL_ROUTINE KernelRoutine;
220 PKRUNDOWN_ROUTINE RundownRoutine;
221 PKNORMAL_ROUTINE NormalRoutine;
222 PVOID NormalContext;
223 PVOID SystemArgument1;
224 PVOID SystemArgument2;
225 CCHAR ApcStateIndex;
226 KPROCESSOR_MODE ApcMode;
227 BOOLEAN Inserted;
228 } KAPC, *PKAPC, *RESTRICTED_POINTER PRKAPC;
230 #include <pshpack1.h>
231 typedef struct _IRP {
232 CSHORT Type;
233 USHORT Size;
234 struct _MDL *MdlAddress;
235 ULONG Flags;
236 union {
237 struct _IRP *MasterIrp;
238 LONG IrpCount;
239 PVOID SystemBuffer;
240 } AssociatedIrp;
241 LIST_ENTRY ThreadListEntry;
242 IO_STATUS_BLOCK IoStatus;
243 KPROCESSOR_MODE RequestorMode;
244 BOOLEAN PendingReturned;
245 CHAR StackCount;
246 CHAR CurrentLocation;
247 BOOLEAN Cancel;
248 KIRQL CancelIrql;
249 CCHAR ApcEnvironment;
250 UCHAR AllocationFlags;
251 PIO_STATUS_BLOCK UserIosb;
252 PKEVENT UserEvent;
253 union {
254 struct {
255 PIO_APC_ROUTINE UserApcRoutine;
256 PVOID UserApcContext;
257 } AsynchronousParameters;
258 LARGE_INTEGER AllocationSize;
259 } Overlay;
260 PDRIVER_CANCEL CancelRoutine;
261 PVOID UserBuffer;
262 union {
263 struct {
264 union {
265 KDEVICE_QUEUE_ENTRY DeviceQueueEntry;
266 struct {
267 PVOID DriverContext[4];
268 } DUMMYSTRUCTNAME;
269 } DUMMYUNIONNAME;
270 PETHREAD Thread;
271 PCHAR AuxiliaryBuffer;
272 struct {
273 LIST_ENTRY ListEntry;
274 union {
275 struct _IO_STACK_LOCATION *CurrentStackLocation;
276 ULONG PacketType;
277 } DUMMYUNIONNAME;
278 } DUMMYSTRUCTNAME;
279 struct _FILE_OBJECT *OriginalFileObject;
280 } Overlay;
281 KAPC Apc;
282 PVOID CompletionKey;
283 } Tail;
284 } IRP;
285 typedef struct _IRP *PIRP;
286 #include <poppack.h>
288 /* MDL definitions */
290 typedef VOID (WINAPI *PINTERFACE_REFERENCE)(
291 PVOID Context);
293 typedef VOID (WINAPI *PINTERFACE_DEREFERENCE)(
294 PVOID Context);
296 typedef struct _INTERFACE {
297 USHORT Size;
298 USHORT Version;
299 PVOID Context;
300 PINTERFACE_REFERENCE InterfaceReference;
301 PINTERFACE_DEREFERENCE InterfaceDereference;
302 } INTERFACE, *PINTERFACE;
304 typedef struct _SECTION_OBJECT_POINTERS {
305 PVOID DataSectionObject;
306 PVOID SharedCacheMap;
307 PVOID ImageSectionObject;
308 } SECTION_OBJECT_POINTERS, *PSECTION_OBJECT_POINTERS;
310 typedef struct _IO_COMPLETION_CONTEXT {
311 PVOID Port;
312 PVOID Key;
313 } IO_COMPLETION_CONTEXT, *PIO_COMPLETION_CONTEXT;
315 typedef enum _DEVICE_RELATION_TYPE {
316 BusRelations,
317 EjectionRelations,
318 PowerRelations,
319 RemovalRelations,
320 TargetDeviceRelation,
321 SingleBusRelations
322 } DEVICE_RELATION_TYPE, *PDEVICE_RELATION_TYPE;
324 typedef struct _FILE_OBJECT {
325 CSHORT Type;
326 CSHORT Size;
327 PDEVICE_OBJECT DeviceObject;
328 PVPB Vpb;
329 PVOID FsContext;
330 PVOID FsContext2;
331 PSECTION_OBJECT_POINTERS SectionObjectPointer;
332 PVOID PrivateCacheMap;
333 NTSTATUS FinalStatus;
334 struct _FILE_OBJECT *RelatedFileObject;
335 BOOLEAN LockOperation;
336 BOOLEAN DeletePending;
337 BOOLEAN ReadAccess;
338 BOOLEAN WriteAccess;
339 BOOLEAN DeleteAccess;
340 BOOLEAN SharedRead;
341 BOOLEAN SharedWrite;
342 BOOLEAN SharedDelete;
343 ULONG Flags;
344 UNICODE_STRING FileName;
345 LARGE_INTEGER CurrentByteOffset;
346 ULONG Waiters;
347 ULONG Busy;
348 PVOID LastLock;
349 KEVENT Lock;
350 KEVENT Event;
351 PIO_COMPLETION_CONTEXT CompletionContext;
352 } FILE_OBJECT;
353 typedef struct _FILE_OBJECT *PFILE_OBJECT;
355 #define INITIAL_PRIVILEGE_COUNT 3
357 typedef struct _INITIAL_PRIVILEGE_SET {
358 ULONG PrivilegeCount;
359 ULONG Control;
360 LUID_AND_ATTRIBUTES Privilege[INITIAL_PRIVILEGE_COUNT];
361 } INITIAL_PRIVILEGE_SET, * PINITIAL_PRIVILEGE_SET;
363 typedef struct _SECURITY_SUBJECT_CONTEXT {
364 PACCESS_TOKEN ClientToken;
365 SECURITY_IMPERSONATION_LEVEL ImpersonationLevel;
366 PACCESS_TOKEN PrimaryToken;
367 PVOID ProcessAuditId;
368 } SECURITY_SUBJECT_CONTEXT, *PSECURITY_SUBJECT_CONTEXT;
370 typedef struct _ACCESS_STATE {
371 LUID OperationID;
372 BOOLEAN SecurityEvaluated;
373 BOOLEAN GenerateAudit;
374 BOOLEAN GenerateOnClose;
375 BOOLEAN PrivilegesAllocated;
376 ULONG Flags;
377 ACCESS_MASK RemainingDesiredAccess;
378 ACCESS_MASK PreviouslyGrantedAccess;
379 ACCESS_MASK OriginalDesiredAccess;
380 SECURITY_SUBJECT_CONTEXT SubjectSecurityContext;
381 PSECURITY_DESCRIPTOR SecurityDescriptor;
382 PVOID AuxData;
383 union {
384 INITIAL_PRIVILEGE_SET InitialPrivilegeSet;
385 PRIVILEGE_SET PrivilegeSet;
386 } Privileges;
388 BOOLEAN AuditPrivileges;
389 UNICODE_STRING ObjectName;
390 UNICODE_STRING ObjectTypeName;
391 } ACCESS_STATE, *PACCESS_STATE;
393 typedef struct _IO_SECURITY_CONTEXT {
394 PSECURITY_QUALITY_OF_SERVICE SecurityQos;
395 PACCESS_STATE AccessState;
396 ACCESS_MASK DesiredAccess;
397 ULONG FullCreateOptions;
398 } IO_SECURITY_CONTEXT, *PIO_SECURITY_CONTEXT;
400 typedef struct _DEVICE_CAPABILITIES {
401 USHORT Size;
402 USHORT Version;
403 ULONG DeviceD1 : 1;
404 ULONG DeviceD2 : 1;
405 ULONG LockSupported : 1;
406 ULONG EjectSupported : 1;
407 ULONG Removable : 1;
408 ULONG DockDevice : 1;
409 ULONG UniqueID : 1;
410 ULONG SilentInstall : 1;
411 ULONG RawDeviceOK : 1;
412 ULONG SurpriseRemovalOK : 1;
413 ULONG WakeFromD0 : 1;
414 ULONG WakeFromD1 : 1;
415 ULONG WakeFromD2 : 1;
416 ULONG WakeFromD3 : 1;
417 ULONG HardwareDisabled : 1;
418 ULONG NonDynamic : 1;
419 ULONG WarmEjectSupported : 1;
420 ULONG NoDisplayInUI : 1;
421 ULONG Reserved : 14;
422 ULONG Address;
423 ULONG UINumber;
424 DEVICE_POWER_STATE DeviceState[PowerSystemMaximum];
425 SYSTEM_POWER_STATE SystemWake;
426 DEVICE_POWER_STATE DeviceWake;
427 ULONG D1Latency;
428 ULONG D2Latency;
429 ULONG D3Latency;
430 } DEVICE_CAPABILITIES, *PDEVICE_CAPABILITIES;
432 typedef enum _INTERFACE_TYPE {
433 InterfaceTypeUndefined = -1,
434 Internal,
435 Isa,
436 Eisa,
437 MicroChannel,
438 TurboChannel,
439 PCIBus,
440 VMEBus,
441 NuBus,
442 PCMCIABus,
443 CBus,
444 MPIBus,
445 MPSABus,
446 ProcessorInternal,
447 InternalPowerBus,
448 PNPISABus,
449 PNPBus,
450 MaximumInterfaceType
451 } INTERFACE_TYPE, *PINTERFACE_TYPE;
453 typedef LARGE_INTEGER PHYSICAL_ADDRESS, *PPHYSICAL_ADDRESS;
455 #define IO_RESOURCE_PREFERRED 0x01
456 #define IO_RESOURCE_DEFAULT 0x02
457 #define IO_RESOURCE_ALTERNATIVE 0x08
459 typedef struct _IO_RESOURCE_DESCRIPTOR {
460 UCHAR Option;
461 UCHAR Type;
462 UCHAR ShareDisposition;
463 UCHAR Spare1;
464 USHORT Flags;
465 USHORT Spare2;
466 union {
467 struct {
468 ULONG Length;
469 ULONG Alignment;
470 PHYSICAL_ADDRESS MinimumAddress;
471 PHYSICAL_ADDRESS MaximumAddress;
472 } Port;
473 struct {
474 ULONG Length;
475 ULONG Alignment;
476 PHYSICAL_ADDRESS MinimumAddress;
477 PHYSICAL_ADDRESS MaximumAddress;
478 } Memory;
479 struct {
480 ULONG MinimumVector;
481 ULONG MaximumVector;
482 } Interrupt;
483 struct {
484 ULONG MinimumChannel;
485 ULONG MaximumChannel;
486 } Dma;
487 struct {
488 ULONG Length;
489 ULONG Alignment;
490 PHYSICAL_ADDRESS MinimumAddress;
491 PHYSICAL_ADDRESS MaximumAddress;
492 } Generic;
493 struct {
494 ULONG Data[3];
495 } DevicePrivate;
496 struct {
497 ULONG Length;
498 ULONG MinBusNumber;
499 ULONG MaxBusNumber;
500 ULONG Reserved;
501 } BusNumber;
502 struct {
503 ULONG Priority;
504 ULONG Reserved1;
505 ULONG Reserved2;
506 } ConfigData;
507 } u;
508 } IO_RESOURCE_DESCRIPTOR, *PIO_RESOURCE_DESCRIPTOR;
510 typedef struct _IO_RESOURCE_LIST {
511 USHORT Version;
512 USHORT Revision;
513 ULONG Count;
514 IO_RESOURCE_DESCRIPTOR Descriptors[1];
515 } IO_RESOURCE_LIST, *PIO_RESOURCE_LIST;
517 typedef struct _IO_RESOURCE_REQUIREMENTS_LIST {
518 ULONG ListSize;
519 INTERFACE_TYPE InterfaceType;
520 ULONG BusNumber;
521 ULONG SlotNumber;
522 ULONG Reserved[3];
523 ULONG AlternativeLists;
524 IO_RESOURCE_LIST List[1];
525 } IO_RESOURCE_REQUIREMENTS_LIST, *PIO_RESOURCE_REQUIREMENTS_LIST;
527 typedef enum _BUS_QUERY_ID_TYPE {
528 BusQueryDeviceID,
529 BusQueryHardwareIDs,
530 BusQueryCompatibleIDs,
531 BusQueryInstanceID,
532 BusQueryDeviceSerialNumber
533 } BUS_QUERY_ID_TYPE, *PBUS_QUERY_ID_TYPE;
535 typedef enum _DEVICE_TEXT_TYPE {
536 DeviceTextDescription,
537 DeviceTextLocationInformation
538 } DEVICE_TEXT_TYPE, *PDEVICE_TEXT_TYPE;
540 typedef enum _DEVICE_USAGE_NOTIFICATION_TYPE {
541 DeviceUsageTypeUndefined,
542 DeviceUsageTypePaging,
543 DeviceUsageTypeHibernation,
544 DeviceUsageTypeDumpFile
545 } DEVICE_USAGE_NOTIFICATION_TYPE;
547 typedef struct _POWER_SEQUENCE {
548 ULONG SequenceD1;
549 ULONG SequenceD2;
550 ULONG SequenceD3;
551 } POWER_SEQUENCE, *PPOWER_SEQUENCE;
553 typedef enum _POWER_STATE_TYPE {
554 SystemPowerState,
555 DevicePowerState
556 } POWER_STATE_TYPE, *PPOWER_STATE_TYPE;
558 typedef union _POWER_STATE {
559 SYSTEM_POWER_STATE SystemState;
560 DEVICE_POWER_STATE DeviceState;
561 } POWER_STATE, *PPOWER_STATE;
563 typedef struct _CM_PARTIAL_RESOURCE_DESCRIPTOR {
564 UCHAR Type;
565 UCHAR ShareDisposition;
566 USHORT Flags;
567 union {
568 struct {
569 PHYSICAL_ADDRESS Start;
570 ULONG Length;
571 } Generic;
572 struct {
573 PHYSICAL_ADDRESS Start;
574 ULONG Length;
575 } Port;
576 struct {
577 ULONG Level;
578 ULONG Vector;
579 ULONG Affinity;
580 } Interrupt;
581 struct {
582 PHYSICAL_ADDRESS Start;
583 ULONG Length;
584 } Memory;
585 struct {
586 ULONG Channel;
587 ULONG Port;
588 ULONG Reserved1;
589 } Dma;
590 struct {
591 ULONG Data[3];
592 } DevicePrivate;
593 struct {
594 ULONG Start;
595 ULONG Length;
596 ULONG Reserved;
597 } BusNumber;
598 struct {
599 ULONG DataSize;
600 ULONG Reserved1;
601 ULONG Reserved2;
602 } DeviceSpecificData;
603 } u;
604 } CM_PARTIAL_RESOURCE_DESCRIPTOR, *PCM_PARTIAL_RESOURCE_DESCRIPTOR;
606 typedef struct _CM_PARTIAL_RESOURCE_LIST {
607 USHORT Version;
608 USHORT Revision;
609 ULONG Count;
610 CM_PARTIAL_RESOURCE_DESCRIPTOR PartialDescriptors[1];
611 } CM_PARTIAL_RESOURCE_LIST, *PCM_PARTIAL_RESOURCE_LIST;
613 typedef struct _CM_FULL_RESOURCE_DESCRIPTOR {
614 INTERFACE_TYPE InterfaceType;
615 ULONG BusNumber;
616 CM_PARTIAL_RESOURCE_LIST PartialResourceList;
617 } CM_FULL_RESOURCE_DESCRIPTOR, *PCM_FULL_RESOURCE_DESCRIPTOR;
619 typedef struct _CM_RESOURCE_LIST {
620 ULONG Count;
621 CM_FULL_RESOURCE_DESCRIPTOR List[1];
622 } CM_RESOURCE_LIST, *PCM_RESOURCE_LIST;
624 typedef NTSTATUS (WINAPI *PIO_COMPLETION_ROUTINE)(
625 IN struct _DEVICE_OBJECT *DeviceObject,
626 IN struct _IRP *Irp,
627 IN PVOID Context);
629 #include <pshpack1.h>
630 typedef struct _IO_STACK_LOCATION {
631 UCHAR MajorFunction;
632 UCHAR MinorFunction;
633 UCHAR Flags;
634 UCHAR Control;
635 union {
636 struct {
637 PIO_SECURITY_CONTEXT SecurityContext;
638 ULONG Options;
639 USHORT POINTER_ALIGNMENT FileAttributes;
640 USHORT ShareAccess;
641 ULONG POINTER_ALIGNMENT EaLength;
642 } Create;
643 struct {
644 ULONG Length;
645 ULONG POINTER_ALIGNMENT Key;
646 LARGE_INTEGER ByteOffset;
647 } Read;
648 struct {
649 ULONG Length;
650 ULONG POINTER_ALIGNMENT Key;
651 LARGE_INTEGER ByteOffset;
652 } Write;
653 struct {
654 ULONG Length;
655 FILE_INFORMATION_CLASS POINTER_ALIGNMENT FileInformationClass;
656 } QueryFile;
657 struct {
658 ULONG Length;
659 FILE_INFORMATION_CLASS POINTER_ALIGNMENT FileInformationClass;
660 PFILE_OBJECT FileObject;
661 union {
662 struct {
663 BOOLEAN ReplaceIfExists;
664 BOOLEAN AdvanceOnly;
665 } DUMMYSTRUCTNAME;
666 ULONG ClusterCount;
667 HANDLE DeleteHandle;
668 } DUMMYUNIONNAME;
669 } SetFile;
670 struct {
671 ULONG Length;
672 FS_INFORMATION_CLASS POINTER_ALIGNMENT FsInformationClass;
673 } QueryVolume;
674 struct {
675 ULONG OutputBufferLength;
676 ULONG POINTER_ALIGNMENT InputBufferLength;
677 ULONG POINTER_ALIGNMENT IoControlCode;
678 PVOID Type3InputBuffer;
679 } DeviceIoControl;
680 struct {
681 SECURITY_INFORMATION SecurityInformation;
682 ULONG POINTER_ALIGNMENT Length;
683 } QuerySecurity;
684 struct {
685 SECURITY_INFORMATION SecurityInformation;
686 PSECURITY_DESCRIPTOR SecurityDescriptor;
687 } SetSecurity;
688 struct {
689 PVPB Vpb;
690 PDEVICE_OBJECT DeviceObject;
691 } MountVolume;
692 struct {
693 PVPB Vpb;
694 PDEVICE_OBJECT DeviceObject;
695 } VerifyVolume;
696 struct {
697 struct _SCSI_REQUEST_BLOCK *Srb;
698 } Scsi;
699 struct {
700 DEVICE_RELATION_TYPE Type;
701 } QueryDeviceRelations;
702 struct {
703 CONST GUID *InterfaceType;
704 USHORT Size;
705 USHORT Version;
706 PINTERFACE Interface;
707 PVOID InterfaceSpecificData;
708 } QueryInterface;
709 struct {
710 PDEVICE_CAPABILITIES Capabilities;
711 } DeviceCapabilities;
712 struct {
713 PIO_RESOURCE_REQUIREMENTS_LIST IoResourceRequirementList;
714 } FilterResourceRequirements;
715 struct {
716 ULONG WhichSpace;
717 PVOID Buffer;
718 ULONG Offset;
719 ULONG POINTER_ALIGNMENT Length;
720 } ReadWriteConfig;
721 struct {
722 BOOLEAN Lock;
723 } SetLock;
724 struct {
725 BUS_QUERY_ID_TYPE IdType;
726 } QueryId;
727 struct {
728 DEVICE_TEXT_TYPE DeviceTextType;
729 LCID POINTER_ALIGNMENT LocaleId;
730 } QueryDeviceText;
731 struct {
732 BOOLEAN InPath;
733 BOOLEAN Reserved[3];
734 DEVICE_USAGE_NOTIFICATION_TYPE POINTER_ALIGNMENT Type;
735 } UsageNotification;
736 struct {
737 SYSTEM_POWER_STATE PowerState;
738 } WaitWake;
739 struct {
740 PPOWER_SEQUENCE PowerSequence;
741 } PowerSequence;
742 struct {
743 ULONG SystemContext;
744 POWER_STATE_TYPE POINTER_ALIGNMENT Type;
745 POWER_STATE POINTER_ALIGNMENT State;
746 POWER_ACTION POINTER_ALIGNMENT ShutdownType;
747 } Power;
748 struct {
749 PCM_RESOURCE_LIST AllocatedResources;
750 PCM_RESOURCE_LIST AllocatedResourcesTranslated;
751 } StartDevice;
752 struct {
753 ULONG_PTR ProviderId;
754 PVOID DataPath;
755 ULONG BufferSize;
756 PVOID Buffer;
757 } WMI;
758 struct {
759 PVOID Argument1;
760 PVOID Argument2;
761 PVOID Argument3;
762 PVOID Argument4;
763 } Others;
764 } Parameters;
765 PDEVICE_OBJECT DeviceObject;
766 PFILE_OBJECT FileObject;
767 PIO_COMPLETION_ROUTINE CompletionRoutine;
768 PVOID Context;
769 } IO_STACK_LOCATION, *PIO_STACK_LOCATION;
770 #include <poppack.h>
772 typedef struct _MDL {
773 struct _MDL *Next;
774 CSHORT Size;
775 CSHORT MdlFlags;
776 struct _EPROCESS *Process;
777 PVOID MappedSystemVa;
778 PVOID StartVa;
779 ULONG ByteCount;
780 ULONG ByteOffset;
781 } MDL, *PMDL;
783 typedef struct _KSYSTEM_TIME {
784 ULONG LowPart;
785 LONG High1Time;
786 LONG High2Time;
787 } KSYSTEM_TIME, *PKSYSTEM_TIME;
789 typedef enum _NT_PRODUCT_TYPE {
790 NtProductWinNt = 1,
791 NtProductLanManNt,
792 NtProductServer
793 } NT_PRODUCT_TYPE, *PNT_PRODUCT_TYPE;
795 #define PROCESSOR_FEATURE_MAX 64
797 typedef enum _ALTERNATIVE_ARCHITECTURE_TYPE
799 StandardDesign,
800 NEC98x86,
801 EndAlternatives
802 } ALTERNATIVE_ARCHITECTURE_TYPE;
804 typedef struct _KUSER_SHARED_DATA {
805 ULONG TickCountLowDeprecated;
806 ULONG TickCountMultiplier;
807 volatile KSYSTEM_TIME InterruptTime;
808 volatile KSYSTEM_TIME SystemTime;
809 volatile KSYSTEM_TIME TimeZoneBias;
810 USHORT ImageNumberLow;
811 USHORT ImageNumberHigh;
812 WCHAR NtSystemRoot[260];
813 ULONG MaxStckTraceDepth;
814 ULONG CryptoExponent;
815 ULONG TimeZoneId;
816 ULONG LargePageMinimum;
817 ULONG Reserverd2[7];
818 NT_PRODUCT_TYPE NtProductType;
819 BOOLEAN ProductTypeIsValid;
820 ULONG MajorNtVersion;
821 ULONG MinorNtVersion;
822 BOOLEAN ProcessorFeatures[PROCESSOR_FEATURE_MAX];
823 ULONG Reserved1;
824 ULONG Reserved3;
825 volatile ULONG TimeSlip;
826 ALTERNATIVE_ARCHITECTURE_TYPE AlternativeArchitecture;
827 LARGE_INTEGER SystemExpirationDate;
828 ULONG SuiteMask;
829 BOOLEAN KdDebuggerEnabled;
830 volatile ULONG ActiveConsoleId;
831 volatile ULONG DismountCount;
832 ULONG ComPlusPackage;
833 ULONG LastSystemRITEventTickCount;
834 ULONG NumberOfPhysicalPages;
835 BOOLEAN SafeBootMode;
836 ULONG TraceLogging;
837 ULONGLONG Fill0;
838 ULONGLONG SystemCall[4];
839 union {
840 volatile KSYSTEM_TIME TickCount;
841 volatile ULONG64 TickCountQuad;
842 } DUMMYUNIONNAME;
843 } KSHARED_USER_DATA, *PKSHARED_USER_DATA;
845 NTSTATUS WINAPI ObCloseHandle(IN HANDLE handle);
847 #define IoGetCurrentIrpStackLocation(_Irp) ((_Irp)->Tail.Overlay.CurrentStackLocation)
849 #define KernelMode 0
850 #define UserMode 1
852 /* directory object access rights */
853 #define DIRECTORY_QUERY 0x0001
854 #define DIRECTORY_TRAVERSE 0x0002
855 #define DIRECTORY_CREATE_OBJECT 0x0004
856 #define DIRECTORY_CREATE_SUBDIRECTORY 0x0008
857 #define DIRECTORY_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | 0xF)
859 /* symbolic link access rights */
860 #define SYMBOLIC_LINK_QUERY 0x0001
861 #define SYMBOLIC_LINK_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | 0x1)
863 PVOID WINAPI ExAllocatePool(POOL_TYPE,SIZE_T);
864 PVOID WINAPI ExAllocatePoolWithQuota(POOL_TYPE,SIZE_T);
865 PVOID WINAPI ExAllocatePoolWithTag(POOL_TYPE,SIZE_T,ULONG);
866 PVOID WINAPI ExAllocatePoolWithQuotaTag(POOL_TYPE,SIZE_T,ULONG);
867 void WINAPI ExFreePool(PVOID);
868 void WINAPI ExFreePoolWithTag(PVOID,ULONG);
870 NTSTATUS WINAPI IoCreateDevice(DRIVER_OBJECT*,ULONG,UNICODE_STRING*,DEVICE_TYPE,ULONG,BOOLEAN,DEVICE_OBJECT**);
871 NTSTATUS WINAPI IoCreateSymbolicLink(UNICODE_STRING*,UNICODE_STRING*);
872 void WINAPI IoDeleteDevice(DEVICE_OBJECT*);
873 NTSTATUS WINAPI IoDeleteSymbolicLink(UNICODE_STRING*);
874 PEPROCESS WINAPI IoGetCurrentProcess(void);
876 PKTHREAD WINAPI KeGetCurrentThread(void);
877 void WINAPI KeQuerySystemTime(LARGE_INTEGER*);
878 void WINAPI KeQueryTickCount(LARGE_INTEGER*);
879 ULONG WINAPI KeQueryTimeIncrement(void);
881 LPVOID WINAPI MmAllocateNonCachedMemory(SIZE_T);
882 void WINAPI MmFreeNonCachedMemory(PVOID,SIZE_T);
884 #define PsGetCurrentProcess() IoGetCurrentProcess()
885 #define PsGetCurrentThread() ((PETHREAD)KeGetCurrentThread())
886 HANDLE WINAPI PsGetCurrentProcessId(void);
887 HANDLE WINAPI PsGetCurrentThreadId(void);
888 BOOLEAN WINAPI PsGetVersion(ULONG*,ULONG*,ULONG*,UNICODE_STRING*);
890 NTSTATUS WINAPI ZwAddBootEntry(PUNICODE_STRING,PUNICODE_STRING);
891 NTSTATUS WINAPI ZwAccessCheckAndAuditAlarm(PUNICODE_STRING,HANDLE,PUNICODE_STRING,PUNICODE_STRING,PSECURITY_DESCRIPTOR,ACCESS_MASK,PGENERIC_MAPPING,BOOLEAN,PACCESS_MASK,PBOOLEAN,PBOOLEAN);
892 NTSTATUS WINAPI ZwAdjustPrivilegesToken(HANDLE,BOOLEAN,PTOKEN_PRIVILEGES,DWORD,PTOKEN_PRIVILEGES,PDWORD);
893 NTSTATUS WINAPI ZwAlertThread(HANDLE ThreadHandle);
894 NTSTATUS WINAPI ZwAllocateVirtualMemory(HANDLE,PVOID*,ULONG,SIZE_T*,ULONG,ULONG);
895 NTSTATUS WINAPI ZwCancelIoFile(HANDLE,PIO_STATUS_BLOCK);
896 NTSTATUS WINAPI ZwCancelTimer(HANDLE, BOOLEAN*);
897 NTSTATUS WINAPI ZwClearEvent(HANDLE);
898 NTSTATUS WINAPI ZwClose(HANDLE);
899 NTSTATUS WINAPI ZwCloseObjectAuditAlarm(PUNICODE_STRING,HANDLE,BOOLEAN);
900 NTSTATUS WINAPI ZwConnectPort(PHANDLE,PUNICODE_STRING,PSECURITY_QUALITY_OF_SERVICE,PLPC_SECTION_WRITE,PLPC_SECTION_READ,PULONG,PVOID,PULONG);
901 NTSTATUS WINAPI ZwCreateDirectoryObject(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES);
902 NTSTATUS WINAPI ZwCreateEvent(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES *,BOOLEAN,BOOLEAN);
903 NTSTATUS WINAPI ZwCreateFile(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,PIO_STATUS_BLOCK,PLARGE_INTEGER,ULONG,ULONG,ULONG,ULONG,PVOID,ULONG);
904 NTSTATUS WINAPI ZwCreateKey(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*,ULONG,const UNICODE_STRING*,ULONG,PULONG);
905 NTSTATUS WINAPI ZwCreateSection(HANDLE*,ACCESS_MASK,const OBJECT_ATTRIBUTES*,const LARGE_INTEGER*,ULONG,ULONG,HANDLE);
906 NTSTATUS WINAPI ZwCreateSymbolicLinkObject(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,PUNICODE_STRING);
907 NTSTATUS WINAPI ZwCreateTimer(HANDLE*, ACCESS_MASK, const OBJECT_ATTRIBUTES*, TIMER_TYPE);
908 NTSTATUS WINAPI ZwDeleteAtom(RTL_ATOM);
909 NTSTATUS WINAPI ZwDeleteFile(POBJECT_ATTRIBUTES);
910 NTSTATUS WINAPI ZwDeleteKey(HANDLE);
911 NTSTATUS WINAPI ZwDeleteValueKey(HANDLE,const UNICODE_STRING *);
912 NTSTATUS WINAPI ZwDeviceIoControlFile(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,ULONG,PVOID,ULONG,PVOID,ULONG);
913 NTSTATUS WINAPI ZwDisplayString(PUNICODE_STRING);
914 NTSTATUS WINAPI ZwDuplicateObject(HANDLE,HANDLE,HANDLE,PHANDLE,ACCESS_MASK,ULONG,ULONG);
915 NTSTATUS WINAPI ZwDuplicateToken(HANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,SECURITY_IMPERSONATION_LEVEL,TOKEN_TYPE,PHANDLE);
916 NTSTATUS WINAPI ZwEnumerateKey(HANDLE,ULONG,KEY_INFORMATION_CLASS,void *,DWORD,DWORD *);
917 NTSTATUS WINAPI ZwEnumerateValueKey(HANDLE,ULONG,KEY_VALUE_INFORMATION_CLASS,PVOID,ULONG,PULONG);
918 NTSTATUS WINAPI ZwFlushInstructionCache(HANDLE,LPCVOID,SIZE_T);
919 NTSTATUS WINAPI ZwFlushKey(HANDLE);
920 NTSTATUS WINAPI ZwFlushVirtualMemory(HANDLE,LPCVOID*,SIZE_T*,ULONG);
921 NTSTATUS WINAPI ZwFreeVirtualMemory(HANDLE,PVOID*,SIZE_T*,ULONG);
922 NTSTATUS WINAPI ZwFsControlFile(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,ULONG,PVOID,ULONG,PVOID,ULONG);
923 NTSTATUS WINAPI ZwInitiatePowerAction(POWER_ACTION,SYSTEM_POWER_STATE,ULONG,BOOLEAN);
924 NTSTATUS WINAPI ZwLoadDriver(const UNICODE_STRING *);
925 NTSTATUS WINAPI ZwLoadKey(const OBJECT_ATTRIBUTES *,OBJECT_ATTRIBUTES *);
926 NTSTATUS WINAPI ZwLockVirtualMemory(HANDLE,PVOID*,SIZE_T*,ULONG);
927 NTSTATUS WINAPI ZwMakeTemporaryObject(HANDLE);
928 NTSTATUS WINAPI ZwMapViewOfSection(HANDLE,HANDLE,PVOID*,ULONG,SIZE_T,const LARGE_INTEGER*,SIZE_T*,SECTION_INHERIT,ULONG,ULONG);
929 NTSTATUS WINAPI ZwNotifyChangeKey(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,ULONG,BOOLEAN,PVOID,ULONG,BOOLEAN);
930 NTSTATUS WINAPI ZwOpenDirectoryObject(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES);
931 NTSTATUS WINAPI ZwOpenEvent(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES *);
932 NTSTATUS WINAPI ZwOpenFile(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,PIO_STATUS_BLOCK,ULONG,ULONG);
933 NTSTATUS WINAPI ZwOpenKey(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES *);
934 NTSTATUS WINAPI ZwOpenProcess(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*,const CLIENT_ID*);
935 NTSTATUS WINAPI ZwOpenProcessToken(HANDLE,DWORD,HANDLE *);
936 NTSTATUS WINAPI ZwOpenSection(HANDLE*,ACCESS_MASK,const OBJECT_ATTRIBUTES*);
937 NTSTATUS WINAPI ZwOpenSymbolicLinkObject(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES);
938 NTSTATUS WINAPI ZwOpenThread(HANDLE*,ACCESS_MASK,const OBJECT_ATTRIBUTES*,const CLIENT_ID*);
939 NTSTATUS WINAPI ZwOpenThreadToken(HANDLE,DWORD,BOOLEAN,HANDLE *);
940 NTSTATUS WINAPI ZwOpenTimer(HANDLE*, ACCESS_MASK, const OBJECT_ATTRIBUTES*);
941 NTSTATUS WINAPI ZwPowerInformation(POWER_INFORMATION_LEVEL,PVOID,ULONG,PVOID,ULONG);
942 NTSTATUS WINAPI ZwPulseEvent(HANDLE,PULONG);
943 NTSTATUS WINAPI ZwQueryDefaultLocale(BOOLEAN,LCID*);
944 NTSTATUS WINAPI ZwQueryDefaultUILanguage(LANGID*);
945 NTSTATUS WINAPI ZwQueryDirectoryFile(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,PVOID,ULONG,FILE_INFORMATION_CLASS,BOOLEAN,PUNICODE_STRING,BOOLEAN);
946 NTSTATUS WINAPI ZwQueryDirectoryObject(HANDLE,PDIRECTORY_BASIC_INFORMATION,ULONG,BOOLEAN,BOOLEAN,PULONG,PULONG);
947 NTSTATUS WINAPI ZwQueryEaFile(HANDLE,PIO_STATUS_BLOCK,PVOID,ULONG,BOOLEAN,PVOID,ULONG,PVOID,BOOLEAN);
948 NTSTATUS WINAPI ZwQueryFullAttributesFile(const OBJECT_ATTRIBUTES*,FILE_NETWORK_OPEN_INFORMATION*);
949 NTSTATUS WINAPI ZwQueryInformationFile(HANDLE,PIO_STATUS_BLOCK,PVOID,LONG,FILE_INFORMATION_CLASS);
950 NTSTATUS WINAPI ZwQueryInformationThread(HANDLE,THREADINFOCLASS,PVOID,ULONG,PULONG);
951 NTSTATUS WINAPI ZwQueryInformationToken(HANDLE,DWORD,LPVOID,DWORD,LPDWORD);
952 NTSTATUS WINAPI ZwQueryInstallUILanguage(LANGID*);
953 NTSTATUS WINAPI ZwQueryKey(HANDLE,KEY_INFORMATION_CLASS,void *,DWORD,DWORD *);
954 NTSTATUS WINAPI ZwQueryObject(HANDLE, OBJECT_INFORMATION_CLASS, PVOID, ULONG, PULONG);
955 NTSTATUS WINAPI ZwQuerySecurityObject(HANDLE,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR,ULONG,PULONG);
956 NTSTATUS WINAPI ZwQuerySection(HANDLE,SECTION_INFORMATION_CLASS,PVOID,ULONG,PULONG);
957 NTSTATUS WINAPI ZwQuerySymbolicLinkObject(HANDLE,PUNICODE_STRING,PULONG);
958 NTSTATUS WINAPI ZwQuerySystemInformation(SYSTEM_INFORMATION_CLASS,PVOID,ULONG,PULONG);
959 NTSTATUS WINAPI ZwQueryTimerResolution(PULONG,PULONG,PULONG);
960 NTSTATUS WINAPI ZwQueryValueKey(HANDLE,const UNICODE_STRING *,KEY_VALUE_INFORMATION_CLASS,void *,DWORD,DWORD *);
961 NTSTATUS WINAPI ZwQueryVolumeInformationFile(HANDLE,PIO_STATUS_BLOCK,PVOID,ULONG,FS_INFORMATION_CLASS);
962 NTSTATUS WINAPI ZwReadFile(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,PVOID,ULONG,PLARGE_INTEGER,PULONG);
963 NTSTATUS WINAPI ZwReplaceKey(POBJECT_ATTRIBUTES,HANDLE,POBJECT_ATTRIBUTES);
964 NTSTATUS WINAPI ZwRequestWaitReplyPort(HANDLE,PLPC_MESSAGE,PLPC_MESSAGE);
965 NTSTATUS WINAPI ZwResetEvent(HANDLE,PULONG);
966 NTSTATUS WINAPI ZwRestoreKey(HANDLE,HANDLE,ULONG);
967 NTSTATUS WINAPI ZwSaveKey(HANDLE,HANDLE);
968 NTSTATUS WINAPI ZwSecureConnectPort(PHANDLE,PUNICODE_STRING,PSECURITY_QUALITY_OF_SERVICE,PLPC_SECTION_WRITE,PSID,PLPC_SECTION_READ,PULONG,PVOID,PULONG);
969 NTSTATUS WINAPI ZwSetDefaultLocale(BOOLEAN,LCID);
970 NTSTATUS WINAPI ZwSetDefaultUILanguage(LANGID);
971 NTSTATUS WINAPI ZwSetEaFile(HANDLE,PIO_STATUS_BLOCK,PVOID,ULONG);
972 NTSTATUS WINAPI ZwSetEvent(HANDLE,PULONG);
973 NTSTATUS WINAPI ZwSetInformationFile(HANDLE,PIO_STATUS_BLOCK,PVOID,ULONG,FILE_INFORMATION_CLASS);
974 NTSTATUS WINAPI ZwSetInformationKey(HANDLE,const int,PVOID,ULONG);
975 NTSTATUS WINAPI ZwSetInformationObject(HANDLE, OBJECT_INFORMATION_CLASS, PVOID, ULONG);
976 NTSTATUS WINAPI ZwSetInformationProcess(HANDLE,PROCESS_INFORMATION_CLASS,PVOID,ULONG);
977 NTSTATUS WINAPI ZwSetInformationThread(HANDLE,THREADINFOCLASS,LPCVOID,ULONG);
978 NTSTATUS WINAPI ZwSetIoCompletion(HANDLE,ULONG,ULONG,NTSTATUS,ULONG);
979 NTSTATUS WINAPI ZwSetSecurityObject(HANDLE,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR);
980 NTSTATUS WINAPI ZwSetSystemInformation(SYSTEM_INFORMATION_CLASS,PVOID,ULONG);
981 NTSTATUS WINAPI ZwSetSystemTime(const LARGE_INTEGER*,LARGE_INTEGER*);
982 NTSTATUS WINAPI ZwSetTimer(HANDLE, const LARGE_INTEGER*, PTIMER_APC_ROUTINE, PVOID, BOOLEAN, ULONG, BOOLEAN*);
983 NTSTATUS WINAPI ZwSetValueKey(HANDLE,const UNICODE_STRING *,ULONG,ULONG,const void *,ULONG);
984 NTSTATUS WINAPI ZwSetVolumeInformationFile(HANDLE,PIO_STATUS_BLOCK,PVOID,ULONG,FS_INFORMATION_CLASS);
985 NTSTATUS WINAPI ZwSuspendThread(HANDLE,PULONG);
986 NTSTATUS WINAPI ZwTerminateProcess(HANDLE,LONG);
987 NTSTATUS WINAPI ZwUnloadDriver(const UNICODE_STRING *);
988 NTSTATUS WINAPI ZwUnloadKey(HANDLE);
989 NTSTATUS WINAPI ZwUnmapViewOfSection(HANDLE,PVOID);
990 NTSTATUS WINAPI ZwWaitForSingleObject(HANDLE,BOOLEAN,const LARGE_INTEGER*);
991 NTSTATUS WINAPI ZwWaitForMultipleObjects(ULONG,const HANDLE*,BOOLEAN,BOOLEAN,const LARGE_INTEGER*);
992 NTSTATUS WINAPI ZwWriteFile(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,const void*,ULONG,PLARGE_INTEGER,PULONG);
993 NTSTATUS WINAPI ZwYieldExecution(void);
995 #endif