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