Some memory manager cleanups
[reactos.git] / reactos / include / ddk / iotypes.h
1 /* $Id: iotypes.h,v 1.22 2001/01/08 02:14:05 dwelch Exp $
2 *
3 */
4
5 #ifndef __INCLUDE_DDK_IOTYPES_H
6 #define __INCLUDE_DDK_IOTYPES_H
7
8 #include <ntos/disk.h>
9 #include <ntos/file.h>
10
11 #ifdef __NTOSKRNL__
12 extern POBJECT_TYPE EXPORTED IoAdapterObjectType;
13 extern POBJECT_TYPE EXPORTED IoDeviceHandlerObjectType;
14 extern POBJECT_TYPE EXPORTED IoDeviceObjectType;
15 extern POBJECT_TYPE EXPORTED IoDriverObjectType;
16 extern POBJECT_TYPE EXPORTED IoFileObjectType;
17 #else
18 extern POBJECT_TYPE IMPORTED IoAdapterObjectType;
19 extern POBJECT_TYPE IMPORTED IoDeviceHandlerObjectType;
20 extern POBJECT_TYPE IMPORTED IoDeviceObjectType;
21 extern POBJECT_TYPE IMPORTED IoDriverObjectType;
22 extern POBJECT_TYPE IMPORTED IoFileObjectType;
23 #endif
24
25 /*
26 * These are referenced before they can be fully defined
27 */
28 struct _DRIVER_OBJECT;
29 struct _FILE_OBJECT;
30 struct _DEVICE_OBJECT;
31 struct _IRP;
32 struct _IO_STATUS_BLOCK;
33
34 /* SIMPLE TYPES *************************************************************/
35
36 enum
37 {
38 DeallocateObject,
39 KeepObject,
40 };
41
42
43 typedef enum _CREATE_FILE_TYPE
44 {
45 CreateFileTypeNone,
46 CreateFileTypeNamedPipe,
47 CreateFileTypeMailslot
48 } CREATE_FILE_TYPE;
49
50
51 /*
52 * FIXME: Definition needed
53 */
54 typedef struct _SHARE_ACCESS
55 {
56 } SHARE_ACCESS, *PSHARE_ACCESS;
57
58 /* FUNCTION TYPES ************************************************************/
59
60 typedef VOID (*PDRIVER_REINITIALIZE)(struct _DRIVER_OBJECT* DriverObject,
61 PVOID Context,
62 ULONG Count);
63
64 typedef NTSTATUS (*PIO_QUERY_DEVICE_ROUTINE)(PVOID Context,
65 PUNICODE_STRING Pathname,
66 INTERFACE_TYPE BusType,
67 ULONG BusNumber,
68 PKEY_VALUE_FULL_INFORMATION* BI,
69 CONFIGURATION_TYPE ControllerType,
70 ULONG ControllerNumber,
71 PKEY_VALUE_FULL_INFORMATION* CI,
72 CONFIGURATION_TYPE PeripheralType,
73 ULONG PeripheralNumber,
74 PKEY_VALUE_FULL_INFORMATION* PI);
75
76 typedef NTSTATUS (*PIO_COMPLETION_ROUTINE)(struct _DEVICE_OBJECT* DeviceObject,
77 struct _IRP* Irp,
78 PVOID Context);
79
80 typedef VOID (*PIO_APC_ROUTINE) (PVOID ApcContext,
81 struct _IO_STATUS_BLOCK* IoStatusBlock,
82 ULONG Reserved);
83
84
85 /* STRUCTURE TYPES ***********************************************************/
86
87 typedef struct _ADAPTER_OBJECT
88 {
89 } ADAPTER_OBJECT, *PADAPTER_OBJECT;
90
91 /*
92 * PURPOSE: Special timer associated with each device
93 * NOTES: This is a guess
94 */
95 typedef struct _IO_TIMER
96 {
97 KTIMER timer;
98 KDPC dpc;
99 } IO_TIMER, *PIO_TIMER;
100
101 typedef struct _IO_SECURITY_CONTEXT
102 {
103 PSECURITY_QUALITY_OF_SERVICE SecurityQos;
104 PACCESS_STATE AccessState;
105 ACCESS_MASK DesiredAccess;
106 ULONG FullCreateOptions;
107 } IO_SECURITY_CONTEXT, *PIO_SECURITY_CONTEXT;
108
109 /*
110 * PURPOSE: IRP stack location
111 */
112 typedef struct _IO_STACK_LOCATION
113 {
114 UCHAR MajorFunction;
115 UCHAR MinorFunction;
116 UCHAR Flags;
117 UCHAR Control;
118
119 union
120 {
121 struct
122 {
123 PIO_SECURITY_CONTEXT SecurityContext;
124 ULONG Options;
125 USHORT FileAttributes;
126 USHORT ShareAccess;
127 ULONG EaLength;
128 } Create;
129 struct
130 {
131 ULONG Length;
132 ULONG Key;
133 LARGE_INTEGER ByteOffset;
134 } Read;
135 struct
136 {
137 ULONG Length;
138 ULONG Key;
139 LARGE_INTEGER ByteOffset;
140 } Write;
141 struct
142 {
143 ULONG OutputBufferLength;
144 ULONG InputBufferLength;
145 ULONG IoControlCode;
146 PVOID Type3InputBuffer;
147 } DeviceIoControl;
148 struct
149 {
150 ULONG OutputBufferLength;
151 ULONG InputBufferLength;
152 ULONG IoControlCode;
153 PVOID Type3InputBuffer;
154 } FileSystemControl;
155 struct
156 {
157 struct _VPB* Vpb;
158 struct _DEVICE_OBJECT* DeviceObject;
159 } Mount;
160 struct {
161 ULONG Length;
162 FILE_INFORMATION_CLASS FileInformationClass;
163 } QueryFile;
164 struct {
165 ULONG Length;
166 FS_INFORMATION_CLASS FileInformationClass;
167 } QueryVolume;
168 struct {
169 ULONG Length;
170 FS_INFORMATION_CLASS FileInformationClass;
171 } SetVolume;
172 struct {
173 ULONG Length;
174 FILE_INFORMATION_CLASS FileInformationClass;
175 struct _FILE_OBJECT* FileObject;
176 union {
177 struct {
178 BOOLEAN ReplaceIfExists;
179 BOOLEAN AdvanceOnly;
180 } d;
181 ULONG ClusterCount;
182 HANDLE DeleteHandle;
183 } u;
184 } SetFile;
185 struct
186 {
187 ULONG Length;
188 PUNICODE_STRING FileName;
189 FILE_INFORMATION_CLASS FileInformationClass;
190 ULONG FileIndex;
191 } QueryDirectory;
192 /*
193 struct
194 {
195 ULONG CreateDisposition;
196 ULONG CreateOptions;
197 ULONG ShareAccess;
198 BOOLEAN WriteModeMessage;
199 BOOLEAN ReadModeMessage;
200 BOOLEAN NonBlocking;
201 ULONG MaxInstances;
202 ULONG InBufferSize;
203 ULONG OutBufferSize;
204 LARGE_INTEGER TimeOut;
205 } CreateNamedPipe;
206 */
207 } Parameters;
208
209 struct _DEVICE_OBJECT* DeviceObject;
210 struct _FILE_OBJECT* FileObject;
211
212 PIO_COMPLETION_ROUTINE CompletionRoutine;
213 PVOID CompletionContext;
214
215 } IO_STACK_LOCATION, *PIO_STACK_LOCATION;
216
217 typedef struct _IO_STATUS_BLOCK
218 {
219 NTSTATUS Status;
220 ULONG Information;
221 } IO_STATUS_BLOCK, *PIO_STATUS_BLOCK;
222
223 /*
224 * Driver entry point declaration
225 */
226 typedef NTSTATUS (*PDRIVER_INITIALIZE)(struct _DRIVER_OBJECT* DriverObject,
227 PUNICODE_STRING RegistryPath);
228
229 /*
230 * Driver cancel declaration
231 */
232 typedef NTSTATUS (*PDRIVER_CANCEL)(struct _DEVICE_OBJECT* DeviceObject,
233 struct _IRP* RegistryPath);
234
235
236 typedef struct _SECTION_OBJECT_POINTERS
237 {
238 PVOID DataSectionObject;
239 PVOID SharedCacheMap;
240 PVOID ImageSectionObject;
241 } SECTION_OBJECT_POINTERS, *PSECTION_OBJECT_POINTERS;
242
243 typedef struct _IO_COMPLETION_CONTEXT
244 {
245 PVOID Port;
246 ULONG Key;
247 } IO_COMPLETION_CONTEXT, *PIO_COMPLETION_CONTEXT;
248
249 #define FO_FILE_OPEN 0x00000001
250 #define FO_SYNCHRONOUS_IO 0x00000002
251 #define FO_ALERTABLE_IO 0x00000004
252 #define FO_NO_INTERMEDIATE_BUFFERING 0x00000008
253 #define FO_WRITE_THROUGH 0x00000010
254 #define FO_SEQUENTIAL_ONLY 0x00000020
255 #define FO_CACHE_SUPPORTED 0x00000040
256 #define FO_NAMED_PIPE 0x00000080
257 #define FO_STREAM_FILE 0x00000100
258 #define FO_MAILSLOT 0x00000200
259 #define FO_GENERATE_AUDIT_ON_CLOSE 0x00000400
260 #define FO_DIRECT_DEVICE_OPEN 0x00000800
261 #define FO_FILE_MODIFIED 0x00001000
262 #define FO_FILE_SIZE_CHANGED 0x00002000
263 #define FO_CLEANUP_COMPLETE 0x00004000
264 #define FO_TEMPORARY_FILE 0x00008000
265 #define FO_DELETE_ON_CLOSE 0x00010000
266 #define FO_OPENED_CASE_SENSITIVE 0x00020000
267 #define FO_HANDLE_CREATED 0x00040000
268 #define FO_FILE_FAST_IO_READ 0x00080000
269
270 /*
271 * ReactOS specific flags
272 */
273 #define FO_DIRECT_CACHE_READ 0x72000001
274 #define FO_DIRECT_CACHE_WRITE 0x72000002
275 #define FO_DIRECT_CACHE_PAGING_READ 0x72000004
276 #define FO_DIRECT_CACHE_PAGING_WRITE 0x72000008
277 #define FO_FCB_IS_VALID 0x72000010
278
279 typedef struct _FILE_OBJECT
280 {
281 CSHORT Type;
282 CSHORT Size;
283 struct _DEVICE_OBJECT* DeviceObject;
284 struct _VPB* Vpb;
285 PVOID FsContext;
286 PVOID FsContext2;
287 PSECTION_OBJECT_POINTERS SectionObjectPointers;
288 PVOID PrivateCacheMap;
289 NTSTATUS FinalStatus;
290 struct _FILE_OBJECT* RelatedFileObject;
291 BOOLEAN LockOperation;
292 BOOLEAN DeletePending;
293 BOOLEAN ReadAccess;
294 BOOLEAN WriteAccess;
295 BOOLEAN DeleteAccess;
296 BOOLEAN SharedRead;
297 BOOLEAN SharedWrite;
298 BOOLEAN SharedDelete;
299 ULONG Flags;
300 UNICODE_STRING FileName;
301 LARGE_INTEGER CurrentByteOffset;
302 ULONG Waiters;
303 ULONG Busy;
304 PVOID LastLock;
305 KEVENT Lock;
306 KEVENT Event;
307 PIO_COMPLETION_CONTEXT CompletionContext;
308 } FILE_OBJECT, *PFILE_OBJECT;
309
310
311 typedef struct _IRP
312 {
313 CSHORT Type;
314 USHORT Size;
315 PMDL MdlAddress;
316 ULONG Flags;
317 union
318 {
319 struct _IRP* MasterIrp;
320 LONG IrpCount;
321 PVOID SystemBuffer;
322 } AssociatedIrp;
323 LIST_ENTRY ThreadListEntry;
324 IO_STATUS_BLOCK IoStatus;
325 KPROCESSOR_MODE RequestorMode;
326 BOOLEAN PendingReturned;
327 CHAR StackCount;
328 CHAR CurrentLocation;
329 BOOLEAN Cancel;
330 KIRQL CancelIrql;
331 CCHAR ApcEnvironment;// CCHAR or PVOID?
332 UCHAR AllocationFlags;//UCHAR or ULONG?
333 PIO_STATUS_BLOCK UserIosb;
334 PKEVENT UserEvent;
335 union
336 {
337 struct
338 {
339 PIO_APC_ROUTINE UserApcRoutine;
340 PVOID UserApcContext;
341 } AsynchronousParameters;
342 LARGE_INTEGER AllocationSize;
343 } Overlay;
344 PDRIVER_CANCEL CancelRoutine;
345 PVOID UserBuffer;
346 union
347 {
348 struct
349 {
350 KDEVICE_QUEUE_ENTRY DeviceQueueEntry;
351 struct _ETHREAD* Thread;
352 PCHAR AuxiliaryBuffer;
353 LIST_ENTRY ListEntry;
354 struct _IO_STACK_LOCATION* CurrentStackLocation;
355 PFILE_OBJECT OriginalFileObject;
356 } Overlay;
357 KAPC Apc;
358 ULONG CompletionKey;
359 } Tail;
360 IO_STACK_LOCATION Stack[1];
361 } IRP, *PIRP;
362
363 #define VPB_MOUNTED 0x00000001
364 #define VPB_LOCKED 0x00000002
365 #define VPB_PERSISTENT 0x00000004
366 #define VPB_REMOVE_PENDING 0x00000008
367
368 typedef struct _VPB
369 {
370 CSHORT Type;
371 CSHORT Size;
372 USHORT Flags;
373 USHORT VolumeLabelLength;
374 struct _DEVICE_OBJECT* DeviceObject;
375 struct _DEVICE_OBJECT* RealDevice;
376 ULONG SerialNumber;
377 ULONG ReferenceCount;
378 WCHAR VolumeLabel[MAXIMUM_VOLUME_LABEL_LENGTH];
379 } VPB, *PVPB;
380
381
382 typedef struct _DEVICE_OBJECT
383 {
384 CSHORT Type;
385 CSHORT Size;
386 LONG ReferenceCount;
387 struct _DRIVER_OBJECT* DriverObject;
388 struct _DEVICE_OBJECT* NextDevice;
389 struct _DEVICE_OBJECT* AttachedDevice;
390 struct _IRP* CurrentIrp;
391 PIO_TIMER Timer;
392 ULONG Flags;
393 ULONG Characteristics;
394 PVPB Vpb;
395 PVOID DeviceExtension;
396 DEVICE_TYPE DeviceType;
397 CCHAR StackSize;
398 union
399 {
400 LIST_ENTRY ListHead;
401 WAIT_CONTEXT_BLOCK Wcb;
402 } Queue;
403 ULONG AlignmentRequirement;
404 KDEVICE_QUEUE DeviceQueue;
405 KDPC Dpc;
406 ULONG ActiveThreadCount;
407 PSECURITY_DESCRIPTOR SecurityDescriptor;
408 KEVENT DeviceLock;
409 USHORT SectorSize;
410 USHORT Spare1;
411 struct _DEVOBJ_EXTENSION* DeviceObjectExtension;
412 PVOID Reserved;
413 } DEVICE_OBJECT, *PDEVICE_OBJECT;
414
415 /*
416 * Dispatch routine type declaration
417 */
418 typedef NTSTATUS STDCALL (*PDRIVER_DISPATCH)(struct _DEVICE_OBJECT*, IRP*);
419
420
421 /*
422 * Fast i/o routine type declaration
423 */
424 //typedef NTSTATUS (*PFAST_IO_DISPATCH)(struct _DEVICE_OBJECT*, IRP*);
425 //FIXME : this type is ok for read and write, but not for all routines
426 typedef BOOLEAN STDCALL (*PFAST_IO_ROUTINE) (
427 IN struct _FILE_OBJECT *FileObject,
428 IN PLARGE_INTEGER FileOffset,
429 IN ULONG Length,
430 IN BOOLEAN Wait,
431 IN ULONG LockKey,
432 OUT PVOID Buffer,
433 OUT PIO_STATUS_BLOCK IoStatus,
434 IN struct _DEVICE_OBJECT *DeviceObject
435 );
436
437 typedef struct _FAST_IO_DISPATCH {
438 ULONG SizeOfFastIoDispatch;
439 PFAST_IO_ROUTINE FastIoCheckIfPossible;
440 PFAST_IO_ROUTINE FastIoRead;
441 PFAST_IO_ROUTINE FastIoWrite;
442 PFAST_IO_ROUTINE FastIoQueryBasicInfo;
443 PFAST_IO_ROUTINE FastIoQueryStandardInfo;
444 PFAST_IO_ROUTINE FastIoLock;
445 PFAST_IO_ROUTINE FastIoUnlockSingle;
446 PFAST_IO_ROUTINE FastIoUnlockAll;
447 PFAST_IO_ROUTINE FastIoUnlockAllByKey;
448 PFAST_IO_ROUTINE FastIoDeviceControl;
449 PFAST_IO_ROUTINE AcquireFileForNtCreateSection;
450 PFAST_IO_ROUTINE ReleaseFileForNtCreateSection;
451 PFAST_IO_ROUTINE FastIoDetachDevice;
452 PFAST_IO_ROUTINE FastIoQueryNetworkOpenInfo;
453 PFAST_IO_ROUTINE AcquireForModWrite;
454 PFAST_IO_ROUTINE MdlRead;
455 PFAST_IO_ROUTINE MdlReadComplete;
456 PFAST_IO_ROUTINE PrepareMdlWrite;
457 PFAST_IO_ROUTINE MdlWriteComplete;
458 PFAST_IO_ROUTINE FastIoReadCompressed;
459 PFAST_IO_ROUTINE FastIoWriteCompressed;
460 PFAST_IO_ROUTINE MdlReadCompleteCompressed;
461 PFAST_IO_ROUTINE MdlWriteCompleteCompressed;
462 PFAST_IO_ROUTINE FastIoQueryOpen;
463 PFAST_IO_ROUTINE ReleaseForModWrite;
464 PFAST_IO_ROUTINE AcquireForCcFlush;
465 PFAST_IO_ROUTINE ReleaseForCcFlush;
466 } FAST_IO_DISPATCH, *PFAST_IO_DISPATCH;
467
468 /*
469 * Dispatch routine type declaration
470 */
471 typedef VOID STDCALL (*PDRIVER_STARTIO)(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp);
472
473 /*
474 * Dispatch routine type declaration
475 */
476 typedef NTSTATUS (*PDRIVER_UNLOAD)(struct _DRIVER_OBJECT*);
477
478 typedef struct _DRIVER_EXTENSION
479 {
480 struct _DRIVER_OBJECT* DriverObject;
481 PDRIVER_ADD_DEVICE AddDevice;
482 ULONG Count;
483 UNICODE_STRING ServiceKeyName;
484 } DRIVER_EXTENSION, *PDRIVER_EXTENSION;
485
486 #if 0
487 typedef
488 struct _FAST_IO_DISPATCH_TABLE
489 {
490 ULONG Count;
491 PFAST_IO_DISPATCH Dispatch;
492
493 } FAST_IO_DISPATCH_TABLE, * PFAST_IO_DISPATCH_TABLE;
494 #endif
495
496 typedef struct _DRIVER_OBJECT
497 {
498 CSHORT Type;
499 CSHORT Size;
500 PDEVICE_OBJECT DeviceObject;
501 ULONG Flags;
502 PVOID DriverStart;
503 ULONG DriverSize;
504 PVOID DriverSection;
505 PDRIVER_EXTENSION DriverExtension;
506 UNICODE_STRING DriverName;
507 PUNICODE_STRING HardwareDatabase;
508 #if 0
509 PFAST_IO_DISPATCH_TABLE FastIoDispatch;
510 #else
511 PFAST_IO_DISPATCH FastIoDispatch;
512 #endif
513 PDRIVER_INITIALIZE DriverInit;
514 PDRIVER_STARTIO DriverStartIo;
515 PDRIVER_UNLOAD DriverUnload;
516 PDRIVER_DISPATCH MajorFunction[IRP_MJ_MAXIMUM_FUNCTION + 1];
517 } DRIVER_OBJECT, *PDRIVER_OBJECT;
518
519
520 typedef struct _CONFIGURATION_INFORMATION
521 {
522 ULONG DiskCount;
523 ULONG FloppyCount;
524 ULONG CDRomCount;
525 ULONG TapeCount;
526 ULONG ScsiPortCount;
527 ULONG SerialCount;
528 ULONG ParallelCount;
529 BOOLEAN AtDiskPrimaryAddressClaimed;
530 BOOLEAN AtDiskSecondaryAddressClaimed;
531 } CONFIGURATION_INFORMATION, *PCONFIGURATION_INFORMATION;
532
533 typedef VOID (*PIO_DPC_ROUTINE)(PKDPC Dpc,
534 PDEVICE_OBJECT DeviceObject,
535 PIRP Irp,
536 PVOID Context);
537
538 typedef VOID (*PIO_TIMER_ROUTINE)(PDEVICE_OBJECT DeviceObject,
539 PVOID Context);
540
541 #if WINDOWS_STRUCTS_DOESNT_ALREADY_DEFINE_THIS
542 typedef struct _PARTITION_INFORMATION
543 {
544 LARGE_INTEGER StartingOffset;
545 LARGE_INTEGER PartitionLength;
546 ULONG HiddenSectors;
547 ULONG PartitionNumber;
548 UCHAR PartitionType;
549 BOOLEAN BootIndicator;
550 BOOLEAN RecognizedPartition;
551 BOOLEAN RewritePartition;
552 } PARTITION_INFORMATION, *PPARTITION_INFORMATION;
553 #endif
554
555 typedef struct _DRIVER_LAYOUT_INFORMATION
556 {
557 ULONG PartitionCount;
558 ULONG Signature;
559 PARTITION_INFORMATION PartitionEntry[1];
560 } DRIVER_LAYOUT_INFORMATION, *PDRIVER_LAYOUT_INFORMATION;
561
562
563
564
565
566 typedef struct _IO_RESOURCE_DESCRIPTOR
567 {
568 UCHAR Option;
569 UCHAR Type;
570 UCHAR SharedDisposition;
571
572 /*
573 * Reserved for system use
574 */
575 UCHAR Spare1;
576
577 USHORT Flags;
578
579 /*
580 * Reserved for system use
581 */
582 UCHAR Spare2;
583
584 union
585 {
586 struct
587 {
588 ULONG Length;
589 ULONG Alignment;
590 PHYSICAL_ADDRESS MinimumAddress;
591 PHYSICAL_ADDRESS MaximumAddress;
592 } Port;
593 struct
594 {
595 ULONG Length;
596 ULONG Alignment;
597 PHYSICAL_ADDRESS MinimumAddress;
598 PHYSICAL_ADDRESS MaximumAddress;
599 } Memory;
600 struct
601 {
602 ULONG MinimumVector;
603 ULONG MaximumVector;
604 } Interrupt;
605 struct
606 {
607 ULONG MinimumChannel;
608 ULONG MaximumChannel;
609 } Dma;
610 } u;
611 } IO_RESOURCE_DESCRIPTOR, *PIO_RESOURCE_DESCRIPTOR;
612
613 typedef struct _IO_RESOURCE_LIST
614 {
615 USHORT Version;
616 USHORT Revision;
617 ULONG Count;
618 IO_RESOURCE_DESCRIPTOR Descriptors[1];
619 } IO_RESOURCE_LIST, *PIO_RESOURCE_LIST;
620
621 typedef struct _IO_RESOURCES_REQUIREMENTS_LIST
622 {
623 /*
624 * List size in bytes
625 */
626 ULONG ListSize;
627
628 /*
629 * System defined enum for the bus
630 */
631 INTERFACE_TYPE InterfaceType;
632
633 ULONG BusNumber;
634 ULONG SlotNumber;
635 ULONG Reserved[3];
636 ULONG AlternativeLists;
637 IO_RESOURCE_LIST List[1];
638 } IO_RESOURCES_REQUIREMENTS_LIST, *PIO_RESOURCE_REQUIREMENTS_LIST;
639
640 typedef struct
641 {
642 UCHAR Type;
643 UCHAR ShareDisposition;
644 USHORT Flags;
645 union
646 {
647 struct
648 {
649 PHYSICAL_ADDRESS Start;
650 ULONG Length;
651 } Port;
652 struct
653 {
654 ULONG Level;
655 ULONG Vector;
656 ULONG Affinity;
657 } Interrupt;
658 struct
659 {
660 PHYSICAL_ADDRESS Start;
661 ULONG Length;
662 } Memory;
663 struct
664 {
665 ULONG Channel;
666 ULONG Port;
667 ULONG Reserved1;
668 } Dma;
669 struct
670 {
671 ULONG DataSize;
672 ULONG Reserved1;
673 ULONG Reserved2;
674 } DeviceSpecificData;
675 } u;
676 } CM_PARTIAL_RESOURCE_DESCRIPTOR, *PCM_PARTIAL_RESOURCE_DESCRIPTOR;
677
678 typedef struct
679 {
680 USHORT Version;
681 USHORT Revision;
682 ULONG Count;
683 CM_PARTIAL_RESOURCE_DESCRIPTOR PartialDescriptors[1];
684 } CM_PARTIAL_RESOURCE_LIST;
685
686 typedef struct
687 {
688 INTERFACE_TYPE InterfaceType;
689 ULONG BusNumber;
690 CM_PARTIAL_RESOURCE_LIST PartialResourceList;
691 } CM_FULL_RESOURCE_DESCRIPTOR;
692
693 typedef struct
694 {
695 ULONG Count;
696 CM_FULL_RESOURCE_DESCRIPTOR List[1];
697 } CM_RESOURCE_LIST, *PCM_RESOURCE_LIST;
698
699
700 typedef
701 IO_ALLOCATION_ACTION
702 (*PDRIVER_CONTROL) (
703 PDEVICE_OBJECT DeviceObject,
704 PIRP irp,
705 PVOID MapRegisterBase,
706 PVOID Context
707 );
708 #if (_WIN32_WINNT >= 0x0400)
709 typedef
710 VOID
711 (*PFSDNOTIFICATIONPROC) (
712 IN PDEVICE_OBJECT PtrTargetFileSystemDeviceObject,
713 IN BOOLEAN DriverActive
714 );
715 #endif // (_WIN32_WINNT >= 0x0400)
716
717 #endif __INCLUDE_DDK_IOTYPES_H