Added .Type and .Size attributes to the IRP object: so far nothing
[reactos.git] / reactos / include / ddk / iofuncs.h
1 /* $Id: iofuncs.h,v 1.7 2000/03/06 01:02:30 ea Exp $ */
2 /* IO MANAGER ***************************************************************/
3
4 BOOLEAN
5 IoRaiseInformationalHardError (
6 NTSTATUS ErrorStatus,
7 PUNICODE_STRING String,
8 PKTHREAD Thread
9 );
10
11
12 /*
13 * FUNCTION: Registers the driver with WMI
14 * ARGUMENTS:
15 * DeviceObject = Device to register
16 * Action = Action to take
17 * RETURNS: Status (?)
18 */
19 //NTSTATUS IoWMIRegistrationControl(DeviceObject, WMIREGACTION Action);
20
21 /*
22 * FUNCTION: Synchronizes cancelable-state transistions for IRPs in a
23 * multiprocessor-safe way
24 * ARGUMENTS:
25 * Irpl = Variable to store the current IRQ level
26 */
27 VOID
28 IoAcquireCancelSpinLock (
29 PKIRQL Irpl
30 );
31
32 typedef
33 IO_ALLOCATION_ACTION
34 (*PDRIVER_CONTROL) (
35 PDEVICE_OBJECT DeviceObject,
36 PIRP irp,
37 PVOID MapRegisterBase,
38 PVOID Context
39 );
40
41 /*
42 * FUNCTION: Allocates an adaptor object for a DMA operation on the target
43 * device
44 * ARGUMENTS:
45 * Adaptor = Adapter channel or busmaster adapter to be allocated
46 * DeviceObject = Target device for DMA
47 * NumberOfMapRegisters = Number of map registers
48 * ExecutionRoutine = Routine to be called when the adaptor is
49 * available
50 * Context = driver defined contex that will be passed to the
51 * execution routine
52 * RETURNS: Success or failure code
53 */
54 NTSTATUS
55 IoAllocateAdapterChannel (
56 PADAPTER_OBJECT AdaperObject,
57 PDEVICE_OBJECT DeviceObject,
58 ULONG NumberOfMapRegisters,
59 PDRIVER_CONTROL ExecutionRoutine,
60 PVOID Context
61 );
62
63 /*
64 * FUNCTION: Sets up a call to a driver supplied controller object as
65 * soon as it is available
66 * ARGUMENTS:
67 * ControllerObject = Driver created controller object
68 * DeviceObject = target device
69 * ExecutionObject = Routine to be called
70 * Context = Driver determined context to be based to the routine
71 */
72 VOID
73 IoAllocateController (
74 PCONTROLLER_OBJECT ControllerObject,
75 PDEVICE_OBJECT DeviceObject,
76 PDRIVER_CONTROL ExecutionRoutine,
77 PVOID Context
78 );
79
80 /*
81 * FUNCTION: Allocates an error log packet
82 * ARGUMENTS:
83 * IoObject = Object which found the error
84 * EntrySize = Size in bytes of the packet to be allocated
85 * RETURNS: On success a pointer to the allocated packet
86 * On failure returns NULL
87 */
88 PVOID
89 IoAllocateErrorLogEntry (
90 PVOID IoObject,
91 UCHAR EntrySize
92 );
93
94 /*
95 * FUNCTION: Allocates an IRP
96 * ARGUMENTS:
97 * StackSize = number of stack locations to allocate
98 * ChargeQuota = Who knows
99 * RETURNS: On success the allocated IRP
100 * On failure NULL
101 */
102 PIRP
103 STDCALL
104 IoAllocateIrp (
105 CCHAR StackSize,
106 BOOLEAN ChargeQuota
107 );
108
109 /*
110 * FUNCTION: Allocates an MDL large enough to map the supplied buffer
111 * ARGUMENTS:
112 * VirtualAddress = base virtual address of the buffer to be mapped
113 * Length = length of the buffer to be mapped
114 * SecondaryBuffer = Whether the buffer is primary or secondary
115 * ChargeQuota = Charge non-paged pool quota to current thread
116 * Irp = Optional irp to be associated with the MDL
117 * RETURNS: On the success the allocated MDL
118 * On failure NULL
119 */
120 PMDL
121 IoAllocateMdl (
122 PVOID VirtualAddress,
123 ULONG Length,
124 BOOLEAN SecondaryBuffer,
125 BOOLEAN ChargeQuota,
126 PIRP Irp
127 );
128
129 /*
130 * FUNCTION: Creates a symbolic link between the ARC name of a physical
131 * device and the name of the corresponding device object
132 * ARGUMENTS:
133 * ArcName = ARC name of the device
134 * DeviceName = Name of the device object
135 */
136 VOID
137 IoAssignArcName (
138 PUNICODE_STRING ArcName,
139 PUNICODE_STRING DeviceName
140 );
141
142 enum
143 {
144 IO_NO_INCREMENT,
145 };
146
147 /*
148 * FUNCTION: Takes a list of requested hardware resources and allocates them
149 * ARGUMENTS:
150 * RegisterPath =
151 * DriverClassName =
152 * DriverObject = Driver object passed to the DriverEntry routine
153 * DeviceObject =
154 * RequestedResources = List of resources
155 * RETURNS:
156 */
157 NTSTATUS
158 IoAssignResources (
159 PUNICODE_STRING RegistryPath,
160 PUNICODE_STRING DriverClassName,
161 PDRIVER_OBJECT DriverObject,
162 PDEVICE_OBJECT DeviceObject,
163 PIO_RESOURCE_REQUIREMENTS_LIST RequestedResources,
164 PCM_RESOURCE_LIST * AllocatedResources
165 );
166
167 /*
168 * FUNCTION: Attaches the callers device object to a named target device
169 * ARGUMENTS:
170 * SourceDevice = caller's device
171 * TargetDevice = Name of the target device
172 * AttachedDevice = Caller allocated storage. On return contains
173 * a pointer to the target device
174 * RETURNS: Success or failure code
175 */
176 NTSTATUS
177 IoAttachDevice (
178 PDEVICE_OBJECT SourceDevice,
179 PUNICODE_STRING TargetDevice,
180 PDEVICE_OBJECT * AttachedDevice
181 );
182
183 /*
184 * FUNCTION: Obsolete
185 * ARGUMENTS:
186 * SourceDevice = device to attach
187 * TargetDevice = device to be attached to
188 * RETURNS: Success or failure code
189 */
190 NTSTATUS
191 IoAttachDeviceByPointer (
192 PDEVICE_OBJECT SourceDevice,
193 PDEVICE_OBJECT TargetDevice
194 );
195
196 /*
197 * FUNCTION: Attaches the callers device to the highest device in the chain
198 * ARGUMENTS:
199 * SourceDevice = caller's device
200 * TargetDevice = Device to attach
201 * RETURNS: On success the previously highest device
202 * On failure NULL
203 */
204 PDEVICE_OBJECT
205 IoAttachDeviceToDeviceStack (
206 PDEVICE_OBJECT SourceDevice,
207 PDEVICE_OBJECT TargetDevice
208 );
209
210 /*
211 * FUNCTION: Builds a irp to be sent to lower level drivers
212 * ARGUMENTS:
213 * MajorFunction = Major function code to be set in the IRP
214 * DeviceObject = Next lower device object
215 * Buffer = Buffer (only required for some major function codes)
216 * Length = Length in bytes of the buffer
217 * StartingOffset = Starting offset on the target device
218 * IoStatusBlock = Storage for status about the operation (optional)
219 * RETURNS: On success the IRP allocated
220 * On failure NULL
221 */
222 PIRP
223 IoBuildAsynchronousFsdRequest (
224 ULONG MajorFunction,
225 PDEVICE_OBJECT DeviceObject,
226 PVOID Buffer,
227 ULONG Length,
228 PLARGE_INTEGER StartingOffset,
229 PIO_STATUS_BLOCK IoStatusBlock
230 );
231
232 /*
233 * FUNCTION: Allocates and sets up an IRP for a device control request
234 * ARGUMENTS:
235 * IoControlCode = Type of request
236 * DeviceObject = Target device
237 * InputBuffer = Optional input buffer to the driver
238 * InputBufferLength = Length of the input buffer
239 * OutputBuffer = Optional output buffer
240 * OutputBufferLength = Length of the output buffer
241 * InternalDeviceIoControl = TRUE if the request is internal
242 * Event = Initialized event for the caller to wait for the request
243 * to be completed
244 * IoStatusBlock = I/O status block to be set when the request is
245 * completed
246 * RETURNS: Returns the IRP created
247 */
248 PIRP
249 IoBuildDeviceIoControlRequest (
250 ULONG IoControlCode,
251 PDEVICE_OBJECT DeviceObject,
252 PVOID InputBuffer,
253 ULONG InputBufferLength,
254 PVOID OutputBuffer,
255 ULONG OutputBufferLength,
256 BOOLEAN InternalDeviceIoControl,
257 PKEVENT Event,
258 PIO_STATUS_BLOCK IoStatusBlock
259 );
260
261
262 VOID
263 IoBuildPartialMdl (
264 PMDL SourceMdl,
265 PMDL TargetMdl,
266 PVOID VirtualAddress,
267 ULONG Length
268 );
269
270 PIRP
271 IoBuildSynchronousFsdRequest (
272 ULONG MajorFunction,
273 PDEVICE_OBJECT DeviceObject,
274 PVOID Buffer,
275 ULONG Length,
276 PLARGE_INTEGER StartingOffset,
277 PKEVENT Event,
278 PIO_STATUS_BLOCK IoStatusBlock
279 );
280
281 /*
282 * FUNCTION: Sends an irp to the next lower driver
283 */
284 NTSTATUS
285 FASTCALL
286 IofCallDriver (
287 PDEVICE_OBJECT DeviceObject,
288 PIRP Irp
289 );
290 NTSTATUS
291 STDCALL
292 IoCallDriver (
293 PDEVICE_OBJECT DeviceObject,
294 PIRP Irp
295 );
296 BOOLEAN
297 IoCancelIrp (
298 PIRP Irp
299 );
300
301 NTSTATUS
302 IoCheckShareAccess (
303 ACCESS_MASK DesiredAccess,
304 ULONG DesiredShareAccess,
305 PFILE_OBJECT FileObject,
306 PSHARE_ACCESS ShareAccess,
307 BOOLEAN Update
308 );
309
310 /*
311 * FUNCTION: Indicates the caller has finished all processing for a given
312 * I/O request and is returning the given IRP to the I/O manager
313 * ARGUMENTS:
314 * Irp = Irp to be cancelled
315 * PriorityBoost = Increment by which to boost the priority of the
316 * thread making the request
317 */
318 VOID
319 FASTCALL
320 IofCompleteRequest (
321 PIRP Irp,
322 CCHAR PriorityBoost
323 );
324 VOID
325 STDCALL
326 IoCompleteRequest (
327 PIRP Irp,
328 CCHAR PriorityBoost
329 );
330 NTSTATUS
331 IoConnectInterrupt (
332 PKINTERRUPT * InterruptObject,
333 PKSERVICE_ROUTINE ServiceRoutine,
334 PVOID ServiceContext,
335 PKSPIN_LOCK SpinLock,
336 ULONG Vector,
337 KIRQL Irql,
338 KIRQL SynchronizeIrql,
339 KINTERRUPT_MODE InterruptMode,
340 BOOLEAN ShareVector,
341 KAFFINITY ProcessorEnableMask,
342 BOOLEAN FloatingSave
343 );
344
345 PCONTROLLER_OBJECT
346 IoCreateController (
347 ULONG Size
348 );
349
350 /*
351 * FUNCTION: Allocates memory for and intializes a device object for use for
352 * a driver
353 * ARGUMENTS:
354 * DriverObject : Driver object passed by iomgr when the driver was
355 * loaded
356 * DeviceExtensionSize : Number of bytes for the device extension
357 * DeviceName : Unicode name of device
358 * DeviceType : Device type
359 * DeviceCharacteristics : Bit mask of device characteristics
360 * Exclusive : True if only one thread can access the device at a
361 * time
362 * RETURNS:
363 * Success or failure
364 * DeviceObject : Contains a pointer to allocated device object
365 * if the call succeeded
366 * NOTES: See the DDK documentation for more information
367 */
368 NTSTATUS
369 IoCreateDevice (
370 PDRIVER_OBJECT DriverObject,
371 ULONG DeviceExtensionSize,
372 PUNICODE_STRING DeviceName,
373 DEVICE_TYPE DeviceType,
374 ULONG DeviceCharacteristics,
375 BOOLEAN Exclusive,
376 PDEVICE_OBJECT * DeviceObject
377 );
378
379 NTSTATUS
380 STDCALL
381 IoCreateFile (
382 OUT PHANDLE FileHandle,
383 IN ACCESS_MASK DesiredAccess,
384 IN POBJECT_ATTRIBUTES ObjectAttributes,
385 OUT PIO_STATUS_BLOCK IoStatusBlock,
386 IN PLARGE_INTEGER AllocationSize OPTIONAL,
387 IN ULONG FileAttributes,
388 IN ULONG ShareAccess,
389 IN ULONG CreateDisposition,
390 IN ULONG CreateOptions,
391 IN PVOID EaBuffer OPTIONAL,
392 IN ULONG EaLength,
393 IN CREATE_FILE_TYPE CreateFileType,
394 IN ULONG ExtraCreateParameters,
395 IN ULONG Options
396 );
397 PKEVENT
398 IoCreateNotificationEvent (
399 PUNICODE_STRING EventName,
400 PHANDLE EventHandle
401 );
402
403 NTSTATUS
404 STDCALL
405 IoCreateSymbolicLink (
406 PUNICODE_STRING SymbolicLinkName,
407 PUNICODE_STRING DeviceName
408 );
409
410 PKEVENT
411 IoCreateSynchronizationEvent (
412 PUNICODE_STRING EventName,
413 PHANDLE EventHandle
414 );
415
416 NTSTATUS
417 STDCALL
418 IoCreateUnprotectedSymbolicLink (
419 PUNICODE_STRING SymbolicLinkName,
420 PUNICODE_STRING DeviceName
421 );
422
423
424 VOID
425 IoDeassignArcName (
426 PUNICODE_STRING ArcName
427 );
428
429 VOID
430 IoDeleteController (
431 PCONTROLLER_OBJECT ControllerObject
432 );
433
434 VOID
435 IoDeleteDevice (
436 PDEVICE_OBJECT DeviceObject
437 );
438
439 NTSTATUS
440 STDCALL
441 IoDeleteSymbolicLink (
442 PUNICODE_STRING SymbolicLinkName
443 );
444
445 VOID
446 IoDetachDevice (
447 PDEVICE_OBJECT TargetDevice
448 );
449
450 VOID
451 IoDisconnectInterrupt (
452 PKINTERRUPT InterruptObject
453 );
454
455 BOOLEAN
456 IoFlushAdapterBuffers (
457 PADAPTER_OBJECT AdapterObject,
458 PMDL Mdl,
459 PVOID MapRegisterBase,
460 PVOID CurrentVa,
461 ULONG Length,
462 BOOLEAN WriteToDevice
463 );
464
465 VOID
466 IoFreeAdapterChannel (
467 PADAPTER_OBJECT AdapterObject
468 );
469
470 VOID
471 IoFreeController (
472 PCONTROLLER_OBJECT ControllerObject
473 );
474 VOID
475 STDCALL
476 IoFreeIrp (
477 PIRP Irp
478 );
479 VOID
480 IoFreeMapRegisters (
481 PADAPTER_OBJECT AdapterObject,
482 PVOID MapRegisterBase,
483 ULONG NumberOfMapRegisters
484 );
485
486 VOID
487 IoFreeMdl (
488 PMDL Mdl
489 );
490 PDEVICE_OBJECT
491 STDCALL
492 IoGetBaseFileSystemDeviceObject (
493 IN PFILE_OBJECT FileObject
494 );
495 PCONFIGURATION_INFORMATION
496 IoGetConfigurationInformation (VOID);
497
498
499 /*
500 * FUNCTION: Returns a pointer to the callers stack location in the irp
501 */
502 PIO_STACK_LOCATION
503 IoGetCurrentIrpStackLocation (
504 IRP * irp
505 );
506
507 struct _EPROCESS *
508 IoGetCurrentProcess (VOID);
509
510 NTSTATUS
511 IoGetDeviceObjectPointer (
512 PUNICODE_STRING ObjectName,
513 ACCESS_MASK DesiredAccess,
514 PFILE_OBJECT * FileObject,
515 PDEVICE_OBJECT * DeviceObject
516 );
517 PDEVICE_OBJECT
518 STDCALL
519 IoGetDeviceToVerify (
520 PETHREAD Thread
521 );
522 PGENERIC_MAPPING
523 IoGetFileObjectGenericMapping (VOID);
524
525 ULONG
526 IoGetFunctionCodeFromCtlCode (
527 ULONG ControlCode
528 );
529
530 PVOID
531 IoGetInitialStack (VOID);
532
533 /*
534 * FUNCTION:
535 */
536 PIO_STACK_LOCATION
537 IoGetNextIrpStackLocation (
538 IRP * irp
539 );
540
541 PDEVICE_OBJECT
542 STDCALL
543 IoGetRelatedDeviceObject (
544 PFILE_OBJECT FileObject
545 );
546
547 VOID
548 IoInitializeDpcRequest (
549 PDEVICE_OBJECT DeviceObject,
550 PIO_DPC_ROUTINE DpcRoutine
551 );
552
553 /*
554 * FUNCTION: Initalizes an irp allocated by the caller
555 * ARGUMENTS:
556 * Irp = IRP to initalize
557 * PacketSize = Size in bytes of the IRP
558 * StackSize = Number of stack locations in the IRP
559 */
560 VOID
561 STDCALL
562 IoInitializeIrp (
563 PIRP Irp,
564 USHORT PacketSize,
565 CCHAR StackSize
566 );
567
568 NTSTATUS
569 IoInitializeTimer (
570 PDEVICE_OBJECT DeviceObject,
571 PIO_TIMER_ROUTINE TimerRoutine,
572 PVOID Context
573 );
574
575 BOOLEAN
576 IoIsErrorUserInduced (
577 NTSTATUS Status
578 );
579 BOOLEAN
580 STDCALL
581 IoIsOperationSynchronous (
582 IN PIRP Irp
583 );
584 BOOLEAN
585 IoIsTotalDeviceFailure (
586 NTSTATUS Status
587 );
588 PIRP
589 STDCALL
590 IoMakeAssociatedIrp (
591 PIRP Irp,
592 CCHAR StackSize
593 );
594 PHYSICAL_ADDRESS
595 IoMapTransfer (
596 PADAPTER_OBJECT AdapterObject,
597 PMDL Mdl,
598 PVOID MapRegisterBase,
599 PVOID CurrentVa,
600 PULONG Length,
601 BOOLEAN WriteToDevice
602 );
603
604 /*
605 * FUNCTION: Marks an IRP as pending
606 * ARGUMENTS:
607 * Irp = Irp to mark
608 * NOTE: If a driver doesn't complete the irp in its dispatch routine it
609 * must mark it pending otherwise the I/O manager will complete it on
610 * return from the dispatch routine.
611 */
612 VOID
613 IoMarkIrpPending (
614 PIRP Irp
615 );
616
617 NTSTATUS
618 IoQueryDeviceDescription (
619 PINTERFACE_TYPE BusType,
620 PULONG BusNumber,
621 PCONFIGURATION_TYPE ControllerType,
622 PULONG ControllerNumber,
623 PCONFIGURATION_TYPE PeripheralType,
624 PULONG PeripheralNumber,
625 PIO_QUERY_DEVICE_ROUTINE CalloutRoutine,
626 PVOID Context
627 );
628
629 VOID
630 IoRaiseHardError (
631 PIRP Irp,
632 PVPB Vpb,
633 PDEVICE_OBJECT RealDeviceObject
634 );
635
636 BOOLEAN
637 IoRaiseHardInformationalError (
638 NTSTATUS ErrorStatus,
639 PUNICODE_STRING String,
640 PKTHREAD Thread
641 );
642
643 NTSTATUS
644 IoReadPartitionTable (
645 PDEVICE_OBJECT DeviceObject,
646 ULONG SectorSize,
647 BOOLEAN ReturnedRecognizedPartitions,
648 struct _DRIVE_LAYOUT_INFORMATION ** PBuffer
649 );
650
651 VOID
652 IoRegisterDriverReinitialization (
653 PDRIVER_OBJECT DriverObject,
654 PDRIVER_REINITIALIZE ReinitRoutine,
655 PVOID Context
656 );
657
658 NTSTATUS
659 IoRegisterShutdownNotification (
660 PDEVICE_OBJECT DeviceObject
661 );
662
663 VOID
664 IoReleaseCancelSpinLock (
665 KIRQL Irql
666 );
667
668 VOID
669 IoRemoveShareAccess (
670 PFILE_OBJECT FileObject,
671 PSHARE_ACCESS ShareAccess
672 );
673
674 NTSTATUS
675 IoReportResourceUsage (
676 PUNICODE_STRING DriverClassName,
677 PDRIVER_OBJECT DriverObject,
678 PCM_RESOURCE_LIST DriverList,
679 ULONG DriverListSize,
680 PDEVICE_OBJECT DeviceObject,
681 PCM_RESOURCE_LIST DeviceList,
682 ULONG DeviceListSize,
683 BOOLEAN OverrideConflict,
684 PBOOLEAN ConflictDetected
685 );
686
687 VOID
688 IoRequestDpc (
689 PDEVICE_OBJECT DeviceObject,
690 PIRP Irp,
691 PVOID Context
692 );
693
694 PDRIVER_CANCEL
695 IoSetCancelRoutine (
696 PIRP Irp,
697 PDRIVER_CANCEL CancelRoutine
698 );
699
700 VOID
701 IoSetCompletionRoutine (
702 PIRP Irp,
703 PIO_COMPLETION_ROUTINE CompletionRoutine,
704 PVOID Context,
705 BOOLEAN InvokeOnSuccess,
706 BOOLEAN InvokeOnError,
707 BOOLEAN InvokeOnCancel
708 );
709
710 VOID
711 IoSetHardErrorOrVerifyDevice (
712 PIRP Irp,
713 PDEVICE_OBJECT DeviceObject
714 );
715
716 VOID
717 IoSetNextIrpStackLocation (
718 PIRP Irp
719 );
720
721 NTSTATUS
722 IoSetPartitionInformation (
723 PDEVICE_OBJECT DeviceObject,
724 ULONG SectorSize,
725 ULONG PartitionNumber,
726 ULONG PartitionType
727 );
728
729 VOID
730 IoSetShareAccess (
731 ACCESS_MASK DesiredAccess,
732 ULONG DesiredShareAccess,
733 PFILE_OBJECT FileObject,
734 PSHARE_ACCESS ShareAccess
735 );
736
737 /*
738 * FUNCTION: Determines the size of an IRP
739 * ARGUMENTS:
740 * StackSize = number of stack locations in the IRP
741 * RETURNS: The size of the IRP in bytes
742 */
743 USHORT
744 IoSizeOfIrp (
745 CCHAR StackSize
746 );
747
748 /*
749 * FUNCTION: Dequeues the next IRP from the device's associated queue and
750 * calls its StartIo routine
751 * ARGUMENTS:
752 * DeviceObject = Device object
753 * Cancelable = True if IRPs in the queue can be cancelled
754 */
755 VOID
756 IoStartNextPacket (
757 PDEVICE_OBJECT DeviceObject,
758 BOOLEAN Cancelable
759 );
760
761 VOID
762 IoStartNextPacketByKey (
763 PDEVICE_OBJECT DeviceObject,
764 BOOLEAN Cancelable,
765 ULONG Key
766 );
767
768 /*
769 * FUNCTION: Calls the drivers StartIO routine with the IRP or queues it if
770 * the device is busy
771 * ARGUMENTS:
772 * DeviceObject = Device to pass the IRP to
773 * Irp = Irp to be processed
774 * Key = Optional value for where to insert the IRP
775 * CancelFunction = Entry point for a driver supplied cancel function
776 */
777 VOID
778 IoStartPacket (
779 PDEVICE_OBJECT DeviceObject,
780 PIRP Irp,
781 PULONG Key,
782 PDRIVER_CANCEL CancelFunction
783 );
784
785 VOID
786 IoStartTimer (
787 PDEVICE_OBJECT DeviceObject
788 );
789
790 VOID
791 IoStopTimer (
792 PDEVICE_OBJECT DeviceObject
793 );
794
795 VOID
796 IoUnregisterShutdownNotification (
797 PDEVICE_OBJECT DeviceObject
798 );
799
800 VOID
801 IoUpdateShareAccess (
802 PFILE_OBJECT FileObject,
803 PSHARE_ACCESS ShareAccess
804 );
805
806 VOID
807 IoWriteErrorLogEntry (
808 PVOID ElEntry
809 );
810
811 NTSTATUS
812 IoWritePartitionTable (
813 PDEVICE_OBJECT DeviceObject,
814 ULONG SectorSize,
815 ULONG SectorsPerTrack,
816 ULONG NumberOfHeads,
817 struct _DRIVE_LAYOUT_INFORMATION* PBuffer
818 );
819
820
821 // Preliminary guess
822 NTKERNELAPI
823 NTSTATUS
824 IoQueryFileVolumeInformation (
825 IN PFILE_OBJECT FileObject,
826 IN FS_INFORMATION_CLASS FsInformationClass,
827 IN ULONG Length,
828 OUT PVOID FsInformation,
829 OUT PULONG ReturnedLength
830 );
831
832 NTKERNELAPI // confirmed - Undocumented because it does not require a valid file handle
833 NTSTATUS
834 IoQueryFileInformation (
835 IN PFILE_OBJECT FileObject,
836 IN FILE_INFORMATION_CLASS FileInformationClass,
837 IN ULONG Length,
838 OUT PVOID FileInformation,
839 OUT PULONG ReturnedLength
840 );
841
842 VOID
843 IoRegisterFileSystem (
844 PDEVICE_OBJECT DeviceObject
845 );
846
847 PDEVICE_OBJECT
848 IoGetAttachedDevice (
849 PDEVICE_OBJECT DeviceObject
850 );
851
852 PFILE_OBJECT
853 IoCreateStreamFileObject (
854 PFILE_OBJECT FileObject,
855 PDEVICE_OBJECT DeviceObject
856 );
857