[HEADERS]
[reactos.git] / reactos / include / ndk / iotypes.h
1 /*++ NDK Version: 0098
2
3 Copyright (c) Alex Ionescu. All rights reserved.
4
5 Header Name:
6
7 iotypes.h
8
9 Abstract:
10
11 Type definitions for the I/O Manager.
12
13 Author:
14
15 Alex Ionescu (alexi@tinykrnl.org) - Updated - 27-Feb-2006
16
17 --*/
18 #ifndef _IOTYPES_H
19 #define _IOTYPES_H
20
21 //
22 // Dependencies
23 //
24 #include <umtypes.h>
25 #include <ifssupp.h>
26 #include <potypes.h>
27
28 //
29 // I/O Completion Access Rights
30 //
31 #define IO_COMPLETION_QUERY_STATE 0x0001
32 #ifndef NTOS_MODE_USER
33 #define IO_COMPLETION_MODIFY_STATE 0x0002
34 #define IO_COMPLETION_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | \
35 SYNCHRONIZE | \
36 0x3)
37
38 //
39 // Kernel Exported Object Types
40 //
41 extern POBJECT_TYPE NTSYSAPI IoAdapterObjectType;
42 extern POBJECT_TYPE NTSYSAPI IoDeviceHandlerObjectType;
43 extern POBJECT_TYPE NTSYSAPI IoDeviceObjectType;
44 extern POBJECT_TYPE NTSYSAPI IoDriverObjectType;
45
46 #else
47
48 //
49 // Symbolic Link Access Rights
50 //
51 #define SYMBOLIC_LINK_QUERY 0x0001
52 #define SYMBOLIC_LINK_ALL_ACCESS STANDARD_RIGHTS_REQUIRED | 0x0001
53 #endif
54
55 //
56 // NtCreateFile Result Flags
57 //
58 #define FILE_SUPERSEDED 0x00000000
59 #define FILE_OPENED 0x00000001
60 #define FILE_CREATED 0x00000002
61 #define FILE_OVERWRITTEN 0x00000003
62 #define FILE_EXISTS 0x00000004
63 #define FILE_DOES_NOT_EXIST 0x00000005
64
65 //
66 // Pipe Flags
67 //
68 #define FILE_PIPE_BYTE_STREAM_TYPE 0x00000000
69 #define FILE_PIPE_MESSAGE_TYPE 0x00000001
70 #define FILE_PIPE_BYTE_STREAM_MODE 0x00000000
71 #define FILE_PIPE_MESSAGE_MODE 0x00000001
72 #define FILE_PIPE_QUEUE_OPERATION 0x00000000
73 #define FILE_PIPE_COMPLETE_OPERATION 0x00000001
74 #define FILE_PIPE_INBOUND 0x00000000
75 #define FILE_PIPE_OUTBOUND 0x00000001
76 #define FILE_PIPE_FULL_DUPLEX 0x00000002
77 #define FILE_PIPE_CLIENT_END 0x00000000
78 #define FILE_PIPE_SERVER_END 0x00000001
79
80 //
81 // NtCreateFile Attributes
82 //
83 #define FILE_ATTRIBUTE_VALID_FLAGS 0x00007fb7
84 #define FILE_ATTRIBUTE_VALID_SET_FLAGS 0x000031a7
85
86 //
87 // NtCreateFile OpenType Flags
88 //
89 #define FILE_SUPERSEDE 0x00000000
90 #define FILE_OPEN 0x00000001
91 #define FILE_CREATE 0x00000002
92 #define FILE_OPEN_IF 0x00000003
93 #define FILE_OVERWRITE 0x00000004
94 #define FILE_OVERWRITE_IF 0x00000005
95 #define FILE_MAXIMUM_DISPOSITION 0x00000005
96
97 //
98 // NtCreateFile Flags
99 //
100 #define FILE_DIRECTORY_FILE 0x00000001
101 #define FILE_WRITE_THROUGH 0x00000002
102 #define FILE_SEQUENTIAL_ONLY 0x00000004
103 #define FILE_NO_INTERMEDIATE_BUFFERING 0x00000008
104 #define FILE_SYNCHRONOUS_IO_ALERT 0x00000010
105 #define FILE_SYNCHRONOUS_IO_NONALERT 0x00000020
106 #define FILE_NON_DIRECTORY_FILE 0x00000040
107 #define FILE_CREATE_TREE_CONNECTION 0x00000080
108 #define FILE_COMPLETE_IF_OPLOCKED 0x00000100
109 #define FILE_NO_EA_KNOWLEDGE 0x00000200
110 #define FILE_OPEN_REMOTE_INSTANCE 0x00000400
111 #define FILE_RANDOM_ACCESS 0x00000800
112 #define FILE_DELETE_ON_CLOSE 0x00001000
113 #define FILE_OPEN_BY_FILE_ID 0x00002000
114 #define FILE_OPEN_FOR_BACKUP_INTENT 0x00004000
115 #define FILE_NO_COMPRESSION 0x00008000
116 #define FILE_RESERVE_OPFILTER 0x00100000
117 #define FILE_OPEN_REPARSE_POINT 0x00200000
118 #define FILE_OPEN_NO_RECALL 0x00400000
119 #define FILE_OPEN_FOR_FREE_SPACE_QUERY 0x00800000
120
121 //
122 // Device Charactertics
123 //
124 #define FILE_REMOVABLE_MEDIA 0x00000001
125 #define FILE_REMOTE_DEVICE 0x00000010
126
127 //
128 // File Object Flags
129 //
130 #define FO_FILE_OBJECT_HAS_EXTENSION 0x00800000
131
132 //
133 // Device Object Extension Flags
134 //
135 #define DOE_UNLOAD_PENDING 0x1
136 #define DOE_DELETE_PENDING 0x2
137 #define DOE_REMOVE_PENDING 0x4
138 #define DOE_REMOVE_PROCESSED 0x8
139 #define DOE_START_PENDING 0x10
140
141 //
142 // Device Object StartIo Flags
143 //
144 #define DOE_SIO_NO_KEY 0x20
145 #define DOE_SIO_WITH_KEY 0x40
146 #define DOE_SIO_CANCELABLE 0x80
147 #define DOE_SIO_DEFERRED 0x100
148 #define DOE_SIO_NO_CANCEL 0x200
149
150 //
151 // Device Node Flags
152 //
153 #define DNF_PROCESSED 0x00000001
154 #define DNF_STARTED 0x00000002
155 #define DNF_START_FAILED 0x00000004
156 #define DNF_ENUMERATED 0x00000008
157 #define DNF_DELETED 0x00000010
158 #define DNF_MADEUP 0x00000020
159 #define DNF_START_REQUEST_PENDING 0x00000040
160 #define DNF_NO_RESOURCE_REQUIRED 0x00000080
161 #define DNF_INSUFFICIENT_RESOURCES 0x00000100
162 #define DNF_RESOURCE_ASSIGNED 0x00000200
163 #define DNF_RESOURCE_REPORTED 0x00000400
164 #define DNF_HAL_NODE 0x00000800 // ???
165 #define DNF_ADDED 0x00001000
166 #define DNF_ADD_FAILED 0x00002000
167 #define DNF_LEGACY_DRIVER 0x00004000
168 #define DNF_STOPPED 0x00008000
169 #define DNF_WILL_BE_REMOVED 0x00010000
170 #define DNF_NEED_TO_ENUM 0x00020000
171 #define DNF_NOT_CONFIGURED 0x00040000
172 #define DNF_REINSTALL 0x00080000
173 #define DNF_RESOURCE_REQUIREMENTS_NEED_FILTERED 0x00100000 // ???
174 #define DNF_DISABLED 0x00200000
175 #define DNF_RESTART_OK 0x00400000
176 #define DNF_NEED_RESTART 0x00800000
177 #define DNF_VISITED 0x01000000
178 #define DNF_ASSIGNING_RESOURCES 0x02000000
179 #define DNF_BEEING_ENUMERATED 0x04000000
180 #define DNF_NEED_ENUMERATION_ONLY 0x08000000
181 #define DNF_LOCKED 0x10000000
182 #define DNF_HAS_BOOT_CONFIG 0x20000000
183 #define DNF_BOOT_CONFIG_RESERVED 0x40000000
184 #define DNF_HAS_PROBLEM 0x80000000 // ???
185
186 //
187 // Device Node User Flags
188 //
189 #define DNUF_DONT_SHOW_IN_UI 0x0002
190 #define DNUF_NOT_DISABLEABLE 0x0008
191
192 //
193 // Internal Option Flags
194 //
195 #define IO_ATTACH_DEVICE_API 0x80000000
196
197 //
198 // Undocumented WMI Registration Flags
199 //
200 #define WMIREG_FLAG_TRACE_PROVIDER 0x00010000
201 #define WMIREG_FLAG_TRACE_NOTIFY_MASK 0x00F00000
202 #define WMIREG_NOTIFY_DISK_IO 0x00100000
203 #define WMIREG_NOTIFY_TDI_IO 0x00200000
204
205 //
206 // I/O Completion Information Class for NtQueryIoCompletionInformation
207 //
208 typedef enum _IO_COMPLETION_INFORMATION_CLASS
209 {
210 IoCompletionBasicInformation
211 } IO_COMPLETION_INFORMATION_CLASS;
212
213 #ifdef NTOS_MODE_USER
214
215 //
216 // Hardware Interface Type
217 //
218 typedef enum _INTERFACE_TYPE
219 {
220 InterfaceTypeUndefined = -1,
221 Internal,
222 Isa,
223 Eisa,
224 MicroChannel,
225 TurboChannel,
226 PCIBus,
227 VMEBus,
228 NuBus,
229 PCMCIABus,
230 CBus,
231 MPIBus,
232 MPSABus,
233 ProcessorInternal,
234 InternalPowerBus,
235 PNPISABus,
236 PNPBus,
237 MaximumInterfaceType
238 }INTERFACE_TYPE, *PINTERFACE_TYPE;
239
240 typedef enum _BUS_DATA_TYPE
241 {
242 ConfigurationSpaceUndefined = -1,
243 Cmos,
244 EisaConfiguration,
245 Pos,
246 CbusConfiguration,
247 PCIConfiguration,
248 VMEConfiguration,
249 NuBusConfiguration,
250 PCMCIAConfiguration,
251 MPIConfiguration,
252 MPSAConfiguration,
253 PNPISAConfiguration,
254 SgiInternalConfiguration,
255 MaximumBusDataType
256 } BUS_DATA_TYPE, *PBUS_DATA_TYPE;
257
258 //
259 // File Information Classes for NtQueryInformationFile
260 //
261 typedef enum _FILE_INFORMATION_CLASS
262 {
263 FileDirectoryInformation = 1,
264 FileFullDirectoryInformation,
265 FileBothDirectoryInformation,
266 FileBasicInformation,
267 FileStandardInformation,
268 FileInternalInformation,
269 FileEaInformation,
270 FileAccessInformation,
271 FileNameInformation,
272 FileRenameInformation,
273 FileLinkInformation,
274 FileNamesInformation,
275 FileDispositionInformation,
276 FilePositionInformation,
277 FileFullEaInformation,
278 FileModeInformation,
279 FileAlignmentInformation,
280 FileAllInformation,
281 FileAllocationInformation,
282 FileEndOfFileInformation,
283 FileAlternateNameInformation,
284 FileStreamInformation,
285 FilePipeInformation,
286 FilePipeLocalInformation,
287 FilePipeRemoteInformation,
288 FileMailslotQueryInformation,
289 FileMailslotSetInformation,
290 FileCompressionInformation,
291 FileObjectIdInformation,
292 FileCompletionInformation,
293 FileMoveClusterInformation,
294 FileQuotaInformation,
295 FileReparsePointInformation,
296 FileNetworkOpenInformation,
297 FileAttributeTagInformation,
298 FileTrackingInformation,
299 FileIdBothDirectoryInformation,
300 FileIdFullDirectoryInformation,
301 FileValidDataLengthInformation,
302 FileShortNameInformation,
303 FileMaximumInformation
304 } FILE_INFORMATION_CLASS, *PFILE_INFORMATION_CLASS;
305
306 //
307 // File Information Classes for NtQueryInformationFileSystem
308 //
309 typedef enum _FSINFOCLASS
310 {
311 FileFsVolumeInformation = 1,
312 FileFsLabelInformation,
313 FileFsSizeInformation,
314 FileFsDeviceInformation,
315 FileFsAttributeInformation,
316 FileFsControlInformation,
317 FileFsFullSizeInformation,
318 FileFsObjectIdInformation,
319 FileFsDriverPathInformation,
320 FileFsMaximumInformation
321 } FS_INFORMATION_CLASS, *PFS_INFORMATION_CLASS;
322
323 #endif
324
325 //
326 // Dock Profile Status
327 //
328 typedef enum _PROFILE_STATUS
329 {
330 DOCK_NOTDOCKDEVICE,
331 DOCK_QUIESCENT,
332 DOCK_ARRIVING,
333 DOCK_DEPARTING,
334 DOCK_EJECTIRP_COMPLETED
335 } PROFILE_STATUS, *PPROFILE_STATUS;
336
337 //
338 // Device Node States
339 //
340 typedef enum _PNP_DEVNODE_STATE
341 {
342 DeviceNodeUnspecified = 0x300,
343 DeviceNodeUninitialized = 0x301,
344 DeviceNodeInitialized = 0x302,
345 DeviceNodeDriversAdded = 0x303,
346 DeviceNodeResourcesAssigned = 0x304,
347 DeviceNodeStartPending = 0x305,
348 DeviceNodeStartCompletion = 0x306,
349 DeviceNodeStartPostWork = 0x307,
350 DeviceNodeStarted = 0x308,
351 DeviceNodeQueryStopped = 0x309,
352 DeviceNodeStopped = 0x30a,
353 DeviceNodeRestartCompletion = 0x30b,
354 DeviceNodeEnumeratePending = 0x30c,
355 DeviceNodeEnumerateCompletion = 0x30d,
356 DeviceNodeAwaitingQueuedDeletion = 0x30e,
357 DeviceNodeAwaitingQueuedRemoval = 0x30f,
358 DeviceNodeQueryRemoved = 0x310,
359 DeviceNodeRemovePendingCloses = 0x311,
360 DeviceNodeRemoved = 0x312,
361 DeviceNodeDeletePendingCloses = 0x313,
362 DeviceNodeDeleted = 0x314,
363 MaxDeviceNodeState = 0x315,
364 } PNP_DEVNODE_STATE;
365
366 #ifdef NTOS_MODE_USER
367
368 //
369 // I/O Status Block
370 //
371 typedef struct _IO_STATUS_BLOCK
372 {
373 union
374 {
375 NTSTATUS Status;
376 PVOID Pointer;
377 };
378 ULONG_PTR Information;
379 } IO_STATUS_BLOCK, *PIO_STATUS_BLOCK;
380
381 //
382 // File Information structures for NtQueryInformationFile
383 //
384 typedef struct _FILE_BASIC_INFORMATION
385 {
386 LARGE_INTEGER CreationTime;
387 LARGE_INTEGER LastAccessTime;
388 LARGE_INTEGER LastWriteTime;
389 LARGE_INTEGER ChangeTime;
390 ULONG FileAttributes;
391 } FILE_BASIC_INFORMATION, *PFILE_BASIC_INFORMATION;
392
393 typedef struct _FILE_STANDARD_INFORMATION
394 {
395 LARGE_INTEGER AllocationSize;
396 LARGE_INTEGER EndOfFile;
397 ULONG NumberOfLinks;
398 BOOLEAN DeletePending;
399 BOOLEAN Directory;
400 } FILE_STANDARD_INFORMATION, *PFILE_STANDARD_INFORMATION;
401
402 typedef struct _FILE_STREAM_INFORMATION
403 {
404 ULONG NextEntryOffset;
405 ULONG StreamNameLength;
406 LARGE_INTEGER StreamSize;
407 LARGE_INTEGER StreamAllocationSize;
408 WCHAR StreamName[1];
409 } FILE_STREAM_INFORMATION, *PFILE_STREAM_INFORMATION;
410
411 typedef struct _FILE_NETWORK_OPEN_INFORMATION
412 {
413 LARGE_INTEGER CreationTime;
414 LARGE_INTEGER LastAccessTime;
415 LARGE_INTEGER LastWriteTime;
416 LARGE_INTEGER ChangeTime;
417 LARGE_INTEGER AllocationSize;
418 LARGE_INTEGER EndOfFile;
419 ULONG FileAttributes;
420 } FILE_NETWORK_OPEN_INFORMATION, *PFILE_NETWORK_OPEN_INFORMATION;
421
422 typedef struct _FILE_EA_INFORMATION
423 {
424 ULONG EaSize;
425 } FILE_EA_INFORMATION, *PFILE_EA_INFORMATION;
426
427 typedef struct _FILE_COMPRESSION_INFORMATION
428 {
429 LARGE_INTEGER CompressedFileSize;
430 USHORT CompressionFormat;
431 UCHAR CompressionUnitShift;
432 UCHAR ChunkShift;
433 UCHAR ClusterShift;
434 UCHAR Reserved[3];
435 } FILE_COMPRESSION_INFORMATION, *PFILE_COMPRESSION_INFORMATION;
436
437 typedef struct _FILE_POSITION_INFORMATION
438 {
439 LARGE_INTEGER CurrentByteOffset;
440 } FILE_POSITION_INFORMATION, *PFILE_POSITION_INFORMATION;
441
442 typedef struct _FILE_DISPOSITION_INFORMATION
443 {
444 BOOLEAN DeleteFile;
445 } FILE_DISPOSITION_INFORMATION, *PFILE_DISPOSITION_INFORMATION;
446
447 typedef struct _FILE_FULL_EA_INFORMATION
448 {
449 ULONG NextEntryOffset;
450 UCHAR Flags;
451 UCHAR EaNameLength;
452 USHORT EaValueLength;
453 CHAR EaName[1];
454 } FILE_FULL_EA_INFORMATION, *PFILE_FULL_EA_INFORMATION;
455
456 typedef struct _FILE_QUOTA_INFORMATION
457 {
458 ULONG NextEntryOffset;
459 ULONG SidLength;
460 LARGE_INTEGER ChangeTime;
461 LARGE_INTEGER QuotaUsed;
462 LARGE_INTEGER QuotaThreshold;
463 LARGE_INTEGER QuotaLimit;
464 SID Sid;
465 } FILE_QUOTA_INFORMATION, *PFILE_QUOTA_INFORMATION;
466
467 typedef struct _FILE_INTERNAL_INFORMATION
468 {
469 LARGE_INTEGER IndexNumber;
470 } FILE_INTERNAL_INFORMATION, *PFILE_INTERNAL_INFORMATION;
471
472 typedef struct _FILE_RENAME_INFORMATION
473 {
474 BOOLEAN ReplaceIfExists;
475 HANDLE RootDirectory;
476 ULONG FileNameLength;
477 WCHAR FileName[1];
478 } FILE_RENAME_INFORMATION, *PFILE_RENAME_INFORMATION;
479
480 typedef struct _FILE_PIPE_INFORMATION
481 {
482 ULONG ReadMode;
483 ULONG CompletionMode;
484 } FILE_PIPE_INFORMATION, *PFILE_PIPE_INFORMATION;
485
486 typedef struct _FILE_PIPE_LOCAL_INFORMATION
487 {
488 ULONG NamedPipeType;
489 ULONG NamedPipeConfiguration;
490 ULONG MaximumInstances;
491 ULONG CurrentInstances;
492 ULONG InboundQuota;
493 ULONG ReadDataAvailable;
494 ULONG OutboundQuota;
495 ULONG WriteQuotaAvailable;
496 ULONG NamedPipeState;
497 ULONG NamedPipeEnd;
498 } FILE_PIPE_LOCAL_INFORMATION, *PFILE_PIPE_LOCAL_INFORMATION;
499
500 typedef struct _FILE_PIPE_REMOTE_INFORMATION
501 {
502 LARGE_INTEGER CollectDataTime;
503 ULONG MaximumCollectionCount;
504 } FILE_PIPE_REMOTE_INFORMATION, *PFILE_PIPE_REMOTE_INFORMATION;
505
506 typedef struct _FILE_MAILSLOT_QUERY_INFORMATION
507 {
508 ULONG MaximumMessageSize;
509 ULONG MailslotQuota;
510 ULONG NextMessageSize;
511 ULONG MessagesAvailable;
512 LARGE_INTEGER ReadTimeout;
513 } FILE_MAILSLOT_QUERY_INFORMATION, *PFILE_MAILSLOT_QUERY_INFORMATION;
514
515 typedef struct _FILE_MAILSLOT_SET_INFORMATION
516 {
517 PLARGE_INTEGER ReadTimeout;
518 } FILE_MAILSLOT_SET_INFORMATION, *PFILE_MAILSLOT_SET_INFORMATION;
519
520 typedef struct _FILE_BOTH_DIR_INFORMATION
521 {
522 ULONG NextEntryOffset;
523 ULONG FileIndex;
524 LARGE_INTEGER CreationTime;
525 LARGE_INTEGER LastAccessTime;
526 LARGE_INTEGER LastWriteTime;
527 LARGE_INTEGER ChangeTime;
528 LARGE_INTEGER EndOfFile;
529 LARGE_INTEGER AllocationSize;
530 ULONG FileAttributes;
531 ULONG FileNameLength;
532 ULONG EaSize;
533 CCHAR ShortNameLength;
534 WCHAR ShortName[12];
535 WCHAR FileName[1];
536 } FILE_BOTH_DIR_INFORMATION, *PFILE_BOTH_DIR_INFORMATION;
537
538 typedef struct _FILE_COMPLETION_INFORMATION
539 {
540 HANDLE Port;
541 PVOID Key;
542 } FILE_COMPLETION_INFORMATION, *PFILE_COMPLETION_INFORMATION;
543
544 typedef struct _FILE_LINK_INFORMATION
545 {
546 BOOLEAN ReplaceIfExists;
547 HANDLE RootDirectory;
548 ULONG FileNameLength;
549 WCHAR FileName[1];
550 } FILE_LINK_INFORMATION, *PFILE_LINK_INFORMATION;
551
552 typedef struct _FILE_NAME_INFORMATION
553 {
554 ULONG FileNameLength;
555 WCHAR FileName[1];
556 } FILE_NAME_INFORMATION, *PFILE_NAME_INFORMATION;
557
558 typedef struct _FILE_ALLOCATION_INFORMATION
559 {
560 LARGE_INTEGER AllocationSize;
561 } FILE_ALLOCATION_INFORMATION, *PFILE_ALLOCATION_INFORMATION;
562
563 typedef struct _FILE_END_OF_FILE_INFORMATION
564 {
565 LARGE_INTEGER EndOfFile;
566 } FILE_END_OF_FILE_INFORMATION, *PFILE_END_OF_FILE_INFORMATION;
567
568 typedef struct _FILE_VALID_DATA_LENGTH_INFORMATION
569 {
570 LARGE_INTEGER ValidDataLength;
571 } FILE_VALID_DATA_LENGTH_INFORMATION, *PFILE_VALID_DATA_LENGTH_INFORMATION;
572
573 typedef struct _FILE_DIRECTORY_INFORMATION
574 {
575 ULONG NextEntryOffset;
576 ULONG FileIndex;
577 LARGE_INTEGER CreationTime;
578 LARGE_INTEGER LastAccessTime;
579 LARGE_INTEGER LastWriteTime;
580 LARGE_INTEGER ChangeTime;
581 LARGE_INTEGER EndOfFile;
582 LARGE_INTEGER AllocationSize;
583 ULONG FileAttributes;
584 ULONG FileNameLength;
585 WCHAR FileName[1];
586 } FILE_DIRECTORY_INFORMATION, *PFILE_DIRECTORY_INFORMATION;
587
588 typedef struct _FILE_IO_COMPLETION_INFORMATION
589 {
590 PVOID KeyContext;
591 PVOID ApcContext;
592 IO_STATUS_BLOCK IoStatusBlock;
593 } FILE_IO_COMPLETION_INFORMATION, *PFILE_IO_COMPLETION_INFORMATION;
594
595 //
596 // File System Information structures for NtQueryInformationFile
597 //
598 typedef struct _FILE_FS_DEVICE_INFORMATION
599 {
600 DEVICE_TYPE DeviceType;
601 ULONG Characteristics;
602 } FILE_FS_DEVICE_INFORMATION, *PFILE_FS_DEVICE_INFORMATION;
603
604 typedef struct _FILE_FS_ATTRIBUTE_INFORMATION
605 {
606 ULONG FileSystemAttributes;
607 ULONG MaximumComponentNameLength;
608 ULONG FileSystemNameLength;
609 WCHAR FileSystemName[1];
610 } FILE_FS_ATTRIBUTE_INFORMATION, *PFILE_FS_ATTRIBUTE_INFORMATION;
611
612 typedef struct _FILE_FS_SIZE_INFORMATION
613 {
614 LARGE_INTEGER TotalAllocationUnits;
615 LARGE_INTEGER AvailableAllocationUnits;
616 ULONG SectorsPerAllocationUnit;
617 ULONG BytesPerSector;
618 } FILE_FS_SIZE_INFORMATION, *PFILE_FS_SIZE_INFORMATION;
619
620 typedef struct _FILE_FS_FULL_SIZE_INFORMATION
621 {
622 LARGE_INTEGER TotalAllocationUnits;
623 LARGE_INTEGER CallerAvailableAllocationUnits;
624 LARGE_INTEGER ActualAvailableAllocationUnits;
625 ULONG SectorsPerAllocationUnit;
626 ULONG BytesPerSector;
627 } FILE_FS_FULL_SIZE_INFORMATION, *PFILE_FS_FULL_SIZE_INFORMATION;
628
629 typedef struct _FILE_FS_LABEL_INFORMATION
630 {
631 ULONG VolumeLabelLength;
632 WCHAR VolumeLabel[1];
633 } FILE_FS_LABEL_INFORMATION, *PFILE_FS_LABEL_INFORMATION;
634
635 typedef struct _FILE_FS_VOLUME_INFORMATION
636 {
637 LARGE_INTEGER VolumeCreationTime;
638 ULONG VolumeSerialNumber;
639 ULONG VolumeLabelLength;
640 BOOLEAN SupportsObjects;
641 WCHAR VolumeLabel[1];
642 } FILE_FS_VOLUME_INFORMATION, *PFILE_FS_VOLUME_INFORMATION;
643
644 //
645 // Pipe Structures for IOCTL_PIPE_XXX
646 //
647 typedef struct _FILE_PIPE_WAIT_FOR_BUFFER
648 {
649 LARGE_INTEGER Timeout;
650 ULONG NameLength;
651 BOOLEAN TimeoutSpecified;
652 WCHAR Name[1];
653 } FILE_PIPE_WAIT_FOR_BUFFER, *PFILE_PIPE_WAIT_FOR_BUFFER;
654
655 typedef struct _FILE_PIPE_PEEK_BUFFER
656 {
657 ULONG NamedPipeState;
658 ULONG ReadDataAvailable;
659 ULONG NumberOfMessages;
660 ULONG MessageLength;
661 CHAR Data[1];
662 } FILE_PIPE_PEEK_BUFFER, *PFILE_PIPE_PEEK_BUFFER;
663
664 //
665 // I/O Error Log Structures
666 //
667 typedef struct _IO_ERROR_LOG_PACKET
668 {
669 UCHAR MajorFunctionCode;
670 UCHAR RetryCount;
671 USHORT DumpDataSize;
672 USHORT NumberOfStrings;
673 USHORT StringOffset;
674 USHORT EventCategory;
675 NTSTATUS ErrorCode;
676 ULONG UniqueErrorValue;
677 NTSTATUS FinalStatus;
678 ULONG SequenceNumber;
679 ULONG IoControlCode;
680 LARGE_INTEGER DeviceOffset;
681 ULONG DumpData[1];
682 }IO_ERROR_LOG_PACKET, *PIO_ERROR_LOG_PACKET;
683
684 typedef struct _IO_ERROR_LOG_MESSAGE
685 {
686 USHORT Type;
687 USHORT Size;
688 USHORT DriverNameLength;
689 LARGE_INTEGER TimeStamp;
690 ULONG DriverNameOffset;
691 IO_ERROR_LOG_PACKET EntryData;
692 } IO_ERROR_LOG_MESSAGE, *PIO_ERROR_LOG_MESSAGE;
693
694 #endif
695
696 //
697 // I/O Completion Information structures
698 //
699 typedef struct _IO_COMPLETION_BASIC_INFORMATION
700 {
701 LONG Depth;
702 } IO_COMPLETION_BASIC_INFORMATION, *PIO_COMPLETION_BASIC_INFORMATION;
703
704 //
705 // Parameters for NtCreateMailslotFile/NtCreateNamedPipeFile
706 //
707 typedef struct _MAILSLOT_CREATE_PARAMETERS
708 {
709 ULONG MailslotQuota;
710 ULONG MaximumMessageSize;
711 LARGE_INTEGER ReadTimeout;
712 BOOLEAN TimeoutSpecified;
713 } MAILSLOT_CREATE_PARAMETERS, *PMAILSLOT_CREATE_PARAMETERS;
714
715 typedef struct _NAMED_PIPE_CREATE_PARAMETERS
716 {
717 ULONG NamedPipeType;
718 ULONG ReadMode;
719 ULONG CompletionMode;
720 ULONG MaximumInstances;
721 ULONG InboundQuota;
722 ULONG OutboundQuota;
723 LARGE_INTEGER DefaultTimeout;
724 BOOLEAN TimeoutSpecified;
725 } NAMED_PIPE_CREATE_PARAMETERS, *PNAMED_PIPE_CREATE_PARAMETERS;
726
727 #ifndef NTOS_MODE_USER
728
729 //
730 // I/O Timer Object
731 //
732 typedef struct _IO_TIMER
733 {
734 USHORT Type;
735 USHORT TimerEnabled;
736 LIST_ENTRY IoTimerList;
737 PIO_TIMER_ROUTINE TimerRoutine;
738 PVOID Context;
739 PDEVICE_OBJECT DeviceObject;
740 } IO_TIMER;
741
742 //
743 // Driver Extension
744 //
745 typedef struct _IO_CLIENT_EXTENSION
746 {
747 struct _IO_CLIENT_EXTENSION *NextExtension;
748 PVOID ClientIdentificationAddress;
749 } IO_CLIENT_EXTENSION, *PIO_CLIENT_EXTENSION;
750
751 //
752 // Device Node
753 //
754 typedef struct _DEVICE_NODE
755 {
756 struct _DEVICE_NODE *Sibling;
757 struct _DEVICE_NODE *Child;
758 struct _DEVICE_NODE *Parent;
759 struct _DEVICE_NODE *LastChild;
760 ULONG Level;
761 struct _PO_DEVICE_NOTIFY *Notify;
762 PO_IRP_MANAGER PoIrpManager;
763 PNP_DEVNODE_STATE State;
764 PNP_DEVNODE_STATE PreviousState;
765 PNP_DEVNODE_STATE StateHistory[20];
766 ULONG StateHistoryEntry;
767 NTSTATUS CompletionStatus;
768 PIRP PendingIrp;
769 ULONG Flags;
770 ULONG UserFlags;
771 ULONG Problem;
772 PDEVICE_OBJECT PhysicalDeviceObject;
773 PCM_RESOURCE_LIST ResourceList;
774 PCM_RESOURCE_LIST ResourceListTranslated;
775 UNICODE_STRING InstancePath;
776 UNICODE_STRING ServiceName;
777 PDEVICE_OBJECT DuplicatePDO;
778 PIO_RESOURCE_REQUIREMENTS_LIST ResourceRequirements;
779 INTERFACE_TYPE InterfaceType;
780 ULONG BusNumber;
781 INTERFACE_TYPE ChildInterfaceType;
782 ULONG ChildBusNumber;
783 USHORT ChildBusTypeIndex;
784 UCHAR RemovalPolicy;
785 UCHAR HardwareRemovalPolicy;
786 LIST_ENTRY TargetDeviceNotify;
787 LIST_ENTRY DeviceArbiterList;
788 LIST_ENTRY DeviceTranslatorList;
789 USHORT NoTranslatorMask;
790 USHORT QueryTranslatorMask;
791 USHORT NoArbiterMask;
792 USHORT QueryArbiterMask;
793 union
794 {
795 struct _DEVICE_NODE *LegacyDeviceNode;
796 PDEVICE_RELATIONS PendingDeviceRelations;
797 } OverUsed1;
798 union
799 {
800 struct _DEVICE_NODE *NextResourceDeviceNode;
801 } OverUsed2;
802 PCM_RESOURCE_LIST BootResources;
803 #if (NTDDI_VERSION >= NTDDI_LONGHORN)
804 PCM_RESOURCE_LIST BootResourcesTranslated;
805 #endif
806 ULONG CapabilityFlags;
807 struct
808 {
809 PROFILE_STATUS DockStatus;
810 LIST_ENTRY ListEntry;
811 WCHAR *SerialNumber;
812 } DockInfo;
813 ULONG DisableableDepends;
814 LIST_ENTRY PendedSetInterfaceState;
815 LIST_ENTRY LegacyBusListEntry;
816 ULONG DriverUnloadRetryCount;
817 struct _DEVICE_NODE *PreviousParent;
818 ULONG DeletedChidren;
819 #if (NTDDI_VERSION >= NTDDI_LONGHORN)
820 ULONG NumaNodeIndex;
821 #endif
822 } DEVICE_NODE, *PDEVICE_NODE;
823
824 //
825 // Resource Aribtrer Entry
826 //
827 typedef struct _PI_RESOURCE_ARBITER_ENTRY
828 {
829 LIST_ENTRY DeviceArbiterList;
830 UCHAR ResourceType;
831 PARBITER_INTERFACE ArbiterInterface;
832 ULONG Level;
833 LIST_ENTRY ResourceList;
834 LIST_ENTRY BestResourceList;
835 LIST_ENTRY BestConfig;
836 LIST_ENTRY ActiveArbiterList;
837 UCHAR State;
838 UCHAR ResourcesChanged;
839 } PI_RESOURCE_ARBITER_ENTRY, *PPI_RESOURCE_ARBITER_ENTRY;
840
841 //
842 // Extended Device Object Extension Structure
843 //
844 typedef struct _EXTENDED_DEVOBJ_EXTENSION
845 {
846 CSHORT Type;
847 USHORT Size;
848 PDEVICE_OBJECT DeviceObject;
849 ULONG PowerFlags;
850 struct DEVICE_OBJECT_POWER_EXTENSION *Dope;
851 ULONG ExtensionFlags;
852 struct _DEVICE_NODE *DeviceNode;
853 PDEVICE_OBJECT AttachedTo;
854 LONG StartIoCount;
855 LONG StartIoKey;
856 ULONG StartIoFlags;
857 struct _VPB *Vpb;
858 } EXTENDED_DEVOBJ_EXTENSION, *PEXTENDED_DEVOBJ_EXTENSION;
859
860 //
861 // Extended Driver Object Extension Structure
862 //
863 typedef struct _EXTENDED_DRIVER_EXTENSION
864 {
865 struct _DRIVER_OBJECT *DriverObject;
866 PDRIVER_ADD_DEVICE AddDevice;
867 ULONG Count;
868 UNICODE_STRING ServiceKeyName;
869 PIO_CLIENT_EXTENSION ClientDriverExtension;
870 PFS_FILTER_CALLBACKS FsFilterCallbacks;
871 } EXTENDED_DRIVER_EXTENSION, *PEXTENDED_DRIVER_EXTENSION;
872
873 //
874 // Extended I/O Stack Location Structure
875 //
876 #if !defined(_ALPHA_)
877 #include <pshpack4.h>
878 #endif
879 typedef struct _EXTENDED_IO_STACK_LOCATION
880 {
881 UCHAR MajorFunction;
882 UCHAR MinorFunction;
883 UCHAR Flags;
884 UCHAR Control;
885 union
886 {
887 struct
888 {
889 PIO_SECURITY_CONTEXT SecurityContext;
890 ULONG Options;
891 USHORT FileAttributes;
892 USHORT ShareAccess;
893 ULONG EaLength;
894 } Create;
895 struct
896 {
897 PIO_SECURITY_CONTEXT SecurityContext;
898 ULONG Options;
899 USHORT Reserved;
900 USHORT ShareAccess;
901 struct _NAMED_PIPE_CREATE_PARAMETERS *Parameters;
902 } CreatePipe;
903 struct
904 {
905 PIO_SECURITY_CONTEXT SecurityContext;
906 ULONG Options;
907 USHORT Reserved;
908 USHORT ShareAccess;
909 struct _MAILSLOT_CREATE_PARAMETERS *Parameters;
910 } CreateMailslot;
911 struct
912 {
913 ULONG Length;
914 ULONG Key;
915 LARGE_INTEGER ByteOffset;
916 } Read;
917 struct
918 {
919 ULONG Length;
920 ULONG Key;
921 LARGE_INTEGER ByteOffset;
922 } Write;
923 struct
924 {
925 ULONG Length;
926 PUNICODE_STRING FileName;
927 FILE_INFORMATION_CLASS FileInformationClass;
928 ULONG FileIndex;
929 } QueryDirectory;
930 struct
931 {
932 ULONG Length;
933 ULONG CompletionFilter;
934 } NotifyDirectory;
935 struct
936 {
937 ULONG Length;
938 FILE_INFORMATION_CLASS FileInformationClass;
939 } QueryFile;
940 struct
941 {
942 ULONG Length;
943 FILE_INFORMATION_CLASS FileInformationClass;
944 PFILE_OBJECT FileObject;
945 union
946 {
947 struct
948 {
949 BOOLEAN ReplaceIfExists;
950 BOOLEAN AdvanceOnly;
951 };
952 ULONG ClusterCount;
953 HANDLE DeleteHandle;
954 };
955 } SetFile;
956 struct
957 {
958 ULONG Length;
959 PVOID EaList;
960 ULONG EaListLength;
961 ULONG EaIndex;
962 } QueryEa;
963 struct
964 {
965 ULONG Length;
966 } SetEa;
967 struct
968 {
969 ULONG Length;
970 FS_INFORMATION_CLASS FsInformationClass;
971 } QueryVolume;
972 struct
973 {
974 ULONG Length;
975 FS_INFORMATION_CLASS FsInformationClass;
976 } SetVolume;
977 struct
978 {
979 ULONG OutputBufferLength;
980 ULONG InputBufferLength;
981 ULONG FsControlCode;
982 PVOID Type3InputBuffer;
983 } FileSystemControl;
984 struct
985 {
986 PLARGE_INTEGER Length;
987 ULONG Key;
988 LARGE_INTEGER ByteOffset;
989 } LockControl;
990 struct
991 {
992 ULONG OutputBufferLength;
993 ULONG InputBufferLength;
994 ULONG IoControlCode;
995 PVOID Type3InputBuffer;
996 } DeviceIoControl;
997 struct
998 {
999 SECURITY_INFORMATION SecurityInformation;
1000 ULONG POINTER_ALIGNMENT Length;
1001 } QuerySecurity;
1002 struct
1003 {
1004 SECURITY_INFORMATION SecurityInformation;
1005 PSECURITY_DESCRIPTOR SecurityDescriptor;
1006 } SetSecurity;
1007 struct
1008 {
1009 PVPB Vpb;
1010 PDEVICE_OBJECT DeviceObject;
1011 } MountVolume;
1012 struct
1013 {
1014 PVPB Vpb;
1015 PDEVICE_OBJECT DeviceObject;
1016 } VerifyVolume;
1017 struct
1018 {
1019 struct _SCSI_REQUEST_BLOCK *Srb;
1020 } Scsi;
1021 struct
1022 {
1023 ULONG Length;
1024 PSID StartSid;
1025 struct _FILE_GET_QUOTA_INFORMATION *SidList;
1026 ULONG SidListLength;
1027 } QueryQuota;
1028 struct
1029 {
1030 ULONG Length;
1031 } SetQuota;
1032 struct
1033 {
1034 DEVICE_RELATION_TYPE Type;
1035 } QueryDeviceRelations;
1036 struct
1037 {
1038 CONST GUID *InterfaceType;
1039 USHORT Size;
1040 USHORT Version;
1041 PINTERFACE Interface;
1042 PVOID InterfaceSpecificData;
1043 } QueryInterface;
1044 struct
1045 {
1046 PDEVICE_CAPABILITIES Capabilities;
1047 } DeviceCapabilities;
1048 struct
1049 {
1050 PIO_RESOURCE_REQUIREMENTS_LIST IoResourceRequirementList;
1051 } FilterResourceRequirements;
1052 struct
1053 {
1054 ULONG WhichSpace;
1055 PVOID Buffer;
1056 ULONG Offset;
1057 ULONG Length;
1058 } ReadWriteConfig;
1059 struct
1060 {
1061 BOOLEAN Lock;
1062 } SetLock;
1063 struct
1064 {
1065 BUS_QUERY_ID_TYPE IdType;
1066 } QueryId;
1067 struct
1068 {
1069 DEVICE_TEXT_TYPE DeviceTextType;
1070 LCID LocaleId;
1071 } QueryDeviceText;
1072 struct
1073 {
1074 BOOLEAN InPath;
1075 BOOLEAN Reserved[3];
1076 DEVICE_USAGE_NOTIFICATION_TYPE Type;
1077 } UsageNotification;
1078 struct
1079 {
1080 SYSTEM_POWER_STATE PowerState;
1081 } WaitWake;
1082 struct
1083 {
1084 PPOWER_SEQUENCE PowerSequence;
1085 } PowerSequence;
1086 struct
1087 {
1088 ULONG SystemContext;
1089 POWER_STATE_TYPE Type;
1090 POWER_STATE State;
1091 POWER_ACTION ShutdownType;
1092 } Power;
1093 struct
1094 {
1095 PCM_RESOURCE_LIST AllocatedResources;
1096 PCM_RESOURCE_LIST AllocatedResourcesTranslated;
1097 } StartDevice;
1098 struct
1099 {
1100 ULONG_PTR ProviderId;
1101 PVOID DataPath;
1102 ULONG BufferSize;
1103 PVOID Buffer;
1104 } WMI;
1105 struct
1106 {
1107 PVOID Argument1;
1108 PVOID Argument2;
1109 PVOID Argument3;
1110 PVOID Argument4;
1111 } Others;
1112 } Parameters;
1113 PDEVICE_OBJECT DeviceObject;
1114 PFILE_OBJECT FileObject;
1115 PIO_COMPLETION_ROUTINE CompletionRoutine;
1116 PVOID Context;
1117 } EXTENDED_IO_STACK_LOCATION, *PEXTENDED_IO_STACK_LOCATION;
1118 #if !defined(_ALPHA_)
1119 #include <poppack.h>
1120 #endif
1121 #endif
1122
1123 //
1124 // Firmware Boot File Path
1125 //
1126 typedef struct _FILE_PATH
1127 {
1128 ULONG Version;
1129 ULONG Length;
1130 ULONG Type;
1131 CHAR FilePath[1];
1132 } FILE_PATH, *PFILE_PATH;
1133
1134 //
1135 // Firmware Boot Options
1136 //
1137 typedef struct _BOOT_OPTIONS
1138 {
1139 ULONG Version;
1140 ULONG Length;
1141 ULONG Timeout;
1142 ULONG CurrentBootEntryId;
1143 ULONG NextBootEntryId;
1144 WCHAR HeadlessRedirection[1];
1145 } BOOT_OPTIONS, *PBOOT_OPTIONS;
1146
1147 //
1148 // Firmware Boot Entry
1149 //
1150 typedef struct _BOOT_ENTRY
1151 {
1152 ULONG Version;
1153 ULONG Length;
1154 ULONG Id;
1155 ULONG Attributes;
1156 ULONG FriendlyNameOffset;
1157 ULONG BootFilePathOffset;
1158 ULONG OsOptionsLength;
1159 CHAR OsOptions[1];
1160 } BOOT_ENTRY, *PBOOT_ENTRY;
1161
1162 //
1163 // Firmware Driver Entry
1164 //
1165 typedef struct _EFI_DRIVER_ENTRY
1166 {
1167 ULONG Version;
1168 ULONG Length;
1169 ULONG Id;
1170 ULONG Attributes;
1171 ULONG FriendlyNameOffset;
1172 ULONG DriverFilePathOffset;
1173 } EFI_DRIVER_ENTRY, *PEFI_DRIVER_ENTRY;
1174
1175 #ifdef NTOS_MODE_USER
1176
1177 //
1178 // APC Callback for NtCreateFile
1179 //
1180 typedef VOID
1181 (NTAPI *PIO_APC_ROUTINE)(
1182 IN PVOID ApcContext,
1183 IN PIO_STATUS_BLOCK IoStatusBlock,
1184 IN ULONG Reserved);
1185
1186 //
1187 // Mailslot IOCTL Codes
1188 //
1189 #define FSCTL_MAILSLOT_PEEK \
1190 CTL_CODE(FILE_DEVICE_MAILSLOT, 0, METHOD_NEITHER, FILE_READ_DATA)
1191
1192 //
1193 // Pipe IOCTL Codes
1194 //
1195 #define FSCTL_PIPE_ASSIGN_EVENT \
1196 CTL_CODE(FILE_DEVICE_NAMED_PIPE, 0, METHOD_BUFFERED, FILE_ANY_ACCESS)
1197 #define FSCTL_PIPE_DISCONNECT \
1198 CTL_CODE(FILE_DEVICE_NAMED_PIPE, 1, METHOD_BUFFERED, FILE_ANY_ACCESS)
1199 #define FSCTL_PIPE_LISTEN \
1200 CTL_CODE(FILE_DEVICE_NAMED_PIPE, 2, METHOD_BUFFERED, FILE_ANY_ACCESS)
1201 #define FSCTL_PIPE_PEEK \
1202 CTL_CODE(FILE_DEVICE_NAMED_PIPE, 3, METHOD_BUFFERED, FILE_READ_DATA)
1203 #define FSCTL_PIPE_QUERY_EVENT \
1204 CTL_CODE(FILE_DEVICE_NAMED_PIPE, 4, METHOD_BUFFERED, FILE_ANY_ACCESS)
1205 #define FSCTL_PIPE_TRANSCEIVE \
1206 CTL_CODE(FILE_DEVICE_NAMED_PIPE, 5, METHOD_NEITHER, FILE_READ_DATA | FILE_WRITE_DATA)
1207 #define FSCTL_PIPE_WAIT \
1208 CTL_CODE(FILE_DEVICE_NAMED_PIPE, 6, METHOD_BUFFERED, FILE_ANY_ACCESS)
1209 #define FSCTL_PIPE_IMPERSONATE \
1210 CTL_CODE(FILE_DEVICE_NAMED_PIPE, 7, METHOD_BUFFERED, FILE_ANY_ACCESS)
1211 #define FSCTL_PIPE_SET_CLIENT_PROCESS \
1212 CTL_CODE(FILE_DEVICE_NAMED_PIPE, 8, METHOD_BUFFERED, FILE_ANY_ACCESS)
1213 #define FSCTL_PIPE_QUERY_CLIENT_PROCESS \
1214 CTL_CODE(FILE_DEVICE_NAMED_PIPE, 9, METHOD_BUFFERED, FILE_ANY_ACCESS)
1215 #define FSCTL_PIPE_INTERNAL_READ \
1216 CTL_CODE(FILE_DEVICE_NAMED_PIPE, 2045, METHOD_BUFFERED, FILE_READ_DATA)
1217 #define FSCTL_PIPE_INTERNAL_WRITE \
1218 CTL_CODE(FILE_DEVICE_NAMED_PIPE, 2046, METHOD_BUFFERED, FILE_WRITE_DATA)
1219 #define FSCTL_PIPE_INTERNAL_TRANSCEIVE \
1220 CTL_CODE(FILE_DEVICE_NAMED_PIPE, 2047, METHOD_NEITHER, FILE_READ_DATA | FILE_WRITE_DATA)
1221 #define FSCTL_PIPE_INTERNAL_READ_OVFLOW \
1222 CTL_CODE(FILE_DEVICE_NAMED_PIPE, 2048, METHOD_BUFFERED, FILE_READ_DATA)
1223
1224 //
1225 // Tape IOCTL Codes
1226 //
1227 #define IOCTL_TAPE_ERASE \
1228 CTL_CODE(FILE_DEVICE_TAPE, 0, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
1229 #define IOCTL_TAPE_PREPARE \
1230 CTL_CODE(FILE_DEVICE_TAPE, 1, METHOD_BUFFERED, FILE_READ_ACCESS)
1231 #define IOCTL_TAPE_WRITE_MARKS \
1232 CTL_CODE(FILE_DEVICE_TAPE, 2, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
1233 #define IOCTL_TAPE_GET_POSITION \
1234 CTL_CODE(FILE_DEVICE_TAPE, 3, METHOD_BUFFERED, FILE_READ_ACCESS)
1235 #define IOCTL_TAPE_SET_POSITION \
1236 CTL_CODE(FILE_DEVICE_TAPE, 4, METHOD_BUFFERED, FILE_READ_ACCESS)
1237 #define IOCTL_TAPE_GET_DRIVE_PARAMS \
1238 CTL_CODE(FILE_DEVICE_TAPE, 5, METHOD_BUFFERED, FILE_READ_ACCESS)
1239 #define IOCTL_TAPE_SET_DRIVE_PARAMS \
1240 CTL_CODE(FILE_DEVICE_TAPE, 6, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
1241 #define IOCTL_TAPE_GET_MEDIA_PARAMS \
1242 CTL_CODE(FILE_DEVICE_TAPE, 7, METHOD_BUFFERED, FILE_READ_ACCESS)
1243 #define IOCTL_TAPE_SET_MEDIA_PARAMS \
1244 CTL_CODE(FILE_DEVICE_TAPE, 8, METHOD_BUFFERED, FILE_READ_ACCESS)
1245 #define IOCTL_TAPE_GET_STATUS \
1246 CTL_CODE(FILE_DEVICE_TAPE, 9, METHOD_BUFFERED, FILE_READ_ACCESS)
1247 #define IOCTL_TAPE_CREATE_PARTITION \
1248 CTL_CODE(FILE_DEVICE_TAPE, 10, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
1249
1250 #endif // NTOS_MODE_USER
1251
1252 #endif