kernel32/tests: Use skip instead of trace.
[wine/multimedia.git] / include / ddk / wdm.h
blobe2340dde5832c21db8d58347a962f26c3061ab34
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);
40 typedef VOID (WINAPI *PKSTART_ROUTINE)(PVOID);
42 typedef NTSTATUS (WINAPI *PDRIVER_INITIALIZE)(struct _DRIVER_OBJECT *, PUNICODE_STRING);
43 typedef NTSTATUS (WINAPI *PDRIVER_DISPATCH)(struct _DEVICE_OBJECT *, struct _IRP *);
44 typedef void (WINAPI *PDRIVER_STARTIO)(struct _DEVICE_OBJECT *, struct _IRP *);
45 typedef void (WINAPI *PDRIVER_UNLOAD)(struct _DRIVER_OBJECT *);
47 typedef struct _DISPATCHER_HEADER {
48 UCHAR Type;
49 UCHAR Absolute;
50 UCHAR Size;
51 UCHAR Inserted;
52 LONG SignalState;
53 LIST_ENTRY WaitListHead;
54 } DISPATCHER_HEADER, *PDISPATCHER_HEADER;
56 typedef struct _KEVENT {
57 DISPATCHER_HEADER Header;
58 } KEVENT, *PKEVENT, *RESTRICTED_POINTER PRKEVENT;
60 typedef struct _KDPC {
61 CSHORT Type;
62 UCHAR Number;
63 UCHAR Importance;
64 LIST_ENTRY DpcListEntry;
65 PKDEFERRED_ROUTINE DeferredRoutine;
66 PVOID DeferredContext;
67 PVOID SystemArgument1;
68 PVOID SystemArgument2;
69 PULONG_PTR Lock;
70 } KDPC, *PKDPC, *RESTRICTED_POINTER PRKDPC;
72 typedef struct _KDEVICE_QUEUE_ENTRY {
73 LIST_ENTRY DeviceListEntry;
74 ULONG SortKey;
75 BOOLEAN Inserted;
76 } KDEVICE_QUEUE_ENTRY, *PKDEVICE_QUEUE_ENTRY,
77 *RESTRICTED_POINTER PRKDEVICE_QUEUE_ENTRY;
79 typedef struct _KDEVICE_QUEUE {
80 CSHORT Type;
81 CSHORT Size;
82 LIST_ENTRY DeviceListHead;
83 KSPIN_LOCK Lock;
84 BOOLEAN Busy;
85 } KDEVICE_QUEUE, *PKDEVICE_QUEUE, *RESTRICTED_POINTER PRKDEVICE_QUEUE;
87 typedef struct _IO_TIMER *PIO_TIMER;
88 typedef struct _ETHREAD *PETHREAD;
89 typedef struct _KTHREAD *PKTHREAD;
90 typedef struct _EPROCESS *PEPROCESS;
91 typedef struct _IO_WORKITEM *PIO_WORKITEM;
93 #define MAXIMUM_VOLUME_LABEL_LENGTH (32 * sizeof(WCHAR))
95 typedef struct _VPB {
96 CSHORT Type;
97 CSHORT Size;
98 USHORT Flags;
99 USHORT VolumeLabelLength;
100 struct _DEVICE_OBJECT *DeviceObject;
101 struct _DEVICE_OBJECT *RealDevice;
102 ULONG SerialNumber;
103 ULONG ReferenceCount;
104 WCHAR VolumeLabel[MAXIMUM_VOLUME_LABEL_LENGTH / sizeof(WCHAR)];
105 } VPB, *PVPB;
107 typedef enum _POOL_TYPE {
108 NonPagedPool,
109 PagedPool,
110 NonPagedPoolMustSucceed,
111 UnkownType,
112 NonPagedPoolCacheAligned,
113 PagedPoolCacheAligned,
114 NonPagedPoolCacheAlignedMustS,
115 MaxPoolType
116 } POOL_TYPE;
118 typedef struct _WAIT_CONTEXT_BLOCK {
119 KDEVICE_QUEUE_ENTRY WaitQueueEntry;
120 struct _DRIVER_CONTROL *DeviceRoutine;
121 PVOID DeviceContext;
122 ULONG NumberOfMapRegisters;
123 PVOID DeviceObject;
124 PVOID CurrentIrp;
125 PKDPC BufferChainingDpc;
126 } WAIT_CONTEXT_BLOCK, *PWAIT_CONTEXT_BLOCK;
128 #define DO_BUFFERED_IO 0x00000004
129 #define DO_EXCLUSIVE 0x00000008
130 #define DO_DIRECT_IO 0x00000010
131 #define DO_MAP_IO_BUFFER 0x00000020
132 #define DO_DEVICE_INITIALIZING 0x00000080
133 #define DO_SHUTDOWN_REGISTERED 0x00000800
134 #define DO_BUS_ENUMERATED_DEVICE 0x00001000
135 #define DO_POWER_PAGABLE 0x00002000
136 #define DO_POWER_INRUSH 0x00004000
138 #define IO_NO_INCREMENT 0
139 #define IO_CD_ROM_INCREMENT 1
140 #define IO_DISK_INCREMENT 1
141 #define IO_KEYBOARD_INCREMENT 6
142 #define IO_MAILSLOT_INCREMENT 2
143 #define IO_MOUSE_INCREMENT 6
144 #define IO_NAMED_PIPE_INCREMENT 2
145 #define IO_NETWORK_INCREMENT 2
146 #define IO_PARALLEL_INCREMENT 1
147 #define IO_SERIAL_INCREMENT 2
148 #define IO_SOUND_INCREMENT 8
149 #define IO_VIDEO_INCREMENT 1
151 #ifndef DEVICE_TYPE
152 #define DEVICE_TYPE ULONG
153 #endif
154 #define IRP_MJ_MAXIMUM_FUNCTION 0x1b
155 #define IRP_MJ_CREATE 0x00
156 #define IRP_MJ_CREATE_NAMED_PIPE 0x01
157 #define IRP_MJ_CLOSE 0x02
158 #define IRP_MJ_READ 0x03
159 #define IRP_MJ_WRITE 0x04
160 #define IRP_MJ_QUERY_INFORMATION 0x05
161 #define IRP_MJ_SET_INFORMATION 0x06
162 #define IRP_MJ_QUERY_EA 0x07
163 #define IRP_MJ_SET_EA 0x08
164 #define IRP_MJ_FLUSH_BUFFERS 0x09
165 #define IRP_MJ_QUERY_VOLUME_INFORMATION 0x0a
166 #define IRP_MJ_SET_VOLUME_INFORMATION 0x0b
167 #define IRP_MJ_DIRECTORY_CONTROL 0x0c
168 #define IRP_MJ_FILE_SYSTEM_CONTROL 0x0d
169 #define IRP_MJ_DEVICE_CONTROL 0x0e
170 #define IRP_MJ_INTERNAL_DEVICE_CONTROL 0x0f
171 #define IRP_MJ_SHUTDOWN 0x10
172 #define IRP_MJ_LOCK_CONTROL 0x11
173 #define IRP_MJ_CLEANUP 0x12
174 #define IRP_MJ_CREATE_MAILSLOT 0x13
175 #define IRP_MJ_QUERY_SECURITY 0x14
176 #define IRP_MJ_SET_SECURITY 0x15
177 #define IRP_MJ_POWER 0x16
178 #define IRP_MJ_SYSTEM_CONTROL 0x17
179 #define IRP_MJ_DEVICE_CHANGE 0x18
180 #define IRP_MJ_QUERY_QUOTA 0x19
181 #define IRP_MJ_SET_QUOTA 0x1a
182 #define IRP_MJ_PNP 0x1b
184 #define IRP_QUOTA_CHARGED 0x01
185 #define IRP_ALLOCATED_MUST_SUCCEED 0x02
186 #define IRP_ALLOCATED_FIXED_SIZE 0x04
187 #define IRP_LOOKASIDE_ALLOCATION 0x08
189 typedef struct _DEVICE_OBJECT {
190 CSHORT Type;
191 USHORT Size;
192 LONG ReferenceCount;
193 struct _DRIVER_OBJECT *DriverObject;
194 struct _DEVICE_OBJECT *NextDevice;
195 struct _DEVICE_OBJECT *AttachedDevice;
196 struct _IRP *CurrentIrp;
197 PIO_TIMER Timer;
198 ULONG Flags;
199 ULONG Characteristics;
200 PVPB Vpb;
201 PVOID DeviceExtension;
202 DEVICE_TYPE DeviceType;
203 CCHAR StackSize;
204 union {
205 LIST_ENTRY ListEntry;
206 WAIT_CONTEXT_BLOCK Wcb;
207 } Queue;
208 ULONG AlignmentRequirement;
209 KDEVICE_QUEUE DeviceQueue;
210 KDPC Dpc;
211 ULONG ActiveThreadCount;
212 PSECURITY_DESCRIPTOR SecurityDescriptor;
213 KEVENT DeviceLock;
214 USHORT SectorSize;
215 USHORT Spare1;
216 struct _DEVOBJ_EXTENSION *DeviceObjectExtension;
217 PVOID Reserved;
218 } DEVICE_OBJECT;
219 typedef struct _DEVICE_OBJECT *PDEVICE_OBJECT;
221 typedef struct _DRIVER_EXTENSION {
222 struct _DRIVER_OBJECT *DriverObject;
223 PVOID AddDevice;
224 ULONG Count;
225 UNICODE_STRING ServiceKeyName;
226 } DRIVER_EXTENSION, *PDRIVER_EXTENSION;
228 typedef struct _DRIVER_OBJECT {
229 CSHORT Type;
230 CSHORT Size;
231 PDEVICE_OBJECT DeviceObject;
232 ULONG Flags;
233 PVOID DriverStart;
234 ULONG DriverSize;
235 PVOID DriverSection;
236 PDRIVER_EXTENSION DriverExtension;
237 UNICODE_STRING DriverName;
238 PUNICODE_STRING HardwareDatabase;
239 PVOID FastIoDispatch;
240 PDRIVER_INITIALIZE DriverInit;
241 PDRIVER_STARTIO DriverStartIo;
242 PDRIVER_UNLOAD DriverUnload;
243 PDRIVER_DISPATCH MajorFunction[IRP_MJ_MAXIMUM_FUNCTION + 1];
244 } DRIVER_OBJECT;
245 typedef struct _DRIVER_OBJECT *PDRIVER_OBJECT;
247 /* Irp definitions */
248 typedef UCHAR KIRQL, *PKIRQL;
249 typedef CCHAR KPROCESSOR_MODE;
251 typedef VOID (WINAPI *PDRIVER_CANCEL)(
252 IN struct _DEVICE_OBJECT *DeviceObject,
253 IN struct _IRP *Irp);
255 typedef VOID (WINAPI *PKNORMAL_ROUTINE)(
256 IN PVOID NormalContext,
257 IN PVOID SystemArgument1,
258 IN PVOID SystemArgument2);
260 typedef VOID (WINAPI *PKKERNEL_ROUTINE)(
261 IN struct _KAPC *Apc,
262 IN OUT PKNORMAL_ROUTINE *NormalRoutine,
263 IN OUT PVOID *NormalContext,
264 IN OUT PVOID *SystemArgument1,
265 IN OUT PVOID *SystemArgument2);
267 typedef VOID (WINAPI *PKRUNDOWN_ROUTINE)(
268 IN struct _KAPC *Apc);
270 typedef struct _KAPC {
271 CSHORT Type;
272 CSHORT Size;
273 ULONG Spare0;
274 struct _KTHREAD *Thread;
275 LIST_ENTRY ApcListEntry;
276 PKKERNEL_ROUTINE KernelRoutine;
277 PKRUNDOWN_ROUTINE RundownRoutine;
278 PKNORMAL_ROUTINE NormalRoutine;
279 PVOID NormalContext;
280 PVOID SystemArgument1;
281 PVOID SystemArgument2;
282 CCHAR ApcStateIndex;
283 KPROCESSOR_MODE ApcMode;
284 BOOLEAN Inserted;
285 } KAPC, *PKAPC, *RESTRICTED_POINTER PRKAPC;
287 #include <pshpack1.h>
288 typedef struct _IRP {
289 CSHORT Type;
290 USHORT Size;
291 struct _MDL *MdlAddress;
292 ULONG Flags;
293 union {
294 struct _IRP *MasterIrp;
295 LONG IrpCount;
296 PVOID SystemBuffer;
297 } AssociatedIrp;
298 LIST_ENTRY ThreadListEntry;
299 IO_STATUS_BLOCK IoStatus;
300 KPROCESSOR_MODE RequestorMode;
301 BOOLEAN PendingReturned;
302 CHAR StackCount;
303 CHAR CurrentLocation;
304 BOOLEAN Cancel;
305 KIRQL CancelIrql;
306 CCHAR ApcEnvironment;
307 UCHAR AllocationFlags;
308 PIO_STATUS_BLOCK UserIosb;
309 PKEVENT UserEvent;
310 union {
311 struct {
312 PIO_APC_ROUTINE UserApcRoutine;
313 PVOID UserApcContext;
314 } AsynchronousParameters;
315 LARGE_INTEGER AllocationSize;
316 } Overlay;
317 PDRIVER_CANCEL CancelRoutine;
318 PVOID UserBuffer;
319 union {
320 struct {
321 union {
322 KDEVICE_QUEUE_ENTRY DeviceQueueEntry;
323 struct {
324 PVOID DriverContext[4];
325 } DUMMYSTRUCTNAME;
326 } DUMMYUNIONNAME;
327 PETHREAD Thread;
328 PCHAR AuxiliaryBuffer;
329 struct {
330 LIST_ENTRY ListEntry;
331 union {
332 struct _IO_STACK_LOCATION *CurrentStackLocation;
333 ULONG PacketType;
334 } DUMMYUNIONNAME;
335 } DUMMYSTRUCTNAME;
336 struct _FILE_OBJECT *OriginalFileObject;
337 } Overlay;
338 KAPC Apc;
339 PVOID CompletionKey;
340 } Tail;
341 } IRP;
342 typedef struct _IRP *PIRP;
343 #include <poppack.h>
345 /* MDL definitions */
347 typedef VOID (WINAPI *PINTERFACE_REFERENCE)(
348 PVOID Context);
350 typedef VOID (WINAPI *PINTERFACE_DEREFERENCE)(
351 PVOID Context);
353 typedef struct _INTERFACE {
354 USHORT Size;
355 USHORT Version;
356 PVOID Context;
357 PINTERFACE_REFERENCE InterfaceReference;
358 PINTERFACE_DEREFERENCE InterfaceDereference;
359 } INTERFACE, *PINTERFACE;
361 typedef struct _SECTION_OBJECT_POINTERS {
362 PVOID DataSectionObject;
363 PVOID SharedCacheMap;
364 PVOID ImageSectionObject;
365 } SECTION_OBJECT_POINTERS, *PSECTION_OBJECT_POINTERS;
367 typedef struct _IO_COMPLETION_CONTEXT {
368 PVOID Port;
369 PVOID Key;
370 } IO_COMPLETION_CONTEXT, *PIO_COMPLETION_CONTEXT;
372 typedef enum _DEVICE_RELATION_TYPE {
373 BusRelations,
374 EjectionRelations,
375 PowerRelations,
376 RemovalRelations,
377 TargetDeviceRelation,
378 SingleBusRelations
379 } DEVICE_RELATION_TYPE, *PDEVICE_RELATION_TYPE;
381 typedef struct _FILE_OBJECT {
382 CSHORT Type;
383 CSHORT Size;
384 PDEVICE_OBJECT DeviceObject;
385 PVPB Vpb;
386 PVOID FsContext;
387 PVOID FsContext2;
388 PSECTION_OBJECT_POINTERS SectionObjectPointer;
389 PVOID PrivateCacheMap;
390 NTSTATUS FinalStatus;
391 struct _FILE_OBJECT *RelatedFileObject;
392 BOOLEAN LockOperation;
393 BOOLEAN DeletePending;
394 BOOLEAN ReadAccess;
395 BOOLEAN WriteAccess;
396 BOOLEAN DeleteAccess;
397 BOOLEAN SharedRead;
398 BOOLEAN SharedWrite;
399 BOOLEAN SharedDelete;
400 ULONG Flags;
401 UNICODE_STRING FileName;
402 LARGE_INTEGER CurrentByteOffset;
403 ULONG Waiters;
404 ULONG Busy;
405 PVOID LastLock;
406 KEVENT Lock;
407 KEVENT Event;
408 PIO_COMPLETION_CONTEXT CompletionContext;
409 } FILE_OBJECT;
410 typedef struct _FILE_OBJECT *PFILE_OBJECT;
412 #define INITIAL_PRIVILEGE_COUNT 3
414 typedef struct _INITIAL_PRIVILEGE_SET {
415 ULONG PrivilegeCount;
416 ULONG Control;
417 LUID_AND_ATTRIBUTES Privilege[INITIAL_PRIVILEGE_COUNT];
418 } INITIAL_PRIVILEGE_SET, * PINITIAL_PRIVILEGE_SET;
420 typedef struct _SECURITY_SUBJECT_CONTEXT {
421 PACCESS_TOKEN ClientToken;
422 SECURITY_IMPERSONATION_LEVEL ImpersonationLevel;
423 PACCESS_TOKEN PrimaryToken;
424 PVOID ProcessAuditId;
425 } SECURITY_SUBJECT_CONTEXT, *PSECURITY_SUBJECT_CONTEXT;
427 typedef struct _ACCESS_STATE {
428 LUID OperationID;
429 BOOLEAN SecurityEvaluated;
430 BOOLEAN GenerateAudit;
431 BOOLEAN GenerateOnClose;
432 BOOLEAN PrivilegesAllocated;
433 ULONG Flags;
434 ACCESS_MASK RemainingDesiredAccess;
435 ACCESS_MASK PreviouslyGrantedAccess;
436 ACCESS_MASK OriginalDesiredAccess;
437 SECURITY_SUBJECT_CONTEXT SubjectSecurityContext;
438 PSECURITY_DESCRIPTOR SecurityDescriptor;
439 PVOID AuxData;
440 union {
441 INITIAL_PRIVILEGE_SET InitialPrivilegeSet;
442 PRIVILEGE_SET PrivilegeSet;
443 } Privileges;
445 BOOLEAN AuditPrivileges;
446 UNICODE_STRING ObjectName;
447 UNICODE_STRING ObjectTypeName;
448 } ACCESS_STATE, *PACCESS_STATE;
450 typedef struct _IO_SECURITY_CONTEXT {
451 PSECURITY_QUALITY_OF_SERVICE SecurityQos;
452 PACCESS_STATE AccessState;
453 ACCESS_MASK DesiredAccess;
454 ULONG FullCreateOptions;
455 } IO_SECURITY_CONTEXT, *PIO_SECURITY_CONTEXT;
457 typedef struct _DEVICE_CAPABILITIES {
458 USHORT Size;
459 USHORT Version;
460 ULONG DeviceD1 : 1;
461 ULONG DeviceD2 : 1;
462 ULONG LockSupported : 1;
463 ULONG EjectSupported : 1;
464 ULONG Removable : 1;
465 ULONG DockDevice : 1;
466 ULONG UniqueID : 1;
467 ULONG SilentInstall : 1;
468 ULONG RawDeviceOK : 1;
469 ULONG SurpriseRemovalOK : 1;
470 ULONG WakeFromD0 : 1;
471 ULONG WakeFromD1 : 1;
472 ULONG WakeFromD2 : 1;
473 ULONG WakeFromD3 : 1;
474 ULONG HardwareDisabled : 1;
475 ULONG NonDynamic : 1;
476 ULONG WarmEjectSupported : 1;
477 ULONG NoDisplayInUI : 1;
478 ULONG Reserved : 14;
479 ULONG Address;
480 ULONG UINumber;
481 DEVICE_POWER_STATE DeviceState[PowerSystemMaximum];
482 SYSTEM_POWER_STATE SystemWake;
483 DEVICE_POWER_STATE DeviceWake;
484 ULONG D1Latency;
485 ULONG D2Latency;
486 ULONG D3Latency;
487 } DEVICE_CAPABILITIES, *PDEVICE_CAPABILITIES;
489 typedef enum _INTERFACE_TYPE {
490 InterfaceTypeUndefined = -1,
491 Internal,
492 Isa,
493 Eisa,
494 MicroChannel,
495 TurboChannel,
496 PCIBus,
497 VMEBus,
498 NuBus,
499 PCMCIABus,
500 CBus,
501 MPIBus,
502 MPSABus,
503 ProcessorInternal,
504 InternalPowerBus,
505 PNPISABus,
506 PNPBus,
507 MaximumInterfaceType
508 } INTERFACE_TYPE, *PINTERFACE_TYPE;
510 typedef LARGE_INTEGER PHYSICAL_ADDRESS, *PPHYSICAL_ADDRESS;
512 #define IO_RESOURCE_PREFERRED 0x01
513 #define IO_RESOURCE_DEFAULT 0x02
514 #define IO_RESOURCE_ALTERNATIVE 0x08
516 typedef struct _IO_RESOURCE_DESCRIPTOR {
517 UCHAR Option;
518 UCHAR Type;
519 UCHAR ShareDisposition;
520 UCHAR Spare1;
521 USHORT Flags;
522 USHORT Spare2;
523 union {
524 struct {
525 ULONG Length;
526 ULONG Alignment;
527 PHYSICAL_ADDRESS MinimumAddress;
528 PHYSICAL_ADDRESS MaximumAddress;
529 } Port;
530 struct {
531 ULONG Length;
532 ULONG Alignment;
533 PHYSICAL_ADDRESS MinimumAddress;
534 PHYSICAL_ADDRESS MaximumAddress;
535 } Memory;
536 struct {
537 ULONG MinimumVector;
538 ULONG MaximumVector;
539 } Interrupt;
540 struct {
541 ULONG MinimumChannel;
542 ULONG MaximumChannel;
543 } Dma;
544 struct {
545 ULONG Length;
546 ULONG Alignment;
547 PHYSICAL_ADDRESS MinimumAddress;
548 PHYSICAL_ADDRESS MaximumAddress;
549 } Generic;
550 struct {
551 ULONG Data[3];
552 } DevicePrivate;
553 struct {
554 ULONG Length;
555 ULONG MinBusNumber;
556 ULONG MaxBusNumber;
557 ULONG Reserved;
558 } BusNumber;
559 struct {
560 ULONG Priority;
561 ULONG Reserved1;
562 ULONG Reserved2;
563 } ConfigData;
564 } u;
565 } IO_RESOURCE_DESCRIPTOR, *PIO_RESOURCE_DESCRIPTOR;
567 typedef struct _IO_RESOURCE_LIST {
568 USHORT Version;
569 USHORT Revision;
570 ULONG Count;
571 IO_RESOURCE_DESCRIPTOR Descriptors[1];
572 } IO_RESOURCE_LIST, *PIO_RESOURCE_LIST;
574 typedef struct _IO_RESOURCE_REQUIREMENTS_LIST {
575 ULONG ListSize;
576 INTERFACE_TYPE InterfaceType;
577 ULONG BusNumber;
578 ULONG SlotNumber;
579 ULONG Reserved[3];
580 ULONG AlternativeLists;
581 IO_RESOURCE_LIST List[1];
582 } IO_RESOURCE_REQUIREMENTS_LIST, *PIO_RESOURCE_REQUIREMENTS_LIST;
584 typedef enum _BUS_QUERY_ID_TYPE {
585 BusQueryDeviceID,
586 BusQueryHardwareIDs,
587 BusQueryCompatibleIDs,
588 BusQueryInstanceID,
589 BusQueryDeviceSerialNumber
590 } BUS_QUERY_ID_TYPE, *PBUS_QUERY_ID_TYPE;
592 typedef enum _DEVICE_TEXT_TYPE {
593 DeviceTextDescription,
594 DeviceTextLocationInformation
595 } DEVICE_TEXT_TYPE, *PDEVICE_TEXT_TYPE;
597 typedef enum _DEVICE_USAGE_NOTIFICATION_TYPE {
598 DeviceUsageTypeUndefined,
599 DeviceUsageTypePaging,
600 DeviceUsageTypeHibernation,
601 DeviceUsageTypeDumpFile
602 } DEVICE_USAGE_NOTIFICATION_TYPE;
604 typedef struct _POWER_SEQUENCE {
605 ULONG SequenceD1;
606 ULONG SequenceD2;
607 ULONG SequenceD3;
608 } POWER_SEQUENCE, *PPOWER_SEQUENCE;
610 typedef enum _POWER_STATE_TYPE {
611 SystemPowerState,
612 DevicePowerState
613 } POWER_STATE_TYPE, *PPOWER_STATE_TYPE;
615 typedef union _POWER_STATE {
616 SYSTEM_POWER_STATE SystemState;
617 DEVICE_POWER_STATE DeviceState;
618 } POWER_STATE, *PPOWER_STATE;
620 typedef struct _CM_PARTIAL_RESOURCE_DESCRIPTOR {
621 UCHAR Type;
622 UCHAR ShareDisposition;
623 USHORT Flags;
624 union {
625 struct {
626 PHYSICAL_ADDRESS Start;
627 ULONG Length;
628 } Generic;
629 struct {
630 PHYSICAL_ADDRESS Start;
631 ULONG Length;
632 } Port;
633 struct {
634 ULONG Level;
635 ULONG Vector;
636 ULONG Affinity;
637 } Interrupt;
638 struct {
639 PHYSICAL_ADDRESS Start;
640 ULONG Length;
641 } Memory;
642 struct {
643 ULONG Channel;
644 ULONG Port;
645 ULONG Reserved1;
646 } Dma;
647 struct {
648 ULONG Data[3];
649 } DevicePrivate;
650 struct {
651 ULONG Start;
652 ULONG Length;
653 ULONG Reserved;
654 } BusNumber;
655 struct {
656 ULONG DataSize;
657 ULONG Reserved1;
658 ULONG Reserved2;
659 } DeviceSpecificData;
660 } u;
661 } CM_PARTIAL_RESOURCE_DESCRIPTOR, *PCM_PARTIAL_RESOURCE_DESCRIPTOR;
663 typedef struct _CM_PARTIAL_RESOURCE_LIST {
664 USHORT Version;
665 USHORT Revision;
666 ULONG Count;
667 CM_PARTIAL_RESOURCE_DESCRIPTOR PartialDescriptors[1];
668 } CM_PARTIAL_RESOURCE_LIST, *PCM_PARTIAL_RESOURCE_LIST;
670 typedef struct _CM_FULL_RESOURCE_DESCRIPTOR {
671 INTERFACE_TYPE InterfaceType;
672 ULONG BusNumber;
673 CM_PARTIAL_RESOURCE_LIST PartialResourceList;
674 } CM_FULL_RESOURCE_DESCRIPTOR, *PCM_FULL_RESOURCE_DESCRIPTOR;
676 typedef struct _CM_RESOURCE_LIST {
677 ULONG Count;
678 CM_FULL_RESOURCE_DESCRIPTOR List[1];
679 } CM_RESOURCE_LIST, *PCM_RESOURCE_LIST;
681 typedef NTSTATUS (WINAPI *PIO_COMPLETION_ROUTINE)(
682 IN struct _DEVICE_OBJECT *DeviceObject,
683 IN struct _IRP *Irp,
684 IN PVOID Context);
686 #include <pshpack1.h>
687 typedef struct _IO_STACK_LOCATION {
688 UCHAR MajorFunction;
689 UCHAR MinorFunction;
690 UCHAR Flags;
691 UCHAR Control;
692 union {
693 struct {
694 PIO_SECURITY_CONTEXT SecurityContext;
695 ULONG Options;
696 USHORT POINTER_ALIGNMENT FileAttributes;
697 USHORT ShareAccess;
698 ULONG POINTER_ALIGNMENT EaLength;
699 } Create;
700 struct {
701 ULONG Length;
702 ULONG POINTER_ALIGNMENT Key;
703 LARGE_INTEGER ByteOffset;
704 } Read;
705 struct {
706 ULONG Length;
707 ULONG POINTER_ALIGNMENT Key;
708 LARGE_INTEGER ByteOffset;
709 } Write;
710 struct {
711 ULONG Length;
712 FILE_INFORMATION_CLASS POINTER_ALIGNMENT FileInformationClass;
713 } QueryFile;
714 struct {
715 ULONG Length;
716 FILE_INFORMATION_CLASS POINTER_ALIGNMENT FileInformationClass;
717 PFILE_OBJECT FileObject;
718 union {
719 struct {
720 BOOLEAN ReplaceIfExists;
721 BOOLEAN AdvanceOnly;
722 } DUMMYSTRUCTNAME;
723 ULONG ClusterCount;
724 HANDLE DeleteHandle;
725 } DUMMYUNIONNAME;
726 } SetFile;
727 struct {
728 ULONG Length;
729 FS_INFORMATION_CLASS POINTER_ALIGNMENT FsInformationClass;
730 } QueryVolume;
731 struct {
732 ULONG OutputBufferLength;
733 ULONG POINTER_ALIGNMENT InputBufferLength;
734 ULONG POINTER_ALIGNMENT IoControlCode;
735 PVOID Type3InputBuffer;
736 } DeviceIoControl;
737 struct {
738 SECURITY_INFORMATION SecurityInformation;
739 ULONG POINTER_ALIGNMENT Length;
740 } QuerySecurity;
741 struct {
742 SECURITY_INFORMATION SecurityInformation;
743 PSECURITY_DESCRIPTOR SecurityDescriptor;
744 } SetSecurity;
745 struct {
746 PVPB Vpb;
747 PDEVICE_OBJECT DeviceObject;
748 } MountVolume;
749 struct {
750 PVPB Vpb;
751 PDEVICE_OBJECT DeviceObject;
752 } VerifyVolume;
753 struct {
754 struct _SCSI_REQUEST_BLOCK *Srb;
755 } Scsi;
756 struct {
757 DEVICE_RELATION_TYPE Type;
758 } QueryDeviceRelations;
759 struct {
760 CONST GUID *InterfaceType;
761 USHORT Size;
762 USHORT Version;
763 PINTERFACE Interface;
764 PVOID InterfaceSpecificData;
765 } QueryInterface;
766 struct {
767 PDEVICE_CAPABILITIES Capabilities;
768 } DeviceCapabilities;
769 struct {
770 PIO_RESOURCE_REQUIREMENTS_LIST IoResourceRequirementList;
771 } FilterResourceRequirements;
772 struct {
773 ULONG WhichSpace;
774 PVOID Buffer;
775 ULONG Offset;
776 ULONG POINTER_ALIGNMENT Length;
777 } ReadWriteConfig;
778 struct {
779 BOOLEAN Lock;
780 } SetLock;
781 struct {
782 BUS_QUERY_ID_TYPE IdType;
783 } QueryId;
784 struct {
785 DEVICE_TEXT_TYPE DeviceTextType;
786 LCID POINTER_ALIGNMENT LocaleId;
787 } QueryDeviceText;
788 struct {
789 BOOLEAN InPath;
790 BOOLEAN Reserved[3];
791 DEVICE_USAGE_NOTIFICATION_TYPE POINTER_ALIGNMENT Type;
792 } UsageNotification;
793 struct {
794 SYSTEM_POWER_STATE PowerState;
795 } WaitWake;
796 struct {
797 PPOWER_SEQUENCE PowerSequence;
798 } PowerSequence;
799 struct {
800 ULONG SystemContext;
801 POWER_STATE_TYPE POINTER_ALIGNMENT Type;
802 POWER_STATE POINTER_ALIGNMENT State;
803 POWER_ACTION POINTER_ALIGNMENT ShutdownType;
804 } Power;
805 struct {
806 PCM_RESOURCE_LIST AllocatedResources;
807 PCM_RESOURCE_LIST AllocatedResourcesTranslated;
808 } StartDevice;
809 struct {
810 ULONG_PTR ProviderId;
811 PVOID DataPath;
812 ULONG BufferSize;
813 PVOID Buffer;
814 } WMI;
815 struct {
816 PVOID Argument1;
817 PVOID Argument2;
818 PVOID Argument3;
819 PVOID Argument4;
820 } Others;
821 } Parameters;
822 PDEVICE_OBJECT DeviceObject;
823 PFILE_OBJECT FileObject;
824 PIO_COMPLETION_ROUTINE CompletionRoutine;
825 PVOID Context;
826 } IO_STACK_LOCATION, *PIO_STACK_LOCATION;
827 #include <poppack.h>
829 typedef struct _MDL {
830 struct _MDL *Next;
831 CSHORT Size;
832 CSHORT MdlFlags;
833 struct _EPROCESS *Process;
834 PVOID MappedSystemVa;
835 PVOID StartVa;
836 ULONG ByteCount;
837 ULONG ByteOffset;
838 } MDL, *PMDL;
840 typedef struct _KTIMER {
841 DISPATCHER_HEADER Header;
842 ULARGE_INTEGER DueTime;
843 LIST_ENTRY TimerListEntry;
844 struct _KDPC *Dpc;
845 LONG Period;
846 } KTIMER, *PKTIMER;
848 typedef struct _KSYSTEM_TIME {
849 ULONG LowPart;
850 LONG High1Time;
851 LONG High2Time;
852 } KSYSTEM_TIME, *PKSYSTEM_TIME;
854 typedef enum _NT_PRODUCT_TYPE {
855 NtProductWinNt = 1,
856 NtProductLanManNt,
857 NtProductServer
858 } NT_PRODUCT_TYPE, *PNT_PRODUCT_TYPE;
860 #define PROCESSOR_FEATURE_MAX 64
862 typedef enum _ALTERNATIVE_ARCHITECTURE_TYPE
864 StandardDesign,
865 NEC98x86,
866 EndAlternatives
867 } ALTERNATIVE_ARCHITECTURE_TYPE;
869 typedef struct _KUSER_SHARED_DATA {
870 ULONG TickCountLowDeprecated;
871 ULONG TickCountMultiplier;
872 volatile KSYSTEM_TIME InterruptTime;
873 volatile KSYSTEM_TIME SystemTime;
874 volatile KSYSTEM_TIME TimeZoneBias;
875 USHORT ImageNumberLow;
876 USHORT ImageNumberHigh;
877 WCHAR NtSystemRoot[260];
878 ULONG MaxStckTraceDepth;
879 ULONG CryptoExponent;
880 ULONG TimeZoneId;
881 ULONG LargePageMinimum;
882 ULONG Reserverd2[7];
883 NT_PRODUCT_TYPE NtProductType;
884 BOOLEAN ProductTypeIsValid;
885 ULONG MajorNtVersion;
886 ULONG MinorNtVersion;
887 BOOLEAN ProcessorFeatures[PROCESSOR_FEATURE_MAX];
888 ULONG Reserved1;
889 ULONG Reserved3;
890 volatile ULONG TimeSlip;
891 ALTERNATIVE_ARCHITECTURE_TYPE AlternativeArchitecture;
892 LARGE_INTEGER SystemExpirationDate;
893 ULONG SuiteMask;
894 BOOLEAN KdDebuggerEnabled;
895 volatile ULONG ActiveConsoleId;
896 volatile ULONG DismountCount;
897 ULONG ComPlusPackage;
898 ULONG LastSystemRITEventTickCount;
899 ULONG NumberOfPhysicalPages;
900 BOOLEAN SafeBootMode;
901 ULONG TraceLogging;
902 ULONGLONG Fill0;
903 ULONGLONG SystemCall[4];
904 union {
905 volatile KSYSTEM_TIME TickCount;
906 volatile ULONG64 TickCountQuad;
907 } DUMMYUNIONNAME;
908 } KSHARED_USER_DATA, *PKSHARED_USER_DATA;
910 NTSTATUS WINAPI ObCloseHandle(IN HANDLE handle);
912 #define IoGetCurrentIrpStackLocation(_Irp) ((_Irp)->Tail.Overlay.CurrentStackLocation)
914 #define KernelMode 0
915 #define UserMode 1
917 /* directory object access rights */
918 #define DIRECTORY_QUERY 0x0001
919 #define DIRECTORY_TRAVERSE 0x0002
920 #define DIRECTORY_CREATE_OBJECT 0x0004
921 #define DIRECTORY_CREATE_SUBDIRECTORY 0x0008
922 #define DIRECTORY_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | 0xF)
924 /* symbolic link access rights */
925 #define SYMBOLIC_LINK_QUERY 0x0001
926 #define SYMBOLIC_LINK_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | 0x1)
928 PVOID WINAPI ExAllocatePool(POOL_TYPE,SIZE_T);
929 PVOID WINAPI ExAllocatePoolWithQuota(POOL_TYPE,SIZE_T);
930 PVOID WINAPI ExAllocatePoolWithTag(POOL_TYPE,SIZE_T,ULONG);
931 PVOID WINAPI ExAllocatePoolWithQuotaTag(POOL_TYPE,SIZE_T,ULONG);
932 void WINAPI ExFreePool(PVOID);
933 void WINAPI ExFreePoolWithTag(PVOID,ULONG);
935 PIRP WINAPI IoAllocateIrp(CCHAR,BOOLEAN);
936 NTSTATUS WINAPI IoCreateDevice(DRIVER_OBJECT*,ULONG,UNICODE_STRING*,DEVICE_TYPE,ULONG,BOOLEAN,DEVICE_OBJECT**);
937 NTSTATUS WINAPI IoCreateDriver(UNICODE_STRING*,PDRIVER_INITIALIZE);
938 NTSTATUS WINAPI IoCreateSymbolicLink(UNICODE_STRING*,UNICODE_STRING*);
939 void WINAPI IoDeleteDevice(DEVICE_OBJECT*);
940 void WINAPI IoDeleteDriver(DRIVER_OBJECT*);
941 NTSTATUS WINAPI IoDeleteSymbolicLink(UNICODE_STRING*);
942 void WINAPI IoFreeIrp(IRP*);
943 PEPROCESS WINAPI IoGetCurrentProcess(void);
944 void WINAPI IoInitializeIrp(IRP*,USHORT,CCHAR);
946 PKTHREAD WINAPI KeGetCurrentThread(void);
947 void WINAPI KeQuerySystemTime(LARGE_INTEGER*);
948 void WINAPI KeQueryTickCount(LARGE_INTEGER*);
949 ULONG WINAPI KeQueryTimeIncrement(void);
951 PVOID WINAPI MmAllocateNonCachedMemory(SIZE_T);
952 void WINAPI MmFreeNonCachedMemory(PVOID,SIZE_T);
954 NTSTATUS WINAPI PsCreateSystemThread(PHANDLE,ULONG,POBJECT_ATTRIBUTES,HANDLE,PCLIENT_ID,PKSTART_ROUTINE,PVOID);
955 #define PsGetCurrentProcess() IoGetCurrentProcess()
956 #define PsGetCurrentThread() ((PETHREAD)KeGetCurrentThread())
957 HANDLE WINAPI PsGetCurrentProcessId(void);
958 HANDLE WINAPI PsGetCurrentThreadId(void);
959 BOOLEAN WINAPI PsGetVersion(ULONG*,ULONG*,ULONG*,UNICODE_STRING*);
960 NTSTATUS WINAPI PsTerminateSystemThread(NTSTATUS);
962 NTSTATUS WINAPI ZwAddBootEntry(PUNICODE_STRING,PUNICODE_STRING);
963 NTSTATUS WINAPI ZwAccessCheckAndAuditAlarm(PUNICODE_STRING,HANDLE,PUNICODE_STRING,PUNICODE_STRING,PSECURITY_DESCRIPTOR,ACCESS_MASK,PGENERIC_MAPPING,BOOLEAN,PACCESS_MASK,PBOOLEAN,PBOOLEAN);
964 NTSTATUS WINAPI ZwAdjustPrivilegesToken(HANDLE,BOOLEAN,PTOKEN_PRIVILEGES,DWORD,PTOKEN_PRIVILEGES,PDWORD);
965 NTSTATUS WINAPI ZwAlertThread(HANDLE ThreadHandle);
966 NTSTATUS WINAPI ZwAllocateVirtualMemory(HANDLE,PVOID*,ULONG,SIZE_T*,ULONG,ULONG);
967 NTSTATUS WINAPI ZwCancelIoFile(HANDLE,PIO_STATUS_BLOCK);
968 NTSTATUS WINAPI ZwCancelTimer(HANDLE, BOOLEAN*);
969 NTSTATUS WINAPI ZwClearEvent(HANDLE);
970 NTSTATUS WINAPI ZwClose(HANDLE);
971 NTSTATUS WINAPI ZwCloseObjectAuditAlarm(PUNICODE_STRING,HANDLE,BOOLEAN);
972 NTSTATUS WINAPI ZwConnectPort(PHANDLE,PUNICODE_STRING,PSECURITY_QUALITY_OF_SERVICE,PLPC_SECTION_WRITE,PLPC_SECTION_READ,PULONG,PVOID,PULONG);
973 NTSTATUS WINAPI ZwCreateDirectoryObject(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES);
974 NTSTATUS WINAPI ZwCreateEvent(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES *,BOOLEAN,BOOLEAN);
975 NTSTATUS WINAPI ZwCreateFile(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,PIO_STATUS_BLOCK,PLARGE_INTEGER,ULONG,ULONG,ULONG,ULONG,PVOID,ULONG);
976 NTSTATUS WINAPI ZwCreateKey(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*,ULONG,const UNICODE_STRING*,ULONG,PULONG);
977 NTSTATUS WINAPI ZwCreateSection(HANDLE*,ACCESS_MASK,const OBJECT_ATTRIBUTES*,const LARGE_INTEGER*,ULONG,ULONG,HANDLE);
978 NTSTATUS WINAPI ZwCreateSymbolicLinkObject(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,PUNICODE_STRING);
979 NTSTATUS WINAPI ZwCreateTimer(HANDLE*, ACCESS_MASK, const OBJECT_ATTRIBUTES*, TIMER_TYPE);
980 NTSTATUS WINAPI ZwDeleteAtom(RTL_ATOM);
981 NTSTATUS WINAPI ZwDeleteFile(POBJECT_ATTRIBUTES);
982 NTSTATUS WINAPI ZwDeleteKey(HANDLE);
983 NTSTATUS WINAPI ZwDeleteValueKey(HANDLE,const UNICODE_STRING *);
984 NTSTATUS WINAPI ZwDeviceIoControlFile(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,ULONG,PVOID,ULONG,PVOID,ULONG);
985 NTSTATUS WINAPI ZwDisplayString(PUNICODE_STRING);
986 NTSTATUS WINAPI ZwDuplicateObject(HANDLE,HANDLE,HANDLE,PHANDLE,ACCESS_MASK,ULONG,ULONG);
987 NTSTATUS WINAPI ZwDuplicateToken(HANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,SECURITY_IMPERSONATION_LEVEL,TOKEN_TYPE,PHANDLE);
988 NTSTATUS WINAPI ZwEnumerateKey(HANDLE,ULONG,KEY_INFORMATION_CLASS,void *,DWORD,DWORD *);
989 NTSTATUS WINAPI ZwEnumerateValueKey(HANDLE,ULONG,KEY_VALUE_INFORMATION_CLASS,PVOID,ULONG,PULONG);
990 NTSTATUS WINAPI ZwFlushInstructionCache(HANDLE,LPCVOID,SIZE_T);
991 NTSTATUS WINAPI ZwFlushKey(HANDLE);
992 NTSTATUS WINAPI ZwFlushVirtualMemory(HANDLE,LPCVOID*,SIZE_T*,ULONG);
993 NTSTATUS WINAPI ZwFreeVirtualMemory(HANDLE,PVOID*,SIZE_T*,ULONG);
994 NTSTATUS WINAPI ZwFsControlFile(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,ULONG,PVOID,ULONG,PVOID,ULONG);
995 NTSTATUS WINAPI ZwInitiatePowerAction(POWER_ACTION,SYSTEM_POWER_STATE,ULONG,BOOLEAN);
996 NTSTATUS WINAPI ZwLoadDriver(const UNICODE_STRING *);
997 NTSTATUS WINAPI ZwLoadKey(const OBJECT_ATTRIBUTES *,OBJECT_ATTRIBUTES *);
998 NTSTATUS WINAPI ZwLockVirtualMemory(HANDLE,PVOID*,SIZE_T*,ULONG);
999 NTSTATUS WINAPI ZwMakeTemporaryObject(HANDLE);
1000 NTSTATUS WINAPI ZwMapViewOfSection(HANDLE,HANDLE,PVOID*,ULONG,SIZE_T,const LARGE_INTEGER*,SIZE_T*,SECTION_INHERIT,ULONG,ULONG);
1001 NTSTATUS WINAPI ZwNotifyChangeKey(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,ULONG,BOOLEAN,PVOID,ULONG,BOOLEAN);
1002 NTSTATUS WINAPI ZwOpenDirectoryObject(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES);
1003 NTSTATUS WINAPI ZwOpenEvent(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES *);
1004 NTSTATUS WINAPI ZwOpenFile(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,PIO_STATUS_BLOCK,ULONG,ULONG);
1005 NTSTATUS WINAPI ZwOpenKey(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES *);
1006 NTSTATUS WINAPI ZwOpenProcess(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*,const CLIENT_ID*);
1007 NTSTATUS WINAPI ZwOpenProcessToken(HANDLE,DWORD,HANDLE *);
1008 NTSTATUS WINAPI ZwOpenSection(HANDLE*,ACCESS_MASK,const OBJECT_ATTRIBUTES*);
1009 NTSTATUS WINAPI ZwOpenSymbolicLinkObject(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES);
1010 NTSTATUS WINAPI ZwOpenThread(HANDLE*,ACCESS_MASK,const OBJECT_ATTRIBUTES*,const CLIENT_ID*);
1011 NTSTATUS WINAPI ZwOpenThreadToken(HANDLE,DWORD,BOOLEAN,HANDLE *);
1012 NTSTATUS WINAPI ZwOpenTimer(HANDLE*, ACCESS_MASK, const OBJECT_ATTRIBUTES*);
1013 NTSTATUS WINAPI ZwPowerInformation(POWER_INFORMATION_LEVEL,PVOID,ULONG,PVOID,ULONG);
1014 NTSTATUS WINAPI ZwPulseEvent(HANDLE,PULONG);
1015 NTSTATUS WINAPI ZwQueryDefaultLocale(BOOLEAN,LCID*);
1016 NTSTATUS WINAPI ZwQueryDefaultUILanguage(LANGID*);
1017 NTSTATUS WINAPI ZwQueryDirectoryFile(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,PVOID,ULONG,FILE_INFORMATION_CLASS,BOOLEAN,PUNICODE_STRING,BOOLEAN);
1018 NTSTATUS WINAPI ZwQueryDirectoryObject(HANDLE,PDIRECTORY_BASIC_INFORMATION,ULONG,BOOLEAN,BOOLEAN,PULONG,PULONG);
1019 NTSTATUS WINAPI ZwQueryEaFile(HANDLE,PIO_STATUS_BLOCK,PVOID,ULONG,BOOLEAN,PVOID,ULONG,PVOID,BOOLEAN);
1020 NTSTATUS WINAPI ZwQueryFullAttributesFile(const OBJECT_ATTRIBUTES*,FILE_NETWORK_OPEN_INFORMATION*);
1021 NTSTATUS WINAPI ZwQueryInformationFile(HANDLE,PIO_STATUS_BLOCK,PVOID,LONG,FILE_INFORMATION_CLASS);
1022 NTSTATUS WINAPI ZwQueryInformationThread(HANDLE,THREADINFOCLASS,PVOID,ULONG,PULONG);
1023 NTSTATUS WINAPI ZwQueryInformationToken(HANDLE,DWORD,PVOID,DWORD,LPDWORD);
1024 NTSTATUS WINAPI ZwQueryInstallUILanguage(LANGID*);
1025 NTSTATUS WINAPI ZwQueryKey(HANDLE,KEY_INFORMATION_CLASS,void *,DWORD,DWORD *);
1026 NTSTATUS WINAPI ZwQueryObject(HANDLE, OBJECT_INFORMATION_CLASS, PVOID, ULONG, PULONG);
1027 NTSTATUS WINAPI ZwQuerySecurityObject(HANDLE,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR,ULONG,PULONG);
1028 NTSTATUS WINAPI ZwQuerySection(HANDLE,SECTION_INFORMATION_CLASS,PVOID,ULONG,PULONG);
1029 NTSTATUS WINAPI ZwQuerySymbolicLinkObject(HANDLE,PUNICODE_STRING,PULONG);
1030 NTSTATUS WINAPI ZwQuerySystemInformation(SYSTEM_INFORMATION_CLASS,PVOID,ULONG,PULONG);
1031 NTSTATUS WINAPI ZwQueryTimerResolution(PULONG,PULONG,PULONG);
1032 NTSTATUS WINAPI ZwQueryValueKey(HANDLE,const UNICODE_STRING *,KEY_VALUE_INFORMATION_CLASS,void *,DWORD,DWORD *);
1033 NTSTATUS WINAPI ZwQueryVolumeInformationFile(HANDLE,PIO_STATUS_BLOCK,PVOID,ULONG,FS_INFORMATION_CLASS);
1034 NTSTATUS WINAPI ZwReadFile(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,PVOID,ULONG,PLARGE_INTEGER,PULONG);
1035 NTSTATUS WINAPI ZwReplaceKey(POBJECT_ATTRIBUTES,HANDLE,POBJECT_ATTRIBUTES);
1036 NTSTATUS WINAPI ZwRequestWaitReplyPort(HANDLE,PLPC_MESSAGE,PLPC_MESSAGE);
1037 NTSTATUS WINAPI ZwResetEvent(HANDLE,PULONG);
1038 NTSTATUS WINAPI ZwRestoreKey(HANDLE,HANDLE,ULONG);
1039 NTSTATUS WINAPI ZwSaveKey(HANDLE,HANDLE);
1040 NTSTATUS WINAPI ZwSecureConnectPort(PHANDLE,PUNICODE_STRING,PSECURITY_QUALITY_OF_SERVICE,PLPC_SECTION_WRITE,PSID,PLPC_SECTION_READ,PULONG,PVOID,PULONG);
1041 NTSTATUS WINAPI ZwSetDefaultLocale(BOOLEAN,LCID);
1042 NTSTATUS WINAPI ZwSetDefaultUILanguage(LANGID);
1043 NTSTATUS WINAPI ZwSetEaFile(HANDLE,PIO_STATUS_BLOCK,PVOID,ULONG);
1044 NTSTATUS WINAPI ZwSetEvent(HANDLE,PULONG);
1045 NTSTATUS WINAPI ZwSetInformationFile(HANDLE,PIO_STATUS_BLOCK,PVOID,ULONG,FILE_INFORMATION_CLASS);
1046 NTSTATUS WINAPI ZwSetInformationKey(HANDLE,const int,PVOID,ULONG);
1047 NTSTATUS WINAPI ZwSetInformationObject(HANDLE, OBJECT_INFORMATION_CLASS, PVOID, ULONG);
1048 NTSTATUS WINAPI ZwSetInformationProcess(HANDLE,PROCESS_INFORMATION_CLASS,PVOID,ULONG);
1049 NTSTATUS WINAPI ZwSetInformationThread(HANDLE,THREADINFOCLASS,LPCVOID,ULONG);
1050 NTSTATUS WINAPI ZwSetIoCompletion(HANDLE,ULONG,ULONG,NTSTATUS,ULONG);
1051 NTSTATUS WINAPI ZwSetSecurityObject(HANDLE,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR);
1052 NTSTATUS WINAPI ZwSetSystemInformation(SYSTEM_INFORMATION_CLASS,PVOID,ULONG);
1053 NTSTATUS WINAPI ZwSetSystemTime(const LARGE_INTEGER*,LARGE_INTEGER*);
1054 NTSTATUS WINAPI ZwSetTimer(HANDLE, const LARGE_INTEGER*, PTIMER_APC_ROUTINE, PVOID, BOOLEAN, ULONG, BOOLEAN*);
1055 NTSTATUS WINAPI ZwSetValueKey(HANDLE,const UNICODE_STRING *,ULONG,ULONG,const void *,ULONG);
1056 NTSTATUS WINAPI ZwSetVolumeInformationFile(HANDLE,PIO_STATUS_BLOCK,PVOID,ULONG,FS_INFORMATION_CLASS);
1057 NTSTATUS WINAPI ZwSuspendThread(HANDLE,PULONG);
1058 NTSTATUS WINAPI ZwTerminateProcess(HANDLE,LONG);
1059 NTSTATUS WINAPI ZwUnloadDriver(const UNICODE_STRING *);
1060 NTSTATUS WINAPI ZwUnloadKey(HANDLE);
1061 NTSTATUS WINAPI ZwUnmapViewOfSection(HANDLE,PVOID);
1062 NTSTATUS WINAPI ZwWaitForSingleObject(HANDLE,BOOLEAN,const LARGE_INTEGER*);
1063 NTSTATUS WINAPI ZwWaitForMultipleObjects(ULONG,const HANDLE*,BOOLEAN,BOOLEAN,const LARGE_INTEGER*);
1064 NTSTATUS WINAPI ZwWriteFile(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,const void*,ULONG,PLARGE_INTEGER,PULONG);
1065 NTSTATUS WINAPI ZwYieldExecution(void);
1067 #endif