ReactOS  0.4.15-dev-1377-ga59cecd
iofuncs.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define IoAcquireRemoveLock(RemoveLock, Tag)   IoAcquireRemoveLockEx(RemoveLock, Tag, "", 1, sizeof (IO_REMOVE_LOCK))
 
#define IoAdjustPagingPathCount(_Count, _Increment)
 
#define IoAssignArcName(_ArcName, _DeviceName)
 
#define IoDeassignArcName   IoDeleteSymbolicLink
 
#define IoIsFileOpenedExclusively(FileObject)
 
#define IoCallDriver   IofCallDriver
 
#define IoCompleteRequest   IofCompleteRequest
 
#define IoForwardAndCatchIrp   IoForwardIrpSynchronously
 
#define IoCallDriverStackSafeDefault(a, b)   IoCallDriver(a, b)
 
#define IoWMIDeviceObjectToProviderId(DeviceObject)   ((ULONG)(DeviceObject))
 
#define IoSizeOfIrp(_StackSize)   ((USHORT) (sizeof(IRP) + ((_StackSize) * (sizeof(IO_STACK_LOCATION)))))
 
#define IoReleaseRemoveLock(_RemoveLock, _Tag)   IoReleaseRemoveLockEx(_RemoveLock, _Tag, sizeof(IO_REMOVE_LOCK))
 
#define IoReleaseRemoveLockAndWait(_RemoveLock, _Tag)   IoReleaseRemoveLockAndWaitEx(_RemoveLock, _Tag, sizeof(IO_REMOVE_LOCK))
 
#define PLUGPLAY_REGKEY_DEVICE   1
 
#define PLUGPLAY_REGKEY_DRIVER   2
 
#define PLUGPLAY_REGKEY_CURRENT_HWPROFILE   4
 
#define IoIsErrorUserInduced(Status)
 
#define IoInitializeRemoveLock(Lock, AllocateTag, MaxLockedMinutes, HighWatermark)
 
#define DEVICE_INTERFACE_INCLUDE_NONACTIVE   0x00000001
 
#define IoGetFunctionCodeFromCtlCode(_ControlCode)   (((_ControlCode) >> 2) & 0x00000FFF)
 

Functions

 $if (_WDMDDK_) NTHALAPI VOID NTAPI READ_PORT_BUFFER_UCHAR(IN PUCHAR Port
 
NTHALAPI VOID NTAPI READ_PORT_BUFFER_ULONG (IN PULONG Port, IN PULONG Buffer, IN ULONG Count)
 
NTHALAPI VOID NTAPI READ_PORT_BUFFER_USHORT (IN PUSHORT Port, IN PUSHORT Buffer, IN ULONG Count)
 
NTHALAPI UCHAR NTAPI READ_PORT_UCHAR (IN PUCHAR Port)
 
NTHALAPI ULONG NTAPI READ_PORT_ULONG (IN PULONG Port)
 
NTHALAPI USHORT NTAPI READ_PORT_USHORT (IN PUSHORT Port)
 
NTKERNELAPI VOID NTAPI READ_REGISTER_BUFFER_UCHAR (IN PUCHAR Register, IN PUCHAR Buffer, IN ULONG Count)
 
NTKERNELAPI VOID NTAPI READ_REGISTER_BUFFER_ULONG (IN PULONG Register, IN PULONG Buffer, IN ULONG Count)
 
NTKERNELAPI VOID NTAPI READ_REGISTER_BUFFER_USHORT (IN PUSHORT Register, IN PUSHORT Buffer, IN ULONG Count)
 
NTKERNELAPI UCHAR NTAPI READ_REGISTER_UCHAR (IN PUCHAR Register)
 
NTKERNELAPI ULONG NTAPI READ_REGISTER_ULONG (IN PULONG Register)
 
NTKERNELAPI USHORT NTAPI READ_REGISTER_USHORT (IN PUSHORT Register)
 
NTHALAPI VOID NTAPI WRITE_PORT_BUFFER_UCHAR (IN PUCHAR Port, IN PUCHAR Buffer, IN ULONG Count)
 
NTHALAPI VOID NTAPI WRITE_PORT_BUFFER_ULONG (IN PULONG Port, IN PULONG Buffer, IN ULONG Count)
 
NTHALAPI VOID NTAPI WRITE_PORT_BUFFER_USHORT (IN PUSHORT Port, IN PUSHORT Buffer, IN ULONG Count)
 
NTHALAPI VOID NTAPI WRITE_PORT_UCHAR (IN PUCHAR Port, IN UCHAR Value)
 
NTHALAPI VOID NTAPI WRITE_PORT_ULONG (IN PULONG Port, IN ULONG Value)
 
NTHALAPI VOID NTAPI WRITE_PORT_USHORT (IN PUSHORT Port, IN USHORT Value)
 
NTKERNELAPI VOID NTAPI WRITE_REGISTER_BUFFER_UCHAR (IN PUCHAR Register, IN PUCHAR Buffer, IN ULONG Count)
 
NTKERNELAPI VOID NTAPI WRITE_REGISTER_BUFFER_ULONG (IN PULONG Register, IN PULONG Buffer, IN ULONG Count)
 
NTKERNELAPI VOID NTAPI WRITE_REGISTER_BUFFER_USHORT (IN PUSHORT Register, IN PUSHORT Buffer, IN ULONG Count)
 
NTKERNELAPI VOID NTAPI WRITE_REGISTER_UCHAR (IN PUCHAR Register, IN UCHAR Value)
 
NTKERNELAPI VOID NTAPI WRITE_REGISTER_ULONG (IN PULONG Register, IN ULONG Value)
 
NTKERNELAPI VOID NTAPI WRITE_REGISTER_USHORT (IN PUSHORT Register, IN USHORT Value)
 
 $endif (_WDMDDK_) $if(_NTDDK_) FORCEINLINE VOID NTAPI IoInitializeDriverCreateContext(PIO_DRIVER_CREATE_CONTEXT DriverContext)
 
 $endif (_NTDDK_) $if(_NTIFS_) NTKERNELAPI NTSTATUS NTAPI IoRegisterFsRegistrationChangeEx(_In_ PDRIVER_OBJECT DriverObject
 
 $endif (_NTIFS_) $if(_WDMDDK_) _Acquires_lock_(_Global_cancel_spin_lock_) _Requires_lock_not_held_(_Global_cancel_spin_lock_) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_raises_(DISPATCH_LEVEL) NTKERNELAPI VOID NTAPI IoAcquireCancelSpinLock(_Out_ _At_(*Irql
 
 _IRQL_requires_max_ (DISPATCH_LEVEL) NTKERNELAPI NTSTATUS NTAPI IoAcquireRemoveLockEx(_Inout_ PIO_REMOVE_LOCK RemoveLock
 
NTKERNELAPI NTSTATUS NTAPI IoAllocateDriverObjectExtension (_In_ PDRIVER_OBJECT DriverObject, _In_ PVOID ClientIdentificationAddress, _In_ ULONG DriverObjectExtensionSize, _Post_ _At_(*DriverObjectExtension, _When_(return==0, __drv_aliasesMem __drv_allocatesMem(Mem) _Post_notnull_)) _When_(return==0, _Outptr_result_bytebuffer_(DriverObjectExtensionSize)) PVOID *DriverObjectExtension)
 
 __drv_allocatesMem (Mem) _IRQL_requires_max_(DISPATCH_LEVEL) NTKERNELAPI PIO_WORKITEM NTAPI IoAllocateWorkItem(_In_ PDEVICE_OBJECT DeviceObject)
 
 _IRQL_requires_max_ (APC_LEVEL) _Ret_range_(<
 
NTKERNELAPI NTSTATUS NTAPI IoAttachDevice (_In_ _Kernel_requires_resource_held_(Memory) _When_(return==0, __drv_aliasesMem) PDEVICE_OBJECT SourceDevice, _In_ PUNICODE_STRING TargetDevice, _Out_ PDEVICE_OBJECT *AttachedDevice)
 
_Must_inspect_result_ __drv_aliasesMem _IRQL_requires_max_ (PASSIVE_LEVEL) NTKERNELAPI PIRP NTAPI IoBuildDeviceIoControlRequest(_In_ ULONG IoControlCode
 
NTKERNELAPI NTSTATUS NTAPI IoCreateDevice (_In_ PDRIVER_OBJECT DriverObject, _In_ ULONG DeviceExtensionSize, _In_opt_ PUNICODE_STRING DeviceName, _In_ DEVICE_TYPE DeviceType, _In_ ULONG DeviceCharacteristics, _In_ BOOLEAN Exclusive, _Outptr_result_nullonfailure_ _At_(*DeviceObject, __drv_allocatesMem(Mem) _When_(((_In_function_class_(DRIVER_INITIALIZE))||(_In_function_class_(DRIVER_DISPATCH))), __drv_aliasesMem)) PDEVICE_OBJECT *DeviceObject)
 
 __drv_freesMem (Mem) _IRQL_requires_max_(DISPATCH_LEVEL) NTKERNELAPI VOID NTAPI IoFreeIrp(_In_ PIRP Irp)
 
NTKERNELAPI PDEVICE_OBJECT NTAPI IoGetAttachedDevice (IN PDEVICE_OBJECT DeviceObject)
 
NTKERNELAPI NTSTATUS NTAPI IoGetBootDiskInformation (_Inout_ PBOOTDISK_INFORMATION BootDiskInformation, _In_ ULONG Size)
 
_In_ CONST GUID _Out_ _When_ (return==0, _At_(AliasSymbolicLinkName->Buffer, __drv_allocatesMem(Mem))) PUNICODE_STRING AliasSymbolicLinkName)
 
NTKERNELAPI PEPROCESS NTAPI IoGetCurrentProcess (VOID)
 
_In_opt_ PDEVICE_OBJECT _In_ ULONG _Outptr_result_nullonfailure_ _At_SymbolicLinkList (return==0, __drv_allocatesMem(Mem))) PZZWSTR *SymbolicLinkList
 
 _IRQL_requires_max_ (PASSIVE_LEVEL) _When_((DeviceProperty &__string_type)
 
 _At_ (PropertyBuffer, _Post_z_)) _When_((DeviceProperty &__multiString_type)
 
 _At_ (PropertyBuffer, _Post_ _NullNull_terminated_)) NTKERNELAPI NTSTATUS NTAPI IoGetDeviceProperty(_In_ PDEVICE_OBJECT DeviceObject
 
_In_ DEVICE_REGISTRY_PROPERTY _In_ ULONG _Out_writes_bytes_opt_ (BufferLength) PVOID PropertyBuffer
 
_In_ DEVICE_REGISTRY_PROPERTY _In_ ULONG _Deref_out_range_ (<=, BufferLength) PULONG ResultLength)
 
_Must_inspect_result_ _In_ PDEVICE_DESCRIPTION _Out_ _When_ (return!=0, _Kernel_IoGetDmaAdapter_ _At_(*NumberOfMapRegisters, _Must_inspect_result_)) PULONG NumberOfMapRegisters)
 
NTKERNELAPI PDEVICE_OBJECT NTAPI IoGetRelatedDeviceObject (_In_ PFILE_OBJECT FileObject)
 
_In_ __drv_reportError ("MajorVersion must be 1 or 6")) UCHAR MajorVersion
 
_In_ _In_ _When_ (MinorVersion!=0 &&MinorVersion!=5 &&MinorVersion!=16 &&MinorVersion!=32 &&MinorVersion!=48, __drv_reportError("MinorVersion must be 0, 0x5, 0x10, 0x20, or 0x30")) UCHAR MinorVersion)
 
_In_ CONST GUID _In_opt_ PUNICODE_STRING _Out_ _When_ (return==0, _At_(SymbolicLinkName->Buffer, __drv_allocatesMem(Mem))) PUNICODE_STRING SymbolicLinkName)
 
_In_ ULONG _In_opt_ PVOID _In_ PDRIVER_OBJECT _In_ PDRIVER_NOTIFICATION_CALLBACK_ROUTINE _Inout_opt_ __drv_aliasesMem PVOID _Outptr_result_nullonfailure_ _At_NotificationEntry (return==0, __drv_allocatesMem(Mem))) PVOID *NotificationEntry
 
 _Requires_lock_held_ (_Global_cancel_spin_lock_) _Releases_lock_(_Global_cancel_spin_lock_) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_min_(DISPATCH_LEVEL) NTKERNELAPI VOID NTAPI IoReleaseCancelSpinLock(_In_ _IRQL_restores_ _IRQL_uses_cancel_ KIRQL Irql)
 
NTKERNELAPI VOID NTAPI IoReleaseRemoveLockEx (_Inout_ PIO_REMOVE_LOCK RemoveLock, _In_opt_ PVOID Tag, _In_ ULONG RemlockSize)
 
NTKERNELAPI VOID NTAPI IoSetShareAccess (_In_ ACCESS_MASK DesiredAccess, _In_ ULONG DesiredShareAccess, _Inout_ PFILE_OBJECT FileObject, _Out_ PSHARE_ACCESS ShareAccess)
 
NTKERNELAPI NTSTATUS NTAPI IoWMIQuerySingleInstanceMultiple (_In_reads_(ObjectCount) PVOID *DataBlockObjectList, _In_reads_(ObjectCount) PUNICODE_STRING InstanceNames, _In_ ULONG ObjectCount, _Inout_ ULONG *InOutBufferSize, _Out_writes_bytes_opt_(*InOutBufferSize) PVOID OutBuffer)
 
NTKERNELAPI NTSTATUS NTAPI IoWMISuggestInstanceName (_In_opt_ PDEVICE_OBJECT PhysicalDeviceObject, _In_opt_ PUNICODE_STRING SymbolicLinkName, _In_ BOOLEAN CombineNames, _Out_ PUNICODE_STRING SuggestedInstanceName)
 
_Must_inspect_result_ NTKERNELAPI NTSTATUS NTAPI IoWMIWriteEvent (_Inout_ _When_(return==0, __drv_aliasesMem) PVOID WnodeEventItem)
 
NTKERNELAPI PIRP NTAPI IoGetTopLevelIrp (VOID)
 
NTKERNELAPI VOID NTAPI IoSetTopLevelIrp (_In_opt_ PIRP Irp)
 
NTHALAPI PHYSICAL_ADDRESS NTAPI IoMapTransfer (_In_ PADAPTER_OBJECT AdapterObject, _In_ PMDL Mdl, _In_ PVOID MapRegisterBase, _In_ PVOID CurrentVa, _Inout_ PULONG Length, _In_ BOOLEAN WriteToDevice)
 
NTKERNELAPI VOID NTAPI IoCancelFileOpen (_In_ PDEVICE_OBJECT DeviceObject, _In_ PFILE_OBJECT FileObject)
 
NTKERNELAPI NTSTATUS NTAPI IoQueryDeviceDescription (_In_opt_ PINTERFACE_TYPE BusType, _In_opt_ PULONG BusNumber, _In_opt_ PCONFIGURATION_TYPE ControllerType, _In_opt_ PULONG ControllerNumber, _In_opt_ PCONFIGURATION_TYPE PeripheralType, _In_opt_ PULONG PeripheralNumber, _In_ PIO_QUERY_DEVICE_ROUTINE CalloutRoutine, _Inout_opt_ PVOID Context)
 
NTKERNELAPI NTSTATUS NTAPI IoAttachDeviceByPointer (_In_ PDEVICE_OBJECT SourceDevice, _In_ PDEVICE_OBJECT TargetDevice)
 
NTKERNELAPI NTSTATUS NTAPI IoReportResourceForDetection (_In_ PDRIVER_OBJECT DriverObject, _In_reads_bytes_opt_(DriverListSize) PCM_RESOURCE_LIST DriverList, _In_opt_ ULONG DriverListSize, _In_opt_ PDEVICE_OBJECT DeviceObject, _In_reads_bytes_opt_(DeviceListSize) PCM_RESOURCE_LIST DeviceList, _In_opt_ ULONG DeviceListSize, _Out_ PBOOLEAN ConflictDetected)
 
NTKERNELAPI NTSTATUS NTAPI IoReportResourceUsage (_In_opt_ PUNICODE_STRING DriverClassName, _In_ PDRIVER_OBJECT DriverObject, _In_reads_bytes_opt_(DriverListSize) PCM_RESOURCE_LIST DriverList, _In_opt_ ULONG DriverListSize, _In_opt_ PDEVICE_OBJECT DeviceObject, _In_reads_bytes_opt_(DeviceListSize) PCM_RESOURCE_LIST DeviceList, _In_opt_ ULONG DeviceListSize, _In_ BOOLEAN OverrideConflict, _Out_ PBOOLEAN ConflictDetected)
 
NTKERNELAPI NTSTATUS NTAPI IoAssignResources (_In_ PUNICODE_STRING RegistryPath, _In_opt_ PUNICODE_STRING DriverClassName, _In_ PDRIVER_OBJECT DriverObject, _In_opt_ PDEVICE_OBJECT DeviceObject, _In_opt_ PIO_RESOURCE_REQUIREMENTS_LIST RequestedResources, _Inout_ PCM_RESOURCE_LIST *AllocatedResources)
 
NTKERNELAPI NTSTATUS NTAPI IoCheckDesiredAccess (_Inout_ PACCESS_MASK DesiredAccess, _In_ ACCESS_MASK GrantedAccess)
 
NTKERNELAPI NTSTATUS NTAPI IoCheckEaBufferValidity (_In_ PFILE_FULL_EA_INFORMATION EaBuffer, _In_ ULONG EaLength, _Out_ PULONG ErrorOffset)
 
NTKERNELAPI NTSTATUS NTAPI IoCheckFunctionAccess (_In_ ACCESS_MASK GrantedAccess, _In_ UCHAR MajorFunction, _In_ UCHAR MinorFunction, _In_ ULONG IoControlCode, _In_opt_ PVOID Argument1, _In_opt_ PVOID Argument2)
 
NTKERNELAPI NTSTATUS NTAPI IoCheckQuerySetFileInformation (_In_ FILE_INFORMATION_CLASS FileInformationClass, _In_ ULONG Length, _In_ BOOLEAN SetOperation)
 
NTKERNELAPI NTSTATUS NTAPI IoCheckQuerySetVolumeInformation (_In_ FS_INFORMATION_CLASS FsInformationClass, _In_ ULONG Length, _In_ BOOLEAN SetOperation)
 
NTKERNELAPI NTSTATUS NTAPI IoCheckQuotaBufferValidity (_In_ PFILE_QUOTA_INFORMATION QuotaBuffer, _In_ ULONG QuotaLength, _Out_ PULONG ErrorOffset)
 
NTKERNELAPI PFILE_OBJECT NTAPI IoCreateStreamFileObject (_In_opt_ PFILE_OBJECT FileObject, _In_opt_ PDEVICE_OBJECT DeviceObject)
 
NTKERNELAPI PFILE_OBJECT NTAPI IoCreateStreamFileObjectLite (_In_opt_ PFILE_OBJECT FileObject, _In_opt_ PDEVICE_OBJECT DeviceObject)
 
NTKERNELAPI BOOLEAN NTAPI IoFastQueryNetworkAttributes (_In_ POBJECT_ATTRIBUTES ObjectAttributes, _In_ ACCESS_MASK DesiredAccess, _In_ ULONG OpenOptions, _Out_ PIO_STATUS_BLOCK IoStatus, _Out_ PFILE_NETWORK_OPEN_INFORMATION Buffer)
 
NTKERNELAPI NTSTATUS NTAPI IoPageRead (_In_ PFILE_OBJECT FileObject, _In_ PMDL Mdl, _In_ PLARGE_INTEGER Offset, _In_ PKEVENT Event, _Out_ PIO_STATUS_BLOCK IoStatusBlock)
 
NTKERNELAPI PDEVICE_OBJECT NTAPI IoGetBaseFileSystemDeviceObject (_In_ PFILE_OBJECT FileObject)
 
NTKERNELAPI ULONG NTAPI IoGetRequestorProcessId (_In_ PIRP Irp)
 
NTKERNELAPI PEPROCESS NTAPI IoGetRequestorProcess (_In_ PIRP Irp)
 
NTKERNELAPI BOOLEAN NTAPI IoIsOperationSynchronous (_In_ PIRP Irp)
 
NTKERNELAPI BOOLEAN NTAPI IoIsSystemThread (_In_ PETHREAD Thread)
 
NTKERNELAPI BOOLEAN NTAPI IoIsValidNameGraftingBuffer (_In_ PIRP Irp, _In_ PREPARSE_DATA_BUFFER ReparseBuffer)
 
NTKERNELAPI NTSTATUS NTAPI IoQueryFileInformation (_In_ PFILE_OBJECT FileObject, _In_ FILE_INFORMATION_CLASS FileInformationClass, _In_ ULONG Length, _Out_ PVOID FileInformation, _Out_ PULONG ReturnedLength)
 
NTKERNELAPI NTSTATUS NTAPI IoQueryVolumeInformation (_In_ PFILE_OBJECT FileObject, _In_ FS_INFORMATION_CLASS FsInformationClass, _In_ ULONG Length, _Out_ PVOID FsInformation, _Out_ PULONG ReturnedLength)
 
NTKERNELAPI VOID NTAPI IoQueueThreadIrp (_In_ PIRP Irp)
 
NTKERNELAPI VOID NTAPI IoRegisterFileSystem (_In_ __drv_aliasesMem PDEVICE_OBJECT DeviceObject)
 
NTKERNELAPI NTSTATUS NTAPI IoRegisterFsRegistrationChange (_In_ PDRIVER_OBJECT DriverObject, _In_ PDRIVER_FS_NOTIFICATION DriverNotificationRoutine)
 
NTKERNELAPI VOID NTAPI IoReleaseVpbSpinLock (_In_ KIRQL Irql)
 
NTKERNELAPI VOID NTAPI IoSetDeviceToVerify (_In_ PETHREAD Thread, _In_opt_ PDEVICE_OBJECT DeviceObject)
 
NTKERNELAPI NTSTATUS NTAPI IoSetInformation (_In_ PFILE_OBJECT FileObject, _In_ FILE_INFORMATION_CLASS FileInformationClass, _In_ ULONG Length, _In_ PVOID FileInformation)
 
NTKERNELAPI NTSTATUS NTAPI IoSynchronousPageWrite (_In_ PFILE_OBJECT FileObject, _In_ PMDL Mdl, _In_ PLARGE_INTEGER FileOffset, _In_ PKEVENT Event, _Out_ PIO_STATUS_BLOCK IoStatusBlock)
 
NTKERNELAPI PEPROCESS NTAPI IoThreadToProcess (_In_ PETHREAD Thread)
 
NTKERNELAPI VOID NTAPI IoUnregisterFileSystem (_In_ PDEVICE_OBJECT DeviceObject)
 
NTKERNELAPI VOID NTAPI IoUnregisterFsRegistrationChange (_In_ PDRIVER_OBJECT DriverObject, _In_ PDRIVER_FS_NOTIFICATION DriverNotificationRoutine)
 
NTKERNELAPI NTSTATUS NTAPI IoVerifyVolume (_In_ PDEVICE_OBJECT DeviceObject, _In_ BOOLEAN AllowRawMount)
 
NTKERNELAPI NTSTATUS NTAPI IoGetRequestorSessionId (_In_ PIRP Irp, _Out_ PULONG pSessionId)
 
NTKERNELAPI NTSTATUS NTAPI IoSetFileOrigin (_In_ PFILE_OBJECT FileObject, _In_ BOOLEAN Remote)
 
NTKERNELAPI VOID NTAPI IoCsqInsertIrp (_Inout_ PIO_CSQ Csq, _Inout_ PIRP Irp, _Out_opt_ PIO_CSQ_IRP_CONTEXT Context)
 Insert an IRP into the CSQ. More...
 
NTKERNELAPI PIRP NTAPI IoCsqRemoveIrp (_Inout_ PIO_CSQ Csq, _Inout_ PIO_CSQ_IRP_CONTEXT Context)
 Remove anb IRP from the queue. More...
 
NTKERNELAPI PIRP NTAPI IoCsqRemoveNextIrp (_Inout_ PIO_CSQ Csq, _In_opt_ PVOID PeekContext)
 IoCsqRemoveNextIrp - Removes the next IRP from the queue. More...
 
NTKERNELAPI BOOLEAN NTAPI IoForwardIrpSynchronously (_In_ PDEVICE_OBJECT DeviceObject, _In_ PIRP Irp)
 
NTKERNELAPI VOID NTAPI IoFreeErrorLogEntry (_In_ PVOID ElEntry)
 
VOID NTAPI IoSetStartIoAttributes (_In_ PDEVICE_OBJECT DeviceObject, _In_ BOOLEAN DeferredStartIo, _In_ BOOLEAN NonCancelable)
 
NTKERNELAPI NTSTATUS NTAPI IoWMIDeviceObjectToInstanceName (_In_ PVOID DataBlockObject, _In_ PDEVICE_OBJECT DeviceObject, _Out_ PUNICODE_STRING InstanceName)
 
NTKERNELAPI NTSTATUS NTAPI IoWMIExecuteMethod (_In_ PVOID DataBlockObject, _In_ PUNICODE_STRING InstanceName, _In_ ULONG MethodId, _In_ ULONG InBufferSize, _Inout_ PULONG OutBufferSize, _Inout_updates_bytes_to_opt_(*OutBufferSize, InBufferSize) PUCHAR InOutBuffer)
 
NTKERNELAPI NTSTATUS NTAPI IoWMIHandleToInstanceName (_In_ PVOID DataBlockObject, _In_ HANDLE FileHandle, _Out_ PUNICODE_STRING InstanceName)
 
NTKERNELAPI NTSTATUS NTAPI IoWMIOpenBlock (_In_ LPCGUID DataBlockGuid, _In_ ULONG DesiredAccess, _Out_ PVOID *DataBlockObject)
 
NTKERNELAPI NTSTATUS NTAPI IoWMIQueryAllData (_In_ PVOID DataBlockObject, _Inout_ ULONG *InOutBufferSize, _Out_writes_bytes_opt_(*InOutBufferSize) PVOID OutBuffer)
 
NTKERNELAPI NTSTATUS NTAPI IoWMIQueryAllDataMultiple (_In_reads_(ObjectCount) PVOID *DataBlockObjectList, _In_ ULONG ObjectCount, _Inout_ ULONG *InOutBufferSize, _Out_writes_bytes_opt_(*InOutBufferSize) PVOID OutBuffer)
 
NTKERNELAPI NTSTATUS NTAPI IoWMIQuerySingleInstance (_In_ PVOID DataBlockObject, _In_ PUNICODE_STRING InstanceName, _Inout_ ULONG *InOutBufferSize, _Out_writes_bytes_opt_(*InOutBufferSize) PVOID OutBuffer)
 
NTKERNELAPI NTSTATUS NTAPI IoWMISetNotificationCallback (_Inout_ PVOID Object, _In_ WMI_NOTIFICATION_CALLBACK Callback, _In_opt_ PVOID Context)
 
NTKERNELAPI NTSTATUS NTAPI IoWMISetSingleInstance (_In_ PVOID DataBlockObject, _In_ PUNICODE_STRING InstanceName, _In_ ULONG Version, _In_ ULONG ValueBufferSize, _In_reads_bytes_(ValueBufferSize) PVOID ValueBuffer)
 
NTKERNELAPI NTSTATUS NTAPI IoWMISetSingleItem (_In_ PVOID DataBlockObject, _In_ PUNICODE_STRING InstanceName, _In_ ULONG DataItemId, _In_ ULONG Version, _In_ ULONG ValueBufferSize, _In_reads_bytes_(ValueBufferSize) PVOID ValueBuffer)
 
NTKERNELAPI NTSTATUS NTAPI IoCreateDisk (_In_ PDEVICE_OBJECT DeviceObject, _In_opt_ struct _CREATE_DISK *Disk)
 
NTKERNELAPI NTSTATUS NTAPI IoReadDiskSignature (_In_ PDEVICE_OBJECT DeviceObject, _In_ ULONG BytesPerSector, _Out_ PDISK_SIGNATURE Signature)
 
NTKERNELAPI NTSTATUS NTAPI IoSetSystemPartition (_In_ PUNICODE_STRING VolumeNameString)
 
NTKERNELAPI NTSTATUS NTAPI IoVerifyPartitionTable (_In_ PDEVICE_OBJECT DeviceObject, _In_ BOOLEAN FixErrors)
 
NTKERNELAPI NTSTATUS NTAPI IoVolumeDeviceToDosName (_In_ PVOID VolumeDeviceObject, _Out_ _When_(return==0, _At_(DosName->Buffer, __drv_allocatesMem(Mem))) PUNICODE_STRING DosName)
 
 _In_reads_ (_Inexpressible_(FIELD_OFFSET(DRIVE_LAYOUT_INFORMATION_EX, PartitionEntry[0]))) struct _DRIVE_LAYOUT_INFORMATION_EX *DriveLayout)
 
NTKERNELAPI NTSTATUS NTAPI IoCreateFileSpecifyDeviceObjectHint (_Out_ PHANDLE FileHandle, _In_ ACCESS_MASK DesiredAccess, _In_ POBJECT_ATTRIBUTES ObjectAttributes, _Out_ PIO_STATUS_BLOCK IoStatusBlock, _In_opt_ PLARGE_INTEGER AllocationSize, _In_ ULONG FileAttributes, _In_ ULONG ShareAccess, _In_ ULONG Disposition, _In_ ULONG CreateOptions, _In_opt_ PVOID EaBuffer, _In_ ULONG EaLength, _In_ CREATE_FILE_TYPE CreateFileType, _In_opt_ PVOID InternalParameters, _In_ ULONG Options, _In_opt_ PVOID DeviceObject)
 
NTKERNELAPI NTSTATUS NTAPI IoAttachDeviceToDeviceStackSafe (_In_ PDEVICE_OBJECT SourceDevice, _In_ PDEVICE_OBJECT TargetDevice, _Outptr_ PDEVICE_OBJECT *AttachedToDeviceObject)
 
NTKERNELAPI NTSTATUS NTAPI IoQueryFileDosDeviceName (_In_ PFILE_OBJECT FileObject, _Out_ POBJECT_NAME_INFORMATION *ObjectNameInformation)
 
NTKERNELAPI NTSTATUS NTAPI IoEnumerateDeviceObjectList (_In_ PDRIVER_OBJECT DriverObject, _Out_writes_bytes_to_opt_(DeviceObjectListSize,(*ActualNumberDeviceObjects) *sizeof(PDEVICE_OBJECT)) PDEVICE_OBJECT *DeviceObjectList, _In_ ULONG DeviceObjectListSize, _Out_ PULONG ActualNumberDeviceObjects)
 
NTKERNELAPI PDEVICE_OBJECT NTAPI IoGetLowerDeviceObject (_In_ PDEVICE_OBJECT DeviceObject)
 
NTKERNELAPI PDEVICE_OBJECT NTAPI IoGetDeviceAttachmentBaseRef (_In_ PDEVICE_OBJECT DeviceObject)
 
NTKERNELAPI NTSTATUS NTAPI IoGetDiskDeviceObject (_In_ PDEVICE_OBJECT FileSystemDeviceObject, _Out_ PDEVICE_OBJECT *DiskDeviceObject)
 
NTKERNELAPI NTSTATUS NTAPI IoCsqInsertIrpEx (_Inout_ PIO_CSQ Csq, _Inout_ PIRP Irp, _Out_opt_ PIO_CSQ_IRP_CONTEXT Context, _In_opt_ PVOID InsertContext)
 Insert an IRP into the CSQ, with additional tracking context. More...
 
ActualNumberDriverObjectssizeof (PDRIVER_OBJECT)) PDRIVER_OBJECT *DriverObjectList
 
NTKERNELAPI NTSTATUS NTAPI IoCheckShareAccessEx (_In_ ACCESS_MASK DesiredAccess, _In_ ULONG DesiredShareAccess, _Inout_ PFILE_OBJECT FileObject, _Inout_ PSHARE_ACCESS ShareAccess, _In_ BOOLEAN Update, _In_ PBOOLEAN WritePermission)
 
NTKERNELAPI NTSTATUS NTAPI IoConnectInterruptEx (_Inout_ PIO_CONNECT_INTERRUPT_PARAMETERS Parameters)
 
NTKERNELAPI VOID NTAPI IoDisconnectInterruptEx (_In_ PIO_DISCONNECT_INTERRUPT_PARAMETERS Parameters)
 
LOGICAL NTAPI IoWithinStackLimits (_In_ ULONG_PTR RegionStart, _In_ SIZE_T RegionSize)
 
NTKERNELAPI VOID NTAPI IoSetShareAccessEx (_In_ ACCESS_MASK DesiredAccess, _In_ ULONG DesiredShareAccess, _Inout_ PFILE_OBJECT FileObject, _Out_ PSHARE_ACCESS ShareAccess, _In_ PBOOLEAN WritePermission)
 
ULONG NTAPI IoSizeofWorkItem (VOID)
 
VOID NTAPI IoInitializeWorkItem (_In_ PVOID IoObject, _Out_ PIO_WORKITEM IoWorkItem)
 
VOID NTAPI IoUninitializeWorkItem (_Inout_ PIO_WORKITEM IoWorkItem)
 
NTKRNLVISTAAPI IO_PRIORITY_HINT NTAPI IoGetIoPriorityHint (_In_ PIRP Irp)
 
NTSTATUS NTAPI IoSetIoPriorityHint (_In_ PIRP Irp, _In_ IO_PRIORITY_HINT PriorityHint)
 
NTSTATUS NTAPI IoAllocateSfioStreamIdentifier (_In_ PFILE_OBJECT FileObject, _In_ ULONG Length, _In_ PVOID Signature, _Out_ PVOID *StreamIdentifier)
 
PVOID NTAPI IoGetSfioStreamIdentifier (_In_ PFILE_OBJECT FileObject, _In_ PVOID Signature)
 
NTSTATUS NTAPI IoFreeSfioStreamIdentifier (_In_ PFILE_OBJECT FileObject, _In_ PVOID Signature)
 
PTXN_PARAMETER_BLOCK NTAPI IoGetTransactionParameterBlock (_In_ PFILE_OBJECT FileObject)
 
NTKERNELAPI NTSTATUS NTAPI IoCreateFileEx (_Out_ PHANDLE FileHandle, _In_ ACCESS_MASK DesiredAccess, _In_ POBJECT_ATTRIBUTES ObjectAttributes, _Out_ PIO_STATUS_BLOCK IoStatusBlock, _In_opt_ PLARGE_INTEGER AllocationSize, _In_ ULONG FileAttributes, _In_ ULONG ShareAccess, _In_ ULONG Disposition, _In_ ULONG CreateOptions, _In_opt_ PVOID EaBuffer, _In_ ULONG EaLength, _In_ CREATE_FILE_TYPE CreateFileType, _In_opt_ PVOID InternalParameters, _In_ ULONG Options, _In_opt_ PIO_DRIVER_CREATE_CONTEXT DriverContext)
 
NTSTATUS NTAPI IoSetIrpExtraCreateParameter (_Inout_ PIRP Irp, _In_ struct _ECP_LIST *ExtraCreateParameter)
 
VOID NTAPI IoClearIrpExtraCreateParameter (_Inout_ PIRP Irp)
 
NTKRNLVISTAAPI NTSTATUS NTAPI IoGetIrpExtraCreateParameter (_In_ PIRP Irp, _Outptr_result_maybenull_ struct _ECP_LIST **ExtraCreateParameter)
 
BOOLEAN NTAPI IoIsFileObjectIgnoringSharing (_In_ PFILE_OBJECT FileObject)
 
NTSTATUS NTAPI IoGetContainerInformation (_In_ IO_CONTAINER_INFORMATION_CLASS InformationClass, _In_opt_ PVOID ContainerObject, _Inout_updates_bytes_opt_(BufferLength) PVOID Buffer, _In_ ULONG BufferLength)
 
NTSTATUS NTAPI IoRegisterContainerNotification (_In_ IO_CONTAINER_NOTIFICATION_CLASS NotificationClass, _In_ PIO_CONTAINER_NOTIFICATION_FUNCTION CallbackFunction, _In_reads_bytes_opt_(NotificationInformationLength) PVOID NotificationInformation, _In_ ULONG NotificationInformationLength, _Out_ PVOID CallbackRegistration)
 
VOID NTAPI IoUnregisterContainerNotification (_In_ PVOID CallbackRegistration)
 
NTKERNELAPI NTSTATUS NTAPI IoReplaceFileObjectName (_In_ PFILE_OBJECT FileObject, _In_reads_bytes_(FileNameLength) PWSTR NewFileName, _In_ USHORT FileNameLength)
 
_In_ CONST DEVPROPKEY _In_ LCID _In_ ULONG _In_ DEVPROPTYPE _In_ ULONG _In_reads_bytes_opt_ (Size) PVOID Data)
 
_In_ CONST DEVPROPKEY _In_ LCID _Reserved_ ULONG _In_ ULONG _Out_writes_bytes_to_ (Size, *RequiredSize) PVOID Data
 
FORCEINLINE VOID IoSetNextIrpStackLocation (_Inout_ PIRP Irp)
 
__drv_aliasesMem FORCEINLINE PIO_STACK_LOCATION IoGetNextIrpStackLocation (_In_ PIRP Irp)
 
 ASSERT ((InvokeOnSuccess||InvokeOnError||InvokeOnCancel) ?(CompletionRoutine !=NULL) :TRUE)
 
 if (InvokeOnSuccess)
 
 if (InvokeOnError)
 
 if (InvokeOnCancel)
 
FORCEINLINE VOID IoRequestDpc (_Inout_ PDEVICE_OBJECT DeviceObject, _In_opt_ PIRP Irp, _In_opt_ __drv_aliasesMem PVOID Context)
 
__drv_aliasesMem FORCEINLINE PIO_STACK_LOCATION IoGetCurrentIrpStackLocation (_In_ PIRP Irp)
 
FORCEINLINE VOID IoMarkIrpPending (_Inout_ PIRP Irp)
 
FORCEINLINE VOID IoInitializeDpcRequest (_In_ PDEVICE_OBJECT DeviceObject, _In_ PIO_DPC_ROUTINE DpcRoutine)
 
FORCEINLINE VOID IoCopyCurrentIrpStackLocationToNext (_Inout_ PIRP Irp)
 
FORCEINLINE VOID IoInitializeThreadedDpcRequest (_In_ PDEVICE_OBJECT DeviceObject, _In_ PIO_DPC_ROUTINE DpcRoutine)
 

Variables

IN PUCHAR Buffer
 
IN PUCHAR IN ULONG Count
 
_In_ PDRIVER_FS_NOTIFICATION DriverNotificationRoutine
 
_IRQL_saves_ PKIRQL Irql
 
_In_opt_ PVOID Tag
 
_In_opt_ PVOID _In_ PCSTR File
 
_In_opt_ PVOID _In_ PCSTR _In_ ULONG Line
 
_In_opt_ PVOID _In_ PCSTR _In_ ULONG _In_ ULONG RemlockSize
 
_In_ UCHAR EntrySize
 
_Must_inspect_result_ _In_ BOOLEAN ChargeQuota
 
_In_ ULONG Length
 
_In_ ULONG _In_ BOOLEAN SecondaryBuffer
 
_In_ ULONG _In_ BOOLEAN _In_ BOOLEAN _Inout_opt_ PIRP Irp
 
_Must_inspect_result_ __drv_aliasesMem PDEVICE_OBJECT SourceDevice
 
_Must_inspect_result_ __drv_aliasesMem PDEVICE_OBJECT _In_ PDEVICE_OBJECT TargetDevice
 
_Must_inspect_result_ __drv_aliasesMem _In_ PDEVICE_OBJECT DeviceObject
 
_Must_inspect_result_ __drv_aliasesMem _In_ PDEVICE_OBJECT _Inout_opt_ PVOID _In_opt_ ULONG _In_opt_ PLARGE_INTEGER StartingOffset
 
_Must_inspect_result_ __drv_aliasesMem _In_ PDEVICE_OBJECT _Inout_opt_ PVOID _In_opt_ ULONG _In_opt_ PLARGE_INTEGER _In_opt_ PIO_STATUS_BLOCK IoStatusBlock
 
_Must_inspect_result_ __drv_aliasesMem _In_ PDEVICE_OBJECT _In_opt_ PVOID InputBuffer
 
_Must_inspect_result_ __drv_aliasesMem _In_ PDEVICE_OBJECT _In_opt_ PVOID _In_ ULONG InputBufferLength
 
_Must_inspect_result_ __drv_aliasesMem _In_ PDEVICE_OBJECT _In_opt_ PVOID _In_ ULONG _Out_opt_ PVOID OutputBuffer
 
_Must_inspect_result_ __drv_aliasesMem _In_ PDEVICE_OBJECT _In_opt_ PVOID _In_ ULONG _Out_opt_ PVOID _In_ ULONG OutputBufferLength
 
_Must_inspect_result_ __drv_aliasesMem _In_ PDEVICE_OBJECT _In_opt_ PVOID _In_ ULONG _Out_opt_ PVOID _In_ ULONG _In_ BOOLEAN InternalDeviceIoControl
 
_Must_inspect_result_ __drv_aliasesMem _In_ PDEVICE_OBJECT _In_opt_ PVOID _In_ ULONG _Out_opt_ PVOID _In_ ULONG _In_ BOOLEAN _In_opt_ PKEVENT Event
 
_Inout_ PMDL TargetMdl
 
_Inout_ PMDL _In_ PVOID VirtualAddress
 
_In_ CCHAR PriorityBoost
 
_In_ ULONG DesiredShareAccess
 
_In_ ULONG _Inout_ PFILE_OBJECT FileObject
 
_In_ ULONG _Inout_ PFILE_OBJECT _Inout_ PSHARE_ACCESS ShareAccess
 
_In_ ULONG _Inout_ PFILE_OBJECT _Inout_ PSHARE_ACCESS _In_ BOOLEAN Update
 
_In_ PKSERVICE_ROUTINE ServiceRoutine
 
_In_ PKSERVICE_ROUTINE _In_opt_ PVOID ServiceContext
 
_In_ PKSERVICE_ROUTINE _In_opt_ PVOID _In_opt_ PKSPIN_LOCK SpinLock
 
_In_ PKSERVICE_ROUTINE _In_opt_ PVOID _In_opt_ PKSPIN_LOCK _In_ ULONG Vector
 
_In_ PKSERVICE_ROUTINE _In_opt_ PVOID _In_opt_ PKSPIN_LOCK _In_ ULONG _In_ KIRQL _In_ KIRQL SynchronizeIrql
 
_In_ PKSERVICE_ROUTINE _In_opt_ PVOID _In_opt_ PKSPIN_LOCK _In_ ULONG _In_ KIRQL _In_ KIRQL _In_ KINTERRUPT_MODE InterruptMode
 
_In_ PKSERVICE_ROUTINE _In_opt_ PVOID _In_opt_ PKSPIN_LOCK _In_ ULONG _In_ KIRQL _In_ KIRQL _In_ KINTERRUPT_MODE _In_ BOOLEAN ShareVector
 
_In_ PKSERVICE_ROUTINE _In_opt_ PVOID _In_opt_ PKSPIN_LOCK _In_ ULONG _In_ KIRQL _In_ KIRQL _In_ KINTERRUPT_MODE _In_ BOOLEAN _In_ KAFFINITY ProcessorEnableMask
 
_In_ PKSERVICE_ROUTINE _In_opt_ PVOID _In_opt_ PKSPIN_LOCK _In_ ULONG _In_ KIRQL _In_ KIRQL _In_ KINTERRUPT_MODE _In_ BOOLEAN _In_ KAFFINITY _In_ BOOLEAN FloatingSave
 
_In_ ACCESS_MASK DesiredAccess
 
_In_ ACCESS_MASK _In_ POBJECT_ATTRIBUTES ObjectAttributes
 
_In_ ACCESS_MASK _In_ POBJECT_ATTRIBUTES _Out_ PIO_STATUS_BLOCK _In_opt_ PLARGE_INTEGER AllocationSize
 
_In_ ACCESS_MASK _In_ POBJECT_ATTRIBUTES _Out_ PIO_STATUS_BLOCK _In_opt_ PLARGE_INTEGER _In_ ULONG FileAttributes
 
_In_ ACCESS_MASK _In_ POBJECT_ATTRIBUTES _Out_ PIO_STATUS_BLOCK _In_opt_ PLARGE_INTEGER _In_ ULONG _In_ ULONG _In_ ULONG Disposition
 
_In_ ACCESS_MASK _In_ POBJECT_ATTRIBUTES _Out_ PIO_STATUS_BLOCK _In_opt_ PLARGE_INTEGER _In_ ULONG _In_ ULONG _In_ ULONG _In_ ULONG CreateOptions
 
_In_ ACCESS_MASK _In_ POBJECT_ATTRIBUTES _Out_ PIO_STATUS_BLOCK _In_opt_ PLARGE_INTEGER _In_ ULONG _In_ ULONG _In_ ULONG _In_ ULONG _In_opt_ PVOID EaBuffer
 
_In_ ACCESS_MASK _In_ POBJECT_ATTRIBUTES _Out_ PIO_STATUS_BLOCK _In_opt_ PLARGE_INTEGER _In_ ULONG _In_ ULONG _In_ ULONG _In_ ULONG _In_opt_ PVOID _In_ ULONG EaLength
 
_In_ ACCESS_MASK _In_ POBJECT_ATTRIBUTES _Out_ PIO_STATUS_BLOCK _In_opt_ PLARGE_INTEGER _In_ ULONG _In_ ULONG _In_ ULONG _In_ ULONG _In_opt_ PVOID _In_ ULONG _In_ CREATE_FILE_TYPE CreateFileType
 
_In_ ACCESS_MASK _In_ POBJECT_ATTRIBUTES _Out_ PIO_STATUS_BLOCK _In_opt_ PLARGE_INTEGER _In_ ULONG _In_ ULONG _In_ ULONG _In_ ULONG _In_opt_ PVOID _In_ ULONG _In_ CREATE_FILE_TYPE _In_opt_ PVOID InternalParameters
 
_In_ ACCESS_MASK _In_ POBJECT_ATTRIBUTES _Out_ PIO_STATUS_BLOCK _In_opt_ PLARGE_INTEGER _In_ ULONG _In_ ULONG _In_ ULONG _In_ ULONG _In_opt_ PVOID _In_ ULONG _In_ CREATE_FILE_TYPE _In_opt_ PVOID _In_ ULONG Options
 
_Out_ PHANDLE EventHandle
 
_In_ PUNICODE_STRING DeviceName
 
_In_ CONST GUIDAliasInterfaceClassGuid
 
_In_opt_ PDEVICE_OBJECT PhysicalDeviceObject
 
_In_opt_ PDEVICE_OBJECT _In_ ULONG Flags
 
_In_ DEVICE_REGISTRY_PROPERTY DeviceProperty
 
_In_ DEVICE_REGISTRY_PROPERTY _In_ ULONG BufferLength
 
_Must_inspect_result_ _In_ PDEVICE_DESCRIPTION DeviceDescription
 
__drv_aliasesMem _In_ PVOID ClientIdentificationAddress
 
_In_ PIO_WORKITEM_ROUTINE WorkerRoutine
 
_In_ PIO_WORKITEM_ROUTINE _In_ WORK_QUEUE_TYPE QueueType
 
_In_ PIO_WORKITEM_ROUTINE _In_ WORK_QUEUE_TYPE _In_opt_ __drv_aliasesMem PVOID Context = Context
 
_In_ USHORT PacketSize
 
_In_ USHORT _In_ CCHAR StackSize
 
_In_ ULONG AllocateTag
 
_In_ ULONG _In_ ULONG MaxLockedMinutes
 
_In_ ULONG _In_ ULONG _In_ ULONG HighWatermark
 
_In_ PIO_TIMER_ROUTINE TimerRoutine
 
_In_ DEVICE_RELATION_TYPE Type
 
_In_ ACCESS_MASK _Out_ PHANDLE DeviceInterfaceKey
 
_In_ ULONG DevInstKeyType
 
_In_ ULONG _In_ ACCESS_MASK _Out_ PHANDLE DevInstRegKey
 
_In_ CONST GUIDInterfaceClassGuid
 
_In_ CONST GUID _In_opt_ PUNICODE_STRING ReferenceString
 
_In_ ULONG EventCategoryFlags
 
_In_ ULONG _In_opt_ PVOID EventCategoryData
 
_In_ ULONG _In_opt_ PVOID _In_ PDRIVER_OBJECT DriverObject
 
_In_ ULONG _In_opt_ PVOID _In_ PDRIVER_OBJECT _In_ PDRIVER_NOTIFICATION_CALLBACK_ROUTINE CallbackRoutine
 
_In_ PVOID NotificationStructure
 
_In_ PVOID _In_opt_ PDEVICE_CHANGE_COMPLETE_CALLBACK Callback
 
_In_ NTSTATUS Status
 
_In_ BOOLEAN Enable
 
_In_ BOOLEAN Cancelable
 
_In_ BOOLEAN _In_ ULONG Key
 
_In_ PIRP _In_opt_ PULONG _In_opt_ PDRIVER_CANCEL CancelFunction
 
_In_ ULONG InstanceCount
 
_In_ ULONG _Out_ ULONGFirstInstanceId
 
_In_ ULONG Action
 
_In_ PDEVICE_OBJECT _In_ ULONG NumberOfMapRegisters
 
_In_ PDEVICE_OBJECT _In_ ULONG _In_ PDRIVER_CONTROL ExecutionRoutine
 
_In_opt_ PVPB Vpb
 
_In_opt_ PVPB _In_ PDEVICE_OBJECT RealDeviceObject
 
_In_opt_ PUNICODE_STRING String
 
_In_opt_ PUNICODE_STRING _In_opt_ PKTHREAD Thread
 
_In_ PDRIVER_REINITIALIZE DriverReinitializationRoutine
 
_In_ INTERFACE_TYPE LegacyBusType
 
_In_ INTERFACE_TYPE _In_ ULONG BusNumber
 
_In_ INTERFACE_TYPE _In_ ULONG _In_ ULONG SlotNumber
 
_In_ INTERFACE_TYPE _In_ ULONG _In_ ULONG _In_opt_ PCM_RESOURCE_LIST ResourceList
 
_In_ INTERFACE_TYPE _In_ ULONG _In_ ULONG _In_opt_ PCM_RESOURCE_LIST _In_opt_ PIO_RESOURCE_REQUIREMENTS_LIST ResourceRequirements
 
_In_ INTERFACE_TYPE _In_ ULONG _In_ ULONG _In_opt_ PCM_RESOURCE_LIST _In_opt_ PIO_RESOURCE_REQUIREMENTS_LIST _In_ BOOLEAN ResourceAssigned
 
_In_ PIO_CSQ_INSERT_IRP CsqInsertIrp
 
_In_ PIO_CSQ_INSERT_IRP _In_ PIO_CSQ_REMOVE_IRP CsqRemoveIrp
 
_In_ PIO_CSQ_INSERT_IRP _In_ PIO_CSQ_REMOVE_IRP _In_ PIO_CSQ_PEEK_NEXT_IRP CsqPeekNextIrp
 
_In_ PIO_CSQ_INSERT_IRP _In_ PIO_CSQ_REMOVE_IRP _In_ PIO_CSQ_PEEK_NEXT_IRP _In_ PIO_CSQ_ACQUIRE_LOCK CsqAcquireLock
 
_In_ PIO_CSQ_INSERT_IRP _In_ PIO_CSQ_REMOVE_IRP _In_ PIO_CSQ_PEEK_NEXT_IRP _In_ PIO_CSQ_ACQUIRE_LOCK _In_ PIO_CSQ_RELEASE_LOCK CsqReleaseLock
 
_In_ PIO_CSQ_INSERT_IRP _In_ PIO_CSQ_REMOVE_IRP _In_ PIO_CSQ_PEEK_NEXT_IRP _In_ PIO_CSQ_ACQUIRE_LOCK _In_ PIO_CSQ_RELEASE_LOCK _In_ PIO_CSQ_COMPLETE_CANCELED_IRP CsqCompleteCanceledIrp
 
_In_ PIRP _In_ PIO_COMPLETION_ROUTINE CompletionRoutine = CompletionRoutine
 
_In_ PIRP _In_ PIO_COMPLETION_ROUTINE _In_opt_ PVOID _In_ BOOLEAN InvokeOnSuccess
 
_In_ PIRP _In_ PIO_COMPLETION_ROUTINE _In_opt_ PVOID _In_ BOOLEAN _In_ BOOLEAN InvokeOnError
 
_In_ PIRP _In_ PIO_COMPLETION_ROUTINE _In_opt_ PVOID _In_ BOOLEAN _In_ BOOLEAN _In_ BOOLEAN InvokeOnCancel
 
_In_ ULONG SectorSize
 
_In_ ULONG _In_ BOOLEAN ReturnRecognizedPartitions
 
_In_ ULONG _In_ BOOLEAN _Out_ struct _DRIVE_LAYOUT_INFORMATION ** PartitionBuffer
 
_In_ ULONG _In_ ULONG PartitionNumber
 
_In_ ULONG _In_ ULONG _In_ ULONG PartitionType
 
_In_ ULONG _In_ ULONG SectorsPerTrack
 
_In_ ULONG _In_ ULONG _In_ ULONG NumberOfHeads
 
_In_ ULONG _In_ struct _SET_PARTITION_INFORMATION_EXPartitionInfo
 
_In_opt_ PDEVICE_OBJECT _Out_opt_ PHANDLE FileObjectHandle
 
_In_ ULONG RequiredAccess
 
_In_ ULONG _In_ PHYSICAL_ADDRESS BusAddress
 
_In_ ULONG _In_ PHYSICAL_ADDRESS _Inout_ PULONG AddressSpace
 
_In_ ULONG _In_ PHYSICAL_ADDRESS _Inout_ PULONG _Out_ PPHYSICAL_ADDRESS TranslatedAddress
 
ActualNumberDriverObjects _In_ ULONG DriverObjectListSize
 
ActualNumberDriverObjects _In_ ULONG _Out_ PULONG ActualNumberDriverObjects
 
_In_ CONST DEVPROPKEYPropertyKey
 
_In_ CONST DEVPROPKEY _In_ LCID Lcid
 
_In_ CONST DEVPROPKEY _In_ LCID _In_ ULONG _In_ DEVPROPTYPE _In_ ULONG Size
 
_In_ CONST DEVPROPKEY _In_ LCID _In_ ULONG _In_ DEVPROPTYPE _In_ ULONG _In_opt_ PVOID Data
 
_In_ CONST DEVPROPKEY _In_ LCID _Reserved_ ULONG _In_ ULONG _Out_ PVOID _Out_ PULONG RequiredSize
 
_In_ struct _DISK_GEOMETRY_EXOldDiskGeometry
 
_In_ struct _DISK_GEOMETRY_EX _In_ struct _DISK_GEOMETRY_EXNewDiskGeometry
 
_In_ PDEVICE_OBJECT SparePdo
 
_Out_ PGROUP_AFFINITY GroupAffinity
 
_Out_ PUSHORT NodeNumber
 
_In_ PDRIVER_FS_NOTIFICATION _In_ BOOLEAN SynchronizeWithMounts
 
 irpSp = IoGetNextIrpStackLocation(Irp)
 
irpSp Control = 0
 
_In_opt_ PDRIVER_CANCEL CancelRoutine
 
_Out_ PULONG_PTR HighLimit
 

Macro Definition Documentation

◆ DEVICE_INTERFACE_INCLUDE_NONACTIVE

#define DEVICE_INTERFACE_INCLUDE_NONACTIVE   0x00000001

Definition at line 2852 of file iofuncs.h.

◆ IoAcquireRemoveLock

#define IoAcquireRemoveLock (   RemoveLock,
  Tag 
)    IoAcquireRemoveLockEx(RemoveLock, Tag, "", 1, sizeof (IO_REMOVE_LOCK))

◆ IoAdjustPagingPathCount

#define IoAdjustPagingPathCount (   _Count,
  _Increment 
)
Value:
{ \
if (_Increment) \
{ \
InterlockedIncrement(_Count); \
} \
else \
{ \
InterlockedDecrement(_Count); \
} \
}
_Check_return_ _Ret_maybenull_ _In_ size_t _Count
Definition: malloc.h:112

◆ IoAssignArcName

#define IoAssignArcName (   _ArcName,
  _DeviceName 
)
Value:
( \
IoCreateSymbolicLink((_ArcName), (_DeviceName)))

◆ IoCallDriver

#define IoCallDriver   IofCallDriver

Definition at line 755 of file iofuncs.h.

◆ IoCallDriverStackSafeDefault

#define IoCallDriverStackSafeDefault (   a,
  b 
)    IoCallDriver(a, b)

◆ IoCompleteRequest

#define IoCompleteRequest   IofCompleteRequest

Definition at line 764 of file iofuncs.h.

◆ IoDeassignArcName

#define IoDeassignArcName   IoDeleteSymbolicLink

◆ IoForwardAndCatchIrp

#define IoForwardAndCatchIrp   IoForwardIrpSynchronously

Definition at line 1920 of file iofuncs.h.

◆ IoGetFunctionCodeFromCtlCode

#define IoGetFunctionCodeFromCtlCode (   _ControlCode)    (((_ControlCode) >> 2) & 0x00000FFF)

Definition at line 2859 of file iofuncs.h.

◆ IoInitializeRemoveLock

#define IoInitializeRemoveLock (   Lock,
  AllocateTag,
  MaxLockedMinutes,
  HighWatermark 
)
Value:
VOID NTAPI IoInitializeRemoveLockEx(IN PIO_REMOVE_LOCK RemoveLock, IN ULONG AllocateTag, IN ULONG MaxLockedMinutes, IN ULONG HighWatermark, IN ULONG RemlockSize)
Definition: remlock.c:33
_In_ ULONG AllocateTag
Definition: iofuncs.h:1065
_Must_inspect_result_ _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFWAITLOCK * Lock
Definition: wdfsync.h:124
_In_ ULONG _In_ ULONG MaxLockedMinutes
Definition: iofuncs.h:1065
_In_ ULONG _In_ ULONG _In_ ULONG HighWatermark
Definition: iofuncs.h:1065

Definition at line 2829 of file iofuncs.h.

◆ IoIsErrorUserInduced

#define IoIsErrorUserInduced (   Status)
Value:
#define STATUS_NO_MEDIA_IN_DEVICE
Definition: udferr_usr.h:141
_In_ NTSTATUS Status
Definition: iofuncs.h:1228
#define STATUS_WRONG_VOLUME
Definition: udferr_usr.h:140
#define STATUS_VERIFY_REQUIRED
Definition: udferr_usr.h:130
#define STATUS_UNRECOGNIZED_MEDIA
Definition: udferr_usr.h:142
#define STATUS_MEDIA_WRITE_PROTECTED
Definition: udferr_usr.h:161
Status
Definition: gdiplustypes.h:24
#define STATUS_IO_TIMEOUT
Definition: udferr_usr.h:163
#define BOOLEAN
Definition: pedump.c:73
#define STATUS_DEVICE_NOT_READY
Definition: shellext.h:70

Definition at line 2813 of file iofuncs.h.

◆ IoIsFileOpenedExclusively

#define IoIsFileOpenedExclusively (   FileObject)
Value:
( \
(BOOLEAN) !( \
(FileObject)->SharedRead || \
(FileObject)->SharedWrite || \
(FileObject)->SharedDelete \
) \
)
_In_ WDFREQUEST _In_ WDFFILEOBJECT FileObject
Definition: wdfdevice.h:547
#define BOOLEAN
Definition: pedump.c:73
_In_ ULONG _Inout_ PFILE_OBJECT FileObject
Definition: iofuncs.h:779

◆ IoReleaseRemoveLock

#define IoReleaseRemoveLock (   _RemoveLock,
  _Tag 
)    IoReleaseRemoveLockEx(_RemoveLock, _Tag, sizeof(IO_REMOVE_LOCK))

Definition at line 2760 of file iofuncs.h.

◆ IoReleaseRemoveLockAndWait

#define IoReleaseRemoveLockAndWait (   _RemoveLock,
  _Tag 
)    IoReleaseRemoveLockAndWaitEx(_RemoveLock, _Tag, sizeof(IO_REMOVE_LOCK))

Definition at line 2770 of file iofuncs.h.

◆ IoSizeOfIrp

#define IoSizeOfIrp (   _StackSize)    ((USHORT) (sizeof(IRP) + ((_StackSize) * (sizeof(IO_STACK_LOCATION)))))

◆ IoWMIDeviceObjectToProviderId

#define IoWMIDeviceObjectToProviderId (   DeviceObject)    ((ULONG)(DeviceObject))

◆ PLUGPLAY_REGKEY_CURRENT_HWPROFILE

#define PLUGPLAY_REGKEY_CURRENT_HWPROFILE   4

Definition at line 2784 of file iofuncs.h.

◆ PLUGPLAY_REGKEY_DEVICE

#define PLUGPLAY_REGKEY_DEVICE   1

Definition at line 2782 of file iofuncs.h.

◆ PLUGPLAY_REGKEY_DRIVER

#define PLUGPLAY_REGKEY_DRIVER   2

Definition at line 2783 of file iofuncs.h.

Function Documentation

◆ $endif() [1/3]

$endif ( _WDMDDK_  )

Definition at line 550 of file iofuncs.h.

572 {
574  DriverContext->Size = sizeof(IO_DRIVER_CREATE_CONTEXT);
575 }
struct _IO_DRIVER_CREATE_CONTEXT IO_DRIVER_CREATE_CONTEXT
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
_In_ UCHAR _In_ UCHAR _In_ ULONG _In_ WDFCONTEXT DriverContext
Definition: wdfdevice.h:1697

◆ $endif() [2/3]

$endif ( _NTDDK_  )

Definition at line 2490 of file iofuncs.h.

2498 {
2499  PriorityInfo->Size = sizeof(IO_PRIORITY_INFO);
2500  PriorityInfo->ThreadPriority = 0xffff;
2501  PriorityInfo->IoPriority = IoPriorityNormal;
2502  PriorityInfo->PagePriority = 0;
2503 }
struct _IO_PRIORITY_INFO IO_PRIORITY_INFO
_In_opt_ PFILE_OBJECT _In_opt_ PETHREAD _Inout_ PIO_PRIORITY_INFO PriorityInfo
Definition: fltkernel.h:2653

◆ $endif() [3/3]

$endif ( _NTIFS_  )

Definition at line 2827 of file rtlfuncs.h.

2841 {
2843  ret.QuadPart = SignedInteger;
2844  return ret;
2845 }
return ret
Definition: rtlfuncs.h:3092

◆ $if()

$if ( _WDMDDK_  )

Kernel definitions for AMD64

Kernel definitions for ARM

Definition at line 1 of file ke.h.

31 {
32  ULONG Dummy;
struct _KFLOATING_SAVE KFLOATING_SAVE
struct _KFLOATING_SAVE * PKFLOATING_SAVE
unsigned int ULONG
Definition: retypes.h:1

◆ __drv_allocatesMem()

__drv_allocatesMem ( Mem  )

Definition at line 322 of file xferpkt.c.

324  :28195) // This function may not allocate memory in some error cases.
325 #endif
326 PTRANSFER_PACKET NewTransferPacket(PDEVICE_OBJECT Fdo)
327 {
328  PFUNCTIONAL_DEVICE_EXTENSION fdoExt = Fdo->DeviceExtension;
329  PCLASS_PRIVATE_FDO_DATA fdoData = fdoExt->PrivateFdoData;
330  PTRANSFER_PACKET newPkt = NULL;
331  ULONG transferLength = (ULONG)-1;
333 
334  if (NT_SUCCESS(status)) {
335  status = RtlULongAdd(fdoData->HwMaxXferLen, PAGE_SIZE, &transferLength);
336  if (!NT_SUCCESS(status)) {
337 
338  TracePrint((TRACE_LEVEL_ERROR, TRACE_FLAG_RW, "Integer overflow in calculating transfer packet size."));
340  }
341  }
342 
343  /*
344  * Allocate the actual packet.
345  */
346  if (NT_SUCCESS(status)) {
347  newPkt = ExAllocatePoolWithTag(NonPagedPoolNx, sizeof(TRANSFER_PACKET), 'pnPC');
348  if (newPkt == NULL) {
349  TracePrint((TRACE_LEVEL_WARNING, TRACE_FLAG_RW, "Failed to allocate transfer packet."));
351  } else {
352  RtlZeroMemory(newPkt, sizeof(TRANSFER_PACKET));
354  if (fdoExt->AdapterDescriptor->SrbType == SRB_TYPE_STORAGE_REQUEST_BLOCK) {
355 #if (NTDDI_VERSION >= NTDDI_WINBLUE)
356  if ((fdoExt->MiniportDescriptor != NULL) &&
357  (fdoExt->MiniportDescriptor->Size >= RTL_SIZEOF_THROUGH_FIELD(STORAGE_MINIPORT_DESCRIPTOR, ExtraIoInfoSupported)) &&
358  (fdoExt->MiniportDescriptor->ExtraIoInfoSupported == TRUE)) {
360  fdoExt->AdapterDescriptor->AddressType,
362  NULL,
363  2,
366  );
367  } else {
369  fdoExt->AdapterDescriptor->AddressType,
371  NULL,
372  1,
374  );
375  }
376 #else
378  fdoExt->AdapterDescriptor->AddressType,
380  NULL,
381  1,
383  );
384 #endif
385  } else {
386 #ifdef _MSC_VER
387 #pragma prefast(suppress:6014, "The allocated memory that Pkt->Srb points to will be freed in DestroyTransferPacket().")
388 #endif
389  newPkt->Srb = ExAllocatePoolWithTag(NonPagedPoolNx, sizeof(SCSI_REQUEST_BLOCK), '-brs');
390  if (newPkt->Srb == NULL) {
392  }
393 
394  }
395 
396  if (status != STATUS_SUCCESS)
397  {
398  TracePrint((TRACE_LEVEL_WARNING, TRACE_FLAG_RW, "Failed to allocate SRB."));
399  FREE_POOL(newPkt);
400  }
401  }
402  }
403 
404  /*
405  * Allocate Irp for the packet.
406  */
407  if (NT_SUCCESS(status) && newPkt != NULL) {
408  newPkt->Irp = IoAllocateIrp(Fdo->StackSize, FALSE);
409  if (newPkt->Irp == NULL) {
410  TracePrint((TRACE_LEVEL_WARNING, TRACE_FLAG_RW, "Failed to allocate IRP for transfer packet."));
412  }
413  }
414 
415  /*
416  * Allocate a MDL. Add one page to the length to insure an extra page
417  * entry is allocated if the buffer does not start on page boundaries.
418  */
419  if (NT_SUCCESS(status) && newPkt != NULL) {
420 
421  NT_ASSERT(transferLength != (ULONG)-1);
422 
423  newPkt->PartialMdl = IoAllocateMdl(NULL,
424  transferLength,
425  FALSE,
426  FALSE,
427  NULL);
428  if (newPkt->PartialMdl == NULL) {
429  TracePrint((TRACE_LEVEL_WARNING, TRACE_FLAG_RW, "Failed to allocate MDL for transfer packet."));
431  } else {
432  NT_ASSERT(newPkt->PartialMdl->Size >= (CSHORT)(sizeof(MDL) + BYTES_TO_PAGES(fdoData->HwMaxXferLen) * sizeof(PFN_NUMBER)));
433  }
434 
435  }
436 
437  /*
438  * Allocate per-packet retry history, if required
439  */
440  if (NT_SUCCESS(status) &&
441  (fdoData->InterpretSenseInfo != NULL) &&
442  (newPkt != NULL)
443  ) {
444  // attempt to allocate also the history
445  ULONG historyByteCount = 0;
446 
447  // SAL annotation and ClassInitializeEx() should both catch this case
448  NT_ASSERT(fdoData->InterpretSenseInfo->HistoryCount != 0);
449  _Analysis_assume_(fdoData->InterpretSenseInfo->HistoryCount != 0);
450 
451  historyByteCount = sizeof(SRB_HISTORY_ITEM) * fdoData->InterpretSenseInfo->HistoryCount;
452  historyByteCount += sizeof(SRB_HISTORY) - sizeof(SRB_HISTORY_ITEM);
453 
454  newPkt->RetryHistory = (PSRB_HISTORY)ExAllocatePoolWithTag(NonPagedPoolNx, historyByteCount, 'hrPC');
455 
456  if (newPkt->RetryHistory == NULL) {
457  TracePrint((TRACE_LEVEL_WARNING, TRACE_FLAG_RW, "Failed to allocate MDL for transfer packet."));
459  } else {
460  // call this routine directly once since it's the first initialization of
461  // the structure and the internal maximum count field is not yet setup.
462  HistoryInitializeRetryLogs(newPkt->RetryHistory, fdoData->InterpretSenseInfo->HistoryCount);
463  }
464  }
465 
466  /*
467  * Enqueue the packet in our static AllTransferPacketsList
468  * (just so we can find it during debugging if its stuck somewhere).
469  */
470  if (NT_SUCCESS(status) && newPkt != NULL)
471  {
472  KIRQL oldIrql;
473  newPkt->Fdo = Fdo;
474 #if DBG
475  newPkt->DbgPktId = InterlockedIncrement((volatile LONG *)&fdoData->DbgMaxPktId);
476 #endif
477  KeAcquireSpinLock(&fdoData->SpinLock, &oldIrql);
479  KeReleaseSpinLock(&fdoData->SpinLock, oldIrql);
480 
481  } else {
482  // free any resources acquired above (in reverse order)
483  if (newPkt != NULL) {
484  FREE_POOL(newPkt->RetryHistory);
485  if (newPkt->PartialMdl != NULL) { IoFreeMdl(newPkt->PartialMdl); }
486  if (newPkt->Irp != NULL) { IoFreeIrp(newPkt->Irp); }
487  if (newPkt->Srb != NULL) { FREE_POOL(newPkt->Srb); }
488  FREE_POOL(newPkt);
489  }
490  }
491 
492  return newPkt;
493 }
#define SRB_TYPE_STORAGE_REQUEST_BLOCK
Definition: srb.h:655
#define STATUS_INSUFFICIENT_RESOURCES
Definition: udferr_usr.h:158
struct _SRB_HISTORY_ITEM SRB_HISTORY_ITEM
#define TRUE
Definition: types.h:120
LONG NTSTATUS
Definition: precomp.h:26
KSPIN_LOCK SpinLock
Definition: classp.h:795
PSTORAGE_REQUEST_BLOCK_HEADER Srb
Definition: classp.h:580
NTKRNLVISTAAPI USHORT NTAPI KeGetCurrentNodeNumber(VOID)
LIST_ENTRY AllPktsListEntry
Definition: classp.h:499
LIST_ENTRY AllTransferPacketsList
Definition: classp.h:771
#define InsertTailList(ListHead, Entry)
UCHAR KIRQL
Definition: env_spec_w32.h:591
ULONG PFN_NUMBER
Definition: ke.h:8
#define FALSE
Definition: types.h:117
#define FREE_POOL(_PoolPtr)
Definition: cdrom.h:782
#define STATUS_INTEGER_OVERFLOW
Definition: ntstatus.h:385
long LONG
Definition: pedump.c:60
PVOID DefaultStorageRequestBlockAllocateRoutine(_In_ CLONG ByteSize)
Definition: srblib.c:28
PDEVICE_OBJECT Fdo
Definition: classp.h:503
* PSTORAGE_REQUEST_BLOCK
Definition: srb.h:652
struct _SRB_HISTORY * PSRB_HISTORY
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
PSRB_HISTORY RetryHistory
Definition: classp.h:598
PSTORAGE_ADAPTER_DESCRIPTOR AdapterDescriptor
Definition: classpnp.h:877
#define KeAcquireSpinLock(sl, irql)
Definition: env_spec_w32.h:609
#define RTL_SIZEOF_THROUGH_FIELD(type, field)
Definition: ntbasedef.h:673
VOID NTAPI IoFreeMdl(PMDL Mdl)
Definition: iomdl.c:146
#define ExAllocatePoolWithTag(hernya, size, tag)
Definition: env_spec_w32.h:350
_Must_inspect_result_ _In_ WDFDEVICE Fdo
Definition: wdffdo.h:461
#define BYTES_TO_PAGES(Size)
MDL
Definition: mmtypes.h:117
#define PAGE_SIZE
Definition: env_spec_w32.h:49
NTSTATUS CreateStorageRequestBlock(_Inout_ PSTORAGE_REQUEST_BLOCK *Srb, _In_ USHORT AddressType, _In_opt_ PSRB_ALLOCATE_ROUTINE AllocateRoutine, _Inout_opt_ ULONG *ByteSize, _In_ ULONG NumSrbExData,...)
Definition: srblib.c:249
#define TRACE_LEVEL_ERROR
Definition: storswtr.h:27
#define TRACE_LEVEL_WARNING
Definition: storswtr.h:28
PMDL NTAPI IoAllocateMdl(IN PVOID VirtualAddress, IN ULONG Length, IN BOOLEAN SecondaryBuffer, IN BOOLEAN ChargeQuota, IN PIRP Irp)
Definition: iomdl.c:22
#define InterlockedIncrement
Definition: armddk.h:53
#define _Analysis_assume_
Definition: no_sal2.h:388
#define NULL
Definition: types.h:112
#define KeReleaseSpinLock(sl, irql)
Definition: env_spec_w32.h:627
VOID HistoryInitializeRetryLogs(_Out_ PSRB_HISTORY History, ULONG HistoryCount)
Definition: history.c:36
PMDL PartialMdl
Definition: classp.h:596
VOID NTAPI IoFreeIrp(IN PIRP Irp)
Definition: irp.c:1666
unsigned int ULONG
Definition: retypes.h:1
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
PIRP NTAPI IoAllocateIrp(IN CCHAR StackSize, IN BOOLEAN ChargeQuota)
Definition: irp.c:615
#define STATUS_SUCCESS
Definition: shellext.h:65
PCLASS_INTERPRET_SENSE_INFO2 InterpretSenseInfo
Definition: classp.h:958
short CSHORT
Definition: umtypes.h:127
ULONG AllocateNode
Definition: classp.h:611
#define NT_ASSERT
Definition: rtlfuncs.h:3312
Definition: ps.c:97

◆ __drv_freesMem()

__drv_freesMem ( Mem  )

Definition at line 1523 of file exfuncs.h.

1524 {
1525  Lookaside->L.TotalFrees++;
1526 #ifdef NONAMELESSUNION
1527  if (ExQueryDepthSList(&Lookaside->L.u.ListHead) >= Lookaside->L.Depth) {
1528  Lookaside->L.u3.FreeMisses++;
1529  (Lookaside->L.u5.Free)(Entry);
1530  } else {
1531 #if defined(_WIN2K_COMPAT_SLIST_USAGE) && defined(_X86_)
1532  ExInterlockedPushEntrySList(&Lookaside->L.u.ListHead,
1534  &Lookaside->Lock__ObsoleteButDoNotDelete);
1535 #else
1537 #endif
1538  }
1539 #else /* NONAMELESSUNION */
1540  if (ExQueryDepthSList(&Lookaside->L.ListHead) >= Lookaside->L.Depth) {
1541  Lookaside->L.FreeMisses++;
1542  (Lookaside->L.Free)(Entry);
1543  } else {
1544 #if defined(_WIN2K_COMPAT_SLIST_USAGE) && defined(_X86_)
1547  &Lookaside->Lock__ObsoleteButDoNotDelete);
1548 #else
1550 #endif
1551  }
1552 #endif /* NONAMELESSUNION */
1553 }
#define ExInterlockedPushEntrySList(SListHead, SListEntry, Lock)
Definition: exfuncs.h:163
_Must_inspect_result_ _In_opt_ PWDF_OBJECT_ATTRIBUTES _In_ _In_ _Strict_type_match_ POOL_TYPE _In_opt_ PWDF_OBJECT_ATTRIBUTES _In_opt_ ULONG _Out_ WDFLOOKASIDE * Lookaside
Definition: wdfmemory.h:407
#define PSLIST_ENTRY
Definition: rtltypes.h:134
FORCEINLINE USHORT ExQueryDepthSList(_In_ PSLIST_HEADER SListHead)
Definition: exfuncs.h:153
NTKERNELAPI PSLIST_ENTRY FASTCALL InterlockedPushEntrySList(IN PSLIST_HEADER ListHead, IN PSLIST_ENTRY ListEntry)
Definition: interlocked.c:82
base of all file and directory entries
Definition: entries.h:82

◆ __drv_reportError()

_In_ __drv_reportError ( "MajorVersion must be 1 or 6"  )

◆ _At_() [1/2]

_At_ ( PropertyBuffer  ,
_Post_z_   
) &

◆ _At_() [2/2]

_At_ ( PropertyBuffer  ,
_Post_  _NullNull_terminated_ 
)

◆ _Deref_out_range_()

_In_ DEVICE_REGISTRY_PROPERTY _In_ ULONG _Deref_out_range_ ( <=  ,
BufferLength   
)

Definition at line 648 of file wdfiotarget.h.

651 {
653 }
_Must_inspect_result_ _In_ WDFIOTARGET _In_ DEVICE_REGISTRY_PROPERTY _In_ ULONG _Out_opt_ PVOID PropertyBuffer
Definition: wdfiotarget.h:629
_Must_inspect_result_ _In_ WDFIOTARGET _In_ DEVICE_REGISTRY_PROPERTY _In_ ULONG BufferLength
Definition: wdfiotarget.h:622
#define WdfFunctions
Definition: wdf.h:66
PWDF_DRIVER_GLOBALS WdfDriverGlobals
_Must_inspect_result_ _In_ WDFIOTARGET _In_ DEVICE_REGISTRY_PROPERTY DeviceProperty
Definition: wdfiotarget.h:622
_Must_inspect_result_ _In_ WDFDEVICE _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFIOTARGET * IoTarget
Definition: wdfiotarget.h:363
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ ULONG _Out_ PULONG ResultLength
Definition: wdfdevice.h:3776

◆ _In_reads_()

_In_reads_ ( _Inexpressible_(FIELD_OFFSET(DRIVE_LAYOUT_INFORMATION_EX, PartitionEntry[0]))  )

◆ _In_reads_bytes_opt_()

◆ _IRQL_requires_max_() [1/4]

_IRQL_requires_max_ ( DISPATCH_LEVEL  )

Definition at line 3557 of file common.c.

3587 {
3588  NTSTATUS status;
3589  BOOLEAN requestSent = FALSE;
3590 
3591  BOOLEAN shouldRetry = TRUE;
3592  PCDB cdb = (PCDB)DeviceExtension->PowerContext.Srb.Cdb;
3593  ULONG timeoutValue = DeviceExtension->TimeOutValue;
3594  ULONG retryCount = 1;
3595 
3596  // reset some fields.
3597  DeviceExtension->PowerContext.RetryIntervalIn100ns = 0;
3598  status = PowerContextReuseRequest(DeviceExtension);
3599  RequestClearSendTime(DeviceExtension->PowerContext.PowerRequest);
3600 
3601  if (!NT_SUCCESS(status))
3602  {
3603  return status;
3604  }
3605 
3606  // set proper timeout value and max retry count.
3607  switch(DeviceExtension->PowerContext.PowerChangeState.PowerDown)
3608  {
3612  break;
3613 
3614  case PowerDownDeviceLocked:
3615  // Case of issuing SYNC CACHE command. Do not use power irp timeout remaining time in this case
3616  // as we want to give best try on SYNC CACHE command.
3617  retryCount = MAXIMUM_RETRIES;
3618  timeoutValue = DeviceExtension->TimeOutValue;
3619  break;
3620 
3622  {
3623  // Case of issuing STOP UNIT command
3624  // As "Imme" bit is set to '1', this command should be completed in short time.
3625  // This command is at low importance, failure of this command has very small impact.
3626  ULONG secondsRemaining = 0;
3627 
3628 #if (WINVER >= 0x0601)
3629  // this API is introduced in Windows7
3630  PoQueryWatchdogTime(DeviceExtension->LowerPdo, &secondsRemaining);
3631 #endif
3632 
3633  if (secondsRemaining == 0)
3634  {
3635  // not able to retrieve remaining time from PoQueryWatchdogTime API, use default values.
3636  retryCount = MAXIMUM_RETRIES;
3637  timeoutValue = SCSI_CDROM_TIMEOUT;
3638  }
3639  else
3640  {
3641  // plan to leave about 30 seconds to lower level drivers if possible.
3642  if (secondsRemaining >= 32)
3643  {
3644  retryCount = (secondsRemaining - 30)/SCSI_CDROM_TIMEOUT + 1;
3645  timeoutValue = SCSI_CDROM_TIMEOUT;
3646 
3647  if (retryCount > MAXIMUM_RETRIES)
3648  {
3649  retryCount = MAXIMUM_RETRIES;
3650  }
3651 
3652  if (retryCount == 1)
3653  {
3654  timeoutValue = secondsRemaining - 30;
3655  }
3656  }
3657  else
3658  {
3659  // issue the command with minimal timeout value and do not retry on it.
3660  retryCount = 1;
3661  timeoutValue = 2;
3662  }
3663  }
3664  }
3665  break;
3666  default:
3667  NT_ASSERT( FALSE );
3669  return status;
3670  }
3671 
3672  DeviceExtension->PowerContext.RetryCount = retryCount;
3673 
3674  // issue command.
3675  while (shouldRetry)
3676  {
3677 
3678  // set SRB fields.
3679  DeviceExtension->PowerContext.Srb.SrbFlags = SRB_FLAGS_NO_DATA_TRANSFER |
3684 
3685  DeviceExtension->PowerContext.Srb.Function = SRB_FUNCTION_EXECUTE_SCSI;
3686  DeviceExtension->PowerContext.Srb.TimeOutValue = timeoutValue;
3687 
3688  if (DeviceExtension->PowerContext.PowerChangeState.PowerDown == PowerDownDeviceInitial)
3689  {
3690  DeviceExtension->PowerContext.Srb.Function = SRB_FUNCTION_LOCK_QUEUE;
3691  }
3692  else if (DeviceExtension->PowerContext.PowerChangeState.PowerDown == PowerDownDeviceLocked)
3693  {
3694  DeviceExtension->PowerContext.Srb.Function = SRB_FUNCTION_QUIESCE_DEVICE;
3695  }
3696  else if (DeviceExtension->PowerContext.PowerChangeState.PowerDown == PowerDownDeviceQuiesced)
3697  {
3698  // Case of issuing SYNC CACHE command.
3699  DeviceExtension->PowerContext.Srb.CdbLength = 10;
3700  cdb->SYNCHRONIZE_CACHE10.OperationCode = SCSIOP_SYNCHRONIZE_CACHE;
3701  }
3702  else if (DeviceExtension->PowerContext.PowerChangeState.PowerDown == PowerDownDeviceFlushed)
3703  {
3704  // Case of issuing STOP UNIT command.
3705  DeviceExtension->PowerContext.Srb.CdbLength = 6;
3706  cdb->START_STOP.OperationCode = SCSIOP_START_STOP_UNIT;
3707  cdb->START_STOP.Start = 0;
3708  cdb->START_STOP.Immediate = 1;
3709  }
3710  else if (DeviceExtension->PowerContext.PowerChangeState.PowerDown == PowerDownDeviceStopped)
3711  {
3712  DeviceExtension->PowerContext.Srb.Function = SRB_FUNCTION_UNLOCK_QUEUE;
3713  }
3714 
3715  // Set up completion routine and context if requested
3716  if (CompletionRoutine)
3717  {
3718  WdfRequestSetCompletionRoutine(DeviceExtension->PowerContext.PowerRequest,
3720  Context);
3721  }
3722 
3723  status = RequestSend(DeviceExtension,
3724  DeviceExtension->PowerContext.PowerRequest,
3725  DeviceExtension->IoTarget,
3727  &requestSent);
3728 
3729  if (requestSent)
3730  {
3731  if ((CompletionRoutine == NULL) &&
3732  (SRB_STATUS(DeviceExtension->PowerContext.Srb.SrbStatus) != SRB_STATUS_SUCCESS))
3733  {
3734  TracePrint((TRACE_LEVEL_ERROR,
3735  TRACE_FLAG_POWER,
3736  "%p\tError occured when issuing %s command to device. Srb %p, Status %x\n",
3737  DeviceExtension->PowerContext.PowerRequest,
3738  (DeviceExtension->PowerContext.PowerChangeState.PowerDown == PowerDownDeviceQuiesced) ? "SYNC CACHE" : "STOP UNIT",
3739  &DeviceExtension->PowerContext.Srb,
3740  DeviceExtension->PowerContext.Srb.SrbStatus));
3741 
3742  NT_ASSERT(!(TEST_FLAG(DeviceExtension->PowerContext.Srb.SrbStatus, SRB_STATUS_QUEUE_FROZEN)));
3743 
3744  shouldRetry = RequestSenseInfoInterpret(DeviceExtension,
3745  DeviceExtension->PowerContext.PowerRequest,
3746  &(DeviceExtension->PowerContext.Srb),
3747  retryCount - DeviceExtension->PowerContext.RetryCount,
3748  &status,
3749  &(DeviceExtension->PowerContext.RetryIntervalIn100ns));
3750 
3751  if (shouldRetry && (DeviceExtension->PowerContext.RetryCount-- == 0))
3752  {
3753  shouldRetry = FALSE;
3754  }
3755  }
3756  else
3757  {
3758  // succeeded, do not need to retry.
3759  shouldRetry = FALSE;
3760  }
3761 
3762  }
3763  else
3764  {
3765  // request failed to be sent
3766  shouldRetry = FALSE;
3767  }
3768 
3769  if (shouldRetry)
3770  {
3771  LARGE_INTEGER t;
3772  t.QuadPart = -DeviceExtension->PowerContext.RetryIntervalIn100ns;
3774 
3775  status = PowerContextReuseRequest(DeviceExtension);
3776  if (!NT_SUCCESS(status))
3777  {
3778  shouldRetry = FALSE;
3779  }
3780  }
3781  }
3782 
3783  if (DeviceExtension->PowerContext.PowerChangeState.PowerDown == PowerDownDeviceQuiesced)
3784  {
3785  // record SYNC CACHE command completion time stamp.
3786  KeQueryTickCount(&DeviceExtension->PowerContext.Step1CompleteTime);
3787  }
3788 
3789  return status;
3790 }
#define SRB_FUNCTION_UNLOCK_QUEUE
Definition: srb.h:325
#define SCSIOP_SYNCHRONIZE_CACHE
Definition: cdrw_hw.h:918
#define SRB_FUNCTION_QUIESCE_DEVICE
Definition: srb.h:90
#define SRB_FLAGS_NO_QUEUE_FREEZE
Definition: srb.h:396
#define TRUE
Definition: types.h:120
Definition: cdrw_hw.h:28
LONG NTSTATUS
Definition: precomp.h:26
struct _CDB::_SYNCHRONIZE_CACHE10 SYNCHRONIZE_CACHE10
GLdouble GLdouble t
Definition: gl.h:2047
#define SRB_STATUS(Status)
Definition: srb.h:381
VOID RequestClearSendTime(_In_ WDFREQUEST Request)
Definition: common.c:111
#define MAXIMUM_RETRIES
Definition: cdrom.h:124
return STATUS_NOT_IMPLEMENTED
#define SCSI_CDROM_TIMEOUT
Definition: cdrom.c:170
#define FALSE
Definition: types.h:117
NTSTATUS NTAPI KeDelayExecutionThread(IN KPROCESSOR_MODE WaitMode, IN BOOLEAN Alertable, IN PLARGE_INTEGER Interval OPTIONAL)
Definition: wait.c:283
#define SRB_FLAGS_BYPASS_LOCKED_QUEUE
Definition: srb.h:402
unsigned char BOOLEAN
union _CDB * PCDB
struct _CDB::_START_STOP START_STOP
VOID NTAPI KeQueryTickCount(IN PLARGE_INTEGER TickCount)
Definition: clock.c:165
#define TEST_FLAG(Flags, Bit)
Definition: cdrom.h:1495
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
#define SRB_FLAGS_DISABLE_SYNCH_TRANSFER
Definition: srb.h:389
#define SRB_FLAGS_NO_DATA_TRANSFER
Definition: srb.h:394
BOOLEAN RequestSenseInfoInterpret(_In_ PCDROM_DEVICE_EXTENSION DeviceExtension, _In_ WDFREQUEST Request, _In_ PSCSI_REQUEST_BLOCK Srb, _In_ ULONG RetriedCount, _Out_ NTSTATUS *Status, _Out_opt_ _Deref_out_range_(0, MAXIMUM_RETRY_FOR_SINGLE_IO_IN_100NS_UNITS) LONGLONG *RetryIntervalIn100ns)
Definition: sense.c:2467
#define SRB_STATUS_QUEUE_FROZEN
Definition: srb.h:378
NTSTATUS RequestSend(_In_ PCDROM_DEVICE_EXTENSION DeviceExtension, _In_ WDFREQUEST Request, _In_ WDFIOTARGET IoTarget, _In_ ULONG Flags, _Out_opt_ PBOOLEAN RequestSent)
Definition: common.c:3793
#define TRACE_LEVEL_ERROR
Definition: storswtr.h:27
_In_ WDFREQUEST _In_opt_ PFN_WDF_REQUEST_COMPLETION_ROUTINE CompletionRoutine
Definition: wdfrequest.h:893
#define NULL
Definition: types.h:112
#define SRB_FUNCTION_EXECUTE_SCSI
Definition: srb.h:307
unsigned int ULONG
Definition: retypes.h:1
#define SRB_STATUS_SUCCESS
Definition: srb.h:333
#define SRB_FLAGS_D3_PROCESSING
Definition: srb.h:156
static SERVICE_STATUS status
Definition: service.c:31
#define SCSIOP_START_STOP_UNIT
Definition: cdrw_hw.h:897
#define SRB_FUNCTION_LOCK_QUEUE
Definition: srb.h:324
#define NT_ASSERT
Definition: rtlfuncs.h:3312
Definition: ps.c:97

◆ _IRQL_requires_max_() [2/4]

_IRQL_requires_max_ ( APC_LEVEL  )

Definition at line 2883 of file iofuncs.h.

2887 {
2888  ULONG_PTR End, Begin;
2889  ULONG_PTR Result;
2890 
2891  IoGetStackLimits(&Begin, &End);
2892  Result = (ULONG_PTR)(&End) - Begin;
2893  return Result;
2894 }
uint32_t ULONG_PTR
Definition: typedefs.h:65
_At_(*)(_In_ PWSK_CLIENT Client, _In_opt_ PUNICODE_STRING NodeName, _In_opt_ PUNICODE_STRING ServiceName, _In_opt_ ULONG NameSpace, _In_opt_ GUID *Provider, _In_opt_ PADDRINFOEXW Hints, _Outptr_ PADDRINFOEXW *Result, _In_opt_ PEPROCESS OwningProcess, _In_opt_ PETHREAD OwningThread, _Inout_ PIRP Irp Result)(Mem)) NTSTATUS(WSKAPI *PFN_WSK_GET_ADDRESS_INFO
Definition: wsk.h:426
VOID NTAPI IoGetStackLimits(OUT PULONG_PTR LowLimit, OUT PULONG_PTR HighLimit)
Definition: util.c:78
#define ULONG_PTR
Definition: config.h:101
ACPI_BUFFER *RetBuffer ACPI_BUFFER *RetBuffer char ACPI_WALK_RESOURCE_CALLBACK void *Context ACPI_BUFFER *RetBuffer UINT16 ACPI_RESOURCE **ResourcePtr ACPI_GENERIC_ADDRESS *Reg UINT32 *ReturnValue UINT8 UINT8 *Slp_TypB ACPI_PHYSICAL_ADDRESS PhysicalAddress64 UINT32 UINT32 *TimeElapsed UINT32 ACPI_STATUS const char UINT32 ACPI_STATUS const char UINT32 const char const char UINT32 const char BOOLEAN Begin
Definition: acpixf.h:1297

◆ _IRQL_requires_max_() [3/4]

Definition at line 64 of file Messaging.c.

75 {
76  PFLT_SERVER_PORT_OBJECT PortObject;
78 
79  /* The caller must allow at least one connection */
80  if (MaxConnections == 0)
81  {
83  }
84 
85  /* The request must be for a kernel handle */
86  if (!(ObjectAttributes->Attributes & OBJ_KERNEL_HANDLE))
87  {
89  }
90 
91  /*
92  * Get rundown protection on the target to stop the owner
93  * from unloading whilst this port object is open. It gets
94  * removed in the FltpServerPortClose callback
95  */
97  if (!NT_SUCCESS(Status))
98  {
99  return Status;
100  }
101 
102  /* Create the server port object for this filter */
106  KernelMode,
107  NULL,
108  sizeof(FLT_SERVER_PORT_OBJECT),
109  0,
110  0,
111  (PVOID *)&PortObject);
112  if (NT_SUCCESS(Status))
113  {
114  /* Zero out the struct */
115  RtlZeroMemory(PortObject, sizeof(FLT_SERVER_PORT_OBJECT));
116 
117  /* Increment the ref count on the target filter */
119 
120  /* Setup the filter port object */
121  PortObject->Filter = Filter;
122  PortObject->ConnectNotify = ConnectNotifyCallback;
124  PortObject->MessageNotify = MessageNotifyCallback;
125  PortObject->Cookie = ServerPortCookie;
126  PortObject->MaxConnections = MaxConnections;
127 
128  /* Insert the object */
129  Status = ObInsertObject(PortObject,
130  NULL,
132  0,
133  NULL,
135  if (NT_SUCCESS(Status))
136  {
137  /* Lock the connection list */
139 
140  /* Add the new port object to the connection list and increment the count */
143 
144  /* Unlock the connection list*/
146  }
147  }
148 
149  if (!NT_SUCCESS(Status))
150  {
151  /* Allow the filter to be cleaned up */
153  }
154 
155  return Status;
156 }
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
Definition: conport.c:35
#define STATUS_INVALID_PARAMETER
Definition: udferr_usr.h:135
_Must_inspect_result_ _Outptr_ PFLT_PORT * ServerPort
Definition: fltkernel.h:1873
PFLT_CONNECT_NOTIFY ConnectNotify
Definition: fltmgrint.h:191
VOID FLTAPI FltObjectDereference(_Inout_ PVOID Object)
Definition: Object.c:53
LONG NTSTATUS
Definition: precomp.h:26
#define InsertTailList(ListHead, Entry)
#define OBJ_KERNEL_HANDLE
Definition: winternl.h:231
VOID FASTCALL ExReleaseFastMutex(IN PFAST_MUTEX FastMutex)
Definition: fmutex.c:31
ULONG FltpObjectPointerReference(_In_ PFLT_OBJECT Object)
Definition: Object.c:322
LIST_ENTRY mList
Definition: fltmgrint.h:56
_Must_inspect_result_ _In_opt_ PFLT_FILTER Filter
Definition: fltkernel.h:1802
#define FILE_READ_DATA
Definition: nt_native.h:628
NTSTATUS NTAPI ObCreateObject(IN KPROCESSOR_MODE ProbeMode OPTIONAL, IN POBJECT_TYPE Type, IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL, IN KPROCESSOR_MODE AccessMode, IN OUT PVOID ParseContext OPTIONAL, IN ULONG ObjectSize, IN ULONG PagedPoolCharge OPTIONAL, IN ULONG NonPagedPoolCharge OPTIONAL, OUT PVOID *Object)
Definition: oblife.c:952
Status
Definition: gdiplustypes.h:24
POBJECT_TYPE ServerPortObjectType
Definition: Messaging.c:24
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
_Must_inspect_result_ _Outptr_ PFLT_PORT _In_ POBJECT_ATTRIBUTES _In_opt_ PVOID _In_ PFLT_CONNECT_NOTIFY _In_ PFLT_DISCONNECT_NOTIFY DisconnectNotifyCallback
Definition: fltkernel.h:1873
PVOID *typedef PHANDLE
Definition: ntsecpkg.h:454
_Must_inspect_result_ _Outptr_ PFLT_PORT _In_ POBJECT_ATTRIBUTES _In_opt_ PVOID _In_ PFLT_CONNECT_NOTIFY ConnectNotifyCallback
Definition: fltkernel.h:1873
NTSTATUS NTAPI ObInsertObject(IN PVOID Object, IN PACCESS_STATE AccessState OPTIONAL, IN ACCESS_MASK DesiredAccess, IN ULONG ObjectPointerBias, OUT PVOID *NewObject OPTIONAL, OUT PHANDLE Handle)
Definition: obhandle.c:2932
#define STANDARD_RIGHTS_ALL
Definition: nt_native.h:69
VOID FASTCALL ExAcquireFastMutex(IN PFAST_MUTEX FastMutex)
Definition: fmutex.c:23
NTSTATUS FLTAPI FltObjectReference(_Inout_ PVOID Object)
Definition: Object.c:41
_Must_inspect_result_ _Outptr_ PFLT_PORT _In_ POBJECT_ATTRIBUTES _In_opt_ PVOID ServerPortCookie
Definition: fltkernel.h:1873
#define NULL
Definition: types.h:112
FAST_MUTEX mLock
Definition: fltmgrint.h:55
PFLT_MESSAGE_NOTIFY MessageNotify
Definition: fltmgrint.h:193
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
_Must_inspect_result_ _Outptr_ PFLT_PORT _In_ POBJECT_ATTRIBUTES _In_opt_ PVOID _In_ PFLT_CONNECT_NOTIFY _In_ PFLT_DISCONNECT_NOTIFY _In_opt_ PFLT_MESSAGE_NOTIFY _In_ LONG MaxConnections
Definition: fltkernel.h:1873
PFLT_DISCONNECT_NOTIFY DisconnectNotify
Definition: fltmgrint.h:192
_Must_inspect_result_ _Outptr_ PFLT_PORT _In_ POBJECT_ATTRIBUTES _In_opt_ PVOID _In_ PFLT_CONNECT_NOTIFY _In_ PFLT_DISCONNECT_NOTIFY _In_opt_ PFLT_MESSAGE_NOTIFY MessageNotifyCallback
Definition: fltkernel.h:1873
FLT_MUTEX_LIST_HEAD ConnectionList
Definition: fltmgrint.h:121

◆ _IRQL_requires_max_() [4/4]

_IRQL_requires_max_ ( PASSIVE_LEVEL  ) &

◆ _Out_writes_bytes_opt_()

_In_ DEVICE_REGISTRY_PROPERTY _In_ ULONG _Out_writes_bytes_opt_ ( BufferLength  )

◆ _Out_writes_bytes_to_()

_In_ CONST DEVPROPKEY _In_ LCID _Reserved_ ULONG _In_ ULONG _Out_writes_bytes_to_ ( Size  ,
RequiredSize 
)

◆ _Requires_lock_held_()

_Requires_lock_held_ ( _Global_cancel_spin_lock_  )

◆ _When_() [1/4]

_In_ CONST GUID _Out_ _When_ ( return  = =0,
_At_(AliasSymbolicLinkName->Buffer, __drv_allocatesMem(Mem))   
)

◆ _When_() [2/4]

_Must_inspect_result_ _In_ PDEVICE_DESCRIPTION _Out_ _When_ ( return!  = 0,
_Kernel_IoGetDmaAdapter_ _At_ *,  _Must_inspect_result_ 
)

◆ _When_() [3/4]

_In_ _In_ _When_ ( MinorVersion!  = 0 &&MinorVersion!=5 &&MinorVersion!=16 &&MinorVersion!=32 &&MinorVersion!=48,
__drv_reportError("MinorVersion must be 0, 0x5, 0x10, 0x20, or 0x30")   
)

◆ _When_() [4/4]

◆ ASSERT()

◆ if() [1/3]

if ( InvokeOnSuccess  )

Definition at line 2720 of file iofuncs.h.

2720  {
2721  irpSp->Control = SL_INVOKE_ON_SUCCESS;
2722  }
irpSp
Definition: iofuncs.h:2715
#define SL_INVOKE_ON_SUCCESS
Definition: iotypes.h:3307

◆ if() [2/3]

if ( InvokeOnError  )

Definition at line 2724 of file iofuncs.h.

2724  {
2725  irpSp->Control |= SL_INVOKE_ON_ERROR;
2726  }
irpSp
Definition: iofuncs.h:2715
#define SL_INVOKE_ON_ERROR
Definition: iotypes.h:3308

◆ if() [3/3]

if ( InvokeOnCancel  )

Definition at line 2728 of file iofuncs.h.

2728  {
2729  irpSp->Control |= SL_INVOKE_ON_CANCEL;
2730  }
irpSp
Definition: iofuncs.h:2715
#define SL_INVOKE_ON_CANCEL
Definition: iotypes.h:3306

◆ IoAllocateDriverObjectExtension()

NTKERNELAPI NTSTATUS NTAPI IoAllocateDriverObjectExtension ( _In_ PDRIVER_OBJECT  DriverObject,
_In_ PVOID  ClientIdentificationAddress,
_In_ ULONG  DriverObjectExtensionSize,
_Post_ _At_(*,(==0, Mem  _Post_notnull_ 
)

◆ IoAllocateSfioStreamIdentifier()

NTSTATUS NTAPI IoAllocateSfioStreamIdentifier ( _In_ PFILE_OBJECT  FileObject,
_In_ ULONG  Length,
_In_ PVOID  Signature,
_Out_ PVOID StreamIdentifier 
)

◆ IoAssignResources()

NTKERNELAPI NTSTATUS NTAPI IoAssignResources ( _In_ PUNICODE_STRING  RegistryPath,
_In_opt_ PUNICODE_STRING  DriverClassName,
_In_ PDRIVER_OBJECT  DriverObject,
_In_opt_ PDEVICE_OBJECT  DeviceObject,
_In_opt_ PIO_RESOURCE_REQUIREMENTS_LIST  RequestedResources,
_Inout_ PCM_RESOURCE_LIST AllocatedResources 
)

◆ IoAttachDevice()

◆ IoAttachDeviceByPointer()

NTKERNELAPI NTSTATUS NTAPI IoAttachDeviceByPointer ( _In_ PDEVICE_OBJECT  SourceDevice,
_In_ PDEVICE_OBJECT  TargetDevice 
)

◆ IoAttachDeviceToDeviceStackSafe()

NTKERNELAPI NTSTATUS NTAPI IoAttachDeviceToDeviceStackSafe ( _In_ PDEVICE_OBJECT  SourceDevice,
_In_ PDEVICE_OBJECT  TargetDevice,
_Outptr_ PDEVICE_OBJECT AttachedToDeviceObject 
)

◆ IoCancelFileOpen()

NTKERNELAPI VOID NTAPI IoCancelFileOpen ( _In_ PDEVICE_OBJECT  DeviceObject,
_In_ PFILE_OBJECT  FileObject 
)

◆ IoCheckDesiredAccess()

NTKERNELAPI NTSTATUS NTAPI IoCheckDesiredAccess ( _Inout_ PACCESS_MASK  DesiredAccess,
_In_ ACCESS_MASK  GrantedAccess 
)

◆ IoCheckEaBufferValidity()

NTKERNELAPI NTSTATUS NTAPI IoCheckEaBufferValidity ( _In_ PFILE_FULL_EA_INFORMATION  EaBuffer,
_In_ ULONG  EaLength,
_Out_ PULONG  ErrorOffset 
)

◆ IoCheckFunctionAccess()

NTKERNELAPI NTSTATUS NTAPI IoCheckFunctionAccess ( _In_ ACCESS_MASK  GrantedAccess,
_In_ UCHAR  MajorFunction,
_In_ UCHAR  MinorFunction,
_In_ ULONG  IoControlCode,
_In_opt_ PVOID  Argument1,
_In_opt_ PVOID  Argument2 
)

◆ IoCheckQuerySetFileInformation()

NTKERNELAPI NTSTATUS NTAPI IoCheckQuerySetFileInformation ( _In_ FILE_INFORMATION_CLASS  FileInformationClass,
_In_ ULONG  Length,
_In_ BOOLEAN  SetOperation 
)

◆ IoCheckQuerySetVolumeInformation()

NTKERNELAPI NTSTATUS NTAPI IoCheckQuerySetVolumeInformation ( _In_ FS_INFORMATION_CLASS  FsInformationClass,
_In_ ULONG  Length,
_In_ BOOLEAN  SetOperation 
)

◆ IoCheckQuotaBufferValidity()

NTKERNELAPI NTSTATUS NTAPI IoCheckQuotaBufferValidity ( _In_ PFILE_QUOTA_INFORMATION  QuotaBuffer,
_In_ ULONG  QuotaLength,
_Out_ PULONG  ErrorOffset 
)

◆ IoCheckShareAccessEx()

NTKERNELAPI NTSTATUS NTAPI IoCheckShareAccessEx ( _In_ ACCESS_MASK  DesiredAccess,
_In_ ULONG  DesiredShareAccess,
_Inout_ PFILE_OBJECT  FileObject,
_Inout_ PSHARE_ACCESS  ShareAccess,
_In_ BOOLEAN  Update,
_In_ PBOOLEAN  WritePermission 
)

◆ IoClearIrpExtraCreateParameter()

VOID NTAPI IoClearIrpExtraCreateParameter ( _Inout_ PIRP  Irp)

◆ IoConnectInterruptEx()

NTKERNELAPI NTSTATUS NTAPI IoConnectInterruptEx ( _Inout_ PIO_CONNECT_INTERRUPT_PARAMETERS  Parameters)

◆ IoCopyCurrentIrpStackLocationToNext()

FORCEINLINE VOID IoCopyCurrentIrpStackLocationToNext ( _Inout_ PIRP  Irp)

Definition at line 2864 of file iofuncs.h.

2866 {
2868  PIO_STACK_LOCATION nextIrpSp;
2870  nextIrpSp = IoGetNextIrpStackLocation(Irp);
2872  nextIrpSp->Control = 0;
2873 }
_In_ PIRP Irp
Definition: csq.h:116
irpSp
Definition: iofuncs.h:2715
__drv_aliasesMem FORCEINLINE PIO_STACK_LOCATION IoGetNextIrpStackLocation(_In_ PIRP Irp)
Definition: iofuncs.h:2691
__drv_aliasesMem FORCEINLINE PIO_STACK_LOCATION IoGetCurrentIrpStackLocation(_In_ PIRP Irp)
Definition: iofuncs.h:2789
_In_ WDFREQUEST _In_opt_ PFN_WDF_REQUEST_COMPLETION_ROUTINE CompletionRoutine
Definition: wdfrequest.h:893
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:255
#define RtlCopyMemory(Destination, Source, Length)
Definition: typedefs.h:263

Referenced by _Requires_lock_held_(), Bus_SendIrpSynchronously(), ClassDeviceControl(), ClassDeviceHwFirmwareActivateProcess(), ClassDeviceHwFirmwareDownloadProcess(), ClassDeviceHwFirmwareGetInfoProcess(), ClassDispatchPnp(), ClassForwardIrpSynchronous(), ClassInternalIoControl(), ClassMinimalPowerHandler(), ClasspAccessAlignmentProperty(), ClasspCreateClose(), ClasspDeviceSeekPenaltyProperty(), ClasspDeviceTrimProcess(), ClasspDeviceTrimProperty(), ClasspPowerDownCompletion(), ClasspPowerHandler(), ClasspPowerUpCompletion(), ClassReadWrite(), CmBattPnpDispatch(), FatHijackIrpAndFlushDevice(), ForwardIrpAndWait(), ForwardIrpSynchronous(), FreeBT_DispatchPower(), HandleCancelRemoveDevice(), HandleCancelStopDevice(), HandleDeviceSetPower(), HandleQueryCapabilities(), HandleStartDevice(), HandleSystemQueryPower(), HandleSystemSetPower(), HidClass_Power(), HidClassFDO_PnP(), HidClassPDO_HandleQueryDeviceId(), HidClassPDO_HandleQueryHardwareId(), HidPnp(), HoldIoRequestsWorkerRoutine(), if(), IntVideoPortForwardIrpAndWait(), IoForwardIrpSynchronously(), IsaForwardIrpSynchronous(), KbdHid_Create(), KbdHid_Pnp(), KspForwardIrpSynchronous(), MouHid_Create(), MouHid_Pnp(), NdisIForwardIrpAndWait(), PcForwardIrpSynchronous(), PciCallDownIrpStack(), PciPassIrpFromFdoToPdo(), PnpRootPowerControl(), RamdiskPnp(), RamdiskQueryDeviceRelations(), RawReadWriteDeviceControl(), RequestProcessSetPower(), UDFPnpQueryRemove(), UDFPnpRemove(), UDFPnpSurpriseRemove(), USBCCGP_SyncForwardIrp(), USBH_FdoDeferPoRequestCompletion(), USBH_FdoPnP(), USBH_FdoPower(), USBH_PdoUrbFilter(), USBH_StartHubFdoDevice(), USBPORT_FdoPnP(), USBPORT_FdoPower(), USBSTOR_FdoHandleDeviceRelations(), and USBSTOR_SyncForwardIrp().

◆ IoCreateDevice()

NTKERNELAPI NTSTATUS NTAPI IoCreateDevice ( _In_ PDRIVER_OBJECT  DriverObject,
_In_ ULONG  DeviceExtensionSize,
_In_opt_ PUNICODE_STRING  DeviceName,
_In_ DEVICE_TYPE  DeviceType,
_In_ ULONG  DeviceCharacteristics,
_In_ BOOLEAN  Exclusive,
_Outptr_result_nullonfailure_   _At_*, Mem _When_(((_In_function_class_(DRIVER_INITIALIZE))||(_In_function_class_(DRIVER_DISPATCH))), __drv_aliasesMem 
)

◆ IoCreateDisk()

NTKERNELAPI NTSTATUS NTAPI IoCreateDisk ( _In_ PDEVICE_OBJECT  DeviceObject,
_In_opt_ struct _CREATE_DISK *  Disk 
)

◆ IoCreateFileEx()

NTKERNELAPI NTSTATUS NTAPI IoCreateFileEx ( _Out_ PHANDLE  FileHandle,
_In_ ACCESS_MASK  DesiredAccess,
_In_ POBJECT_ATTRIBUTES  ObjectAttributes,
_Out_ PIO_STATUS_BLOCK  IoStatusBlock,
_In_opt_ PLARGE_INTEGER  AllocationSize,
_In_ ULONG  FileAttributes,
_In_ ULONG  ShareAccess,
_In_ ULONG  Disposition,
_In_ ULONG  CreateOptions,
_In_opt_ PVOID  EaBuffer,
_In_ ULONG  EaLength,
_In_ CREATE_FILE_TYPE  CreateFileType,
_In_opt_ PVOID  InternalParameters,
_In_ ULONG  Options,
_In_opt_ PIO_DRIVER_CREATE_CONTEXT  DriverContext 
)

◆ IoCreateFileSpecifyDeviceObjectHint()

NTKERNELAPI NTSTATUS NTAPI IoCreateFileSpecifyDeviceObjectHint ( _Out_ PHANDLE  FileHandle,
_In_ ACCESS_MASK  DesiredAccess,
_In_ POBJECT_ATTRIBUTES  ObjectAttributes,
_Out_ PIO_STATUS_BLOCK  IoStatusBlock,
_In_opt_ PLARGE_INTEGER  AllocationSize,
_In_ ULONG  FileAttributes,
_In_ ULONG  ShareAccess,
_In_ ULONG  Disposition,
_In_ ULONG  CreateOptions,
_In_opt_ PVOID  EaBuffer,
_In_ ULONG  EaLength,
_In_ CREATE_FILE_TYPE  CreateFileType,
_In_opt_ PVOID  InternalParameters,
_In_ ULONG  Options,
_In_opt_ PVOID  DeviceObject 
)

◆ IoCreateStreamFileObject()

NTKERNELAPI PFILE_OBJECT NTAPI IoCreateStreamFileObject ( _In_opt_ PFILE_OBJECT  FileObject,
_In_opt_ PDEVICE_OBJECT  DeviceObject 
)

◆ IoCreateStreamFileObjectLite()

NTKERNELAPI PFILE_OBJECT NTAPI IoCreateStreamFileObjectLite ( _In_opt_ PFILE_OBJECT  FileObject,
_In_opt_ PDEVICE_OBJECT  DeviceObject 
)

◆ IoCsqInsertIrp()

NTKERNELAPI VOID NTAPI IoCsqInsertIrp ( _Inout_ PIO_CSQ  Csq,
_Inout_ PIRP  Irp,
_Out_opt_ PIO_CSQ_IRP_CONTEXT  Context 
)

Insert an IRP into the CSQ.

Parameters
Csq- Pointer to the initialized CSQ
Irp- Pointer to the IRP to queue
Context- Context record to track the IRP while queued
Returns
  • Just passes through to IoCsqInsertIrpEx, with no InsertContext

Definition at line 177 of file csq.c.

181 {
183 }
NTSTATUS NTAPI IoCsqInsertIrpEx(_Inout_ PIO_CSQ Csq, _Inout_ PIRP Irp, _Out_opt_ PIO_CSQ_IRP_CONTEXT Context, _In_opt_ PVOID InsertContext)
Insert an IRP into the CSQ, with additional tracking context.
Definition: csq.c:205
_In_ PIRP Irp
Definition: csq.h:116
IO_CSQ Csq
Definition: csqrtns.c:46

◆ IoCsqInsertIrpEx()

NTKERNELAPI NTSTATUS NTAPI IoCsqInsertIrpEx ( _Inout_ PIO_CSQ  Csq,
_Inout_ PIRP  Irp,
_Out_opt_ PIO_CSQ_IRP_CONTEXT  Context,
_In_opt_ PVOID  InsertContext 
)

Insert an IRP into the CSQ, with additional tracking context.

Parameters
Csq- Pointer to the initialized CSQ
Irp- Pointer to the IRP to queue
Context- Context record to track the IRP while queued
InsertContext- additional data that is passed through to CsqInsertIrpEx
Note
  • Passes the additional context through to the driver-supplied callback, which can be used with more sophistocated queues
  • Marks the IRP pending in all cases
  • Guaranteed to not queue a canceled IRP
  • This is complicated logic, and is patterend after the Microsoft library. I'm sure I have gotten the details wrong on a fine point or two, but basically this works with the MS-supplied samples.

Definition at line 205 of file csq.c.

210 {
211  NTSTATUS Retval = STATUS_SUCCESS;
212  KIRQL Irql;
213 
215 
216  do
217  {
218  /* mark all irps pending -- says so in the cancel sample */
220 
221  /* set up the context if we have one */
222  if(Context)
223  {
225  Context->Irp = Irp;
226  Context->Csq = Csq;
227  Irp->Tail.Overlay.DriverContext[3] = Context;
228  }
229  else
230  Irp->Tail.Overlay.DriverContext[3] = Csq;
231 
232  /*
233  * NOTE! This is very sensitive to order. If you set the cancel routine
234  * *before* you queue the IRP, our cancel routine will get called back for
235  * an IRP that isn't in its queue.
236  *
237  * There are three possibilities:
238  * 1) We get an IRP, we queue it, and it is valid the whole way
239  * 2) We get an IRP, and the IO manager cancels it before we're done here
240  * 3) We get an IRP, queue it, and the IO manager cancels it.
241  *
242  * #2 is is a booger.
243  *
244  * When the IO manger receives a request to cancel an IRP, it sets the cancel
245  * bit in the IRP's control byte to TRUE. Then, it looks to see if a cancel
246  * routine is set. If it isn't, the IO manager just returns to the caller.
247  * If there *is* a routine, it gets called.
248  *
249  * If we test for cancel first and then set the cancel routine, there is a spot
250  * between test and set that the IO manager can cancel us without our knowledge,
251  * so we miss a cancel request. That is bad.
252  *
253  * If we set a routine first and then test for cancel, we race with our completion
254  * routine: We set the routine, the IO Manager sets cancel, we test cancel and find
255  * it is TRUE. Meanwhile the IO manager has called our cancel routine already, so
256  * we can't complete the IRP because it'll rip it out from under the cancel routine.
257  *
258  * The IO manager does us a favor though: it nulls out the cancel routine in the IRP
259  * before calling it. Therefore, if we test to see if the cancel routine is NULL
260  * (after we have just set it), that means our own cancel routine is already working
261  * on the IRP, and we can just return quietly. Otherwise, we have to de-queue the
262  * IRP and cancel it ourselves.
263  *
264  * We have to go through all of this mess because this API guarantees that we will
265  * never return having left a canceled IRP in the queue.
266  */
267 
268  /* Step 1: Queue the IRP */
269  if(Csq->Type == IO_TYPE_CSQ)
270  Csq->CsqInsertIrp(Csq, Irp);
271  else
272  {
274  Retval = pCsqInsertIrpEx(Csq, Irp, InsertContext);
275  if(Retval != STATUS_SUCCESS)
276  break;
277  }
278 
279  /* Step 2: Set our cancel routine */
280  (void)IoSetCancelRoutine(Irp, IopCsqCancelRoutine);
281 
282  /* Step 3: Deal with an IRP that is already canceled */
283  if(!Irp->Cancel)
284  break;
285 
286  /*
287  * Since we're canceled, see if our cancel routine is already running
288  * If this is NULL, the IO Manager has already called our cancel routine
289  */
291  break;
292 
293 
294  Irp->Tail.Overlay.DriverContext[3] = 0;
295 
296  /* OK, looks like we have to de-queue and complete this ourselves */
297  Csq->CsqRemoveIrp(Csq, Irp);
299 
300  if(Context)
301  Context->Irp = NULL;
302  }
303  while(0);
304 
306 
307  return Retval;
308 }
PIO_CSQ_ACQUIRE_LOCK CsqAcquireLock
Definition: csq.h:227
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:49
LONG NTSTATUS
Definition: precomp.h:26
IoSetCancelRoutine(Irp, CancelRoutine)
_Out_ PKIRQL Irql
Definition: csq.h:179
UCHAR KIRQL
Definition: env_spec_w32.h:591
_In_ PIRP Irp
Definition: csq.h:116
#define IO_TYPE_CSQ
Definition: csq.h:79
ULONG Type
Definition: csq.h:223
_In_ PIRP _In_ PVOID InsertContext
Definition: csq.h:257
#define IO_TYPE_CSQ_IRP_CONTEXT
Definition: csq.h:78
PIO_CSQ_REMOVE_IRP CsqRemoveIrp
Definition: csq.h:225
PIO_CSQ_INSERT_IRP CsqInsertIrp
Definition: csq.h:224
PIO_CSQ_RELEASE_LOCK CsqReleaseLock
Definition: csq.h:228
PIO_CSQ_COMPLETE_CANCELED_IRP CsqCompleteCanceledIrp
Definition: csq.h:229
#define NULL
Definition: types.h:112
IO_CSQ Csq
Definition: csqrtns.c:46
struct tagContext Context
Definition: acpixf.h:1034
IO_CSQ_INSERT_IRP_EX * PIO_CSQ_INSERT_IRP_EX
Definition: csq.h:259
#define STATUS_SUCCESS
Definition: shellext.h:65
IoMarkIrpPending(Irp)

Referenced by IoCsqInsertIrp().

◆ IoCsqRemoveIrp()

NTKERNELAPI PIRP NTAPI IoCsqRemoveIrp ( _Inout_ PIO_CSQ  Csq,
_Inout_ PIO_CSQ_IRP_CONTEXT  Context 
)

Remove anb IRP from the queue.

Parameters
Csq- Queue to remove the IRP from
Context- Context record containing the IRP to be dequeued
Returns
  • Pointer to an IRP if we found it
Note
  • Don't forget that we can be canceled any time up to the point where we unset our cancel routine

Definition at line 326 of file csq.c.

329 {
330  KIRQL Irql;
331  PIRP Irp = NULL;
332 
334 
335  do
336  {
337  /* It's possible that this IRP could have been canceled */
338  Irp = Context->Irp;
339 
340  if(!Irp)
341  break;
342 
343  ASSERT(Context->Csq == Csq);
344 
345  /* Unset the cancel routine and see if it has already been canceled */
347  {
348  /*
349  * already gone, return NULL --> NOTE that we cannot touch this IRP *or* the context,
350  * since the context is being simultaneously twiddled by the cancel routine
351  */
352  Irp = NULL;
353  break;
354  }
355 
356  ASSERT(Context == Irp->Tail.Overlay.DriverContext[3]);
357 
358  /* This IRP is valid and is ours. Dequeue it, fix it up, and return */
359  Csq->CsqRemoveIrp(Csq, Irp);
360 
361  Context = (PIO_CSQ_IRP_CONTEXT)InterlockedExchangePointer(&Irp->Tail.Overlay.DriverContext[3], NULL);
362 
363  if (Context && Context->Type == IO_TYPE_CSQ_IRP_CONTEXT)
364  {
365  Context->Irp = NULL;
366 
367  ASSERT(Context->Csq == Csq);
368  }
369 
370  Irp->Tail.Overlay.DriverContext[3] = 0;
371  }
372  while(0);
373 
375 
376  return Irp;
377 }
PIO_CSQ_ACQUIRE_LOCK CsqAcquireLock
Definition: csq.h:227
IoSetCancelRoutine(Irp, CancelRoutine)
_Out_ PKIRQL Irql
Definition: csq.h:179
UCHAR KIRQL
Definition: env_spec_w32.h:591
_In_ PIRP Irp
Definition: csq.h:116
#define InterlockedExchangePointer(Target, Value)
Definition: dshow.h:45
#define IO_TYPE_CSQ_IRP_CONTEXT
Definition: csq.h:78
#define ASSERT(a)
Definition: mode.c:45
PIO_CSQ_REMOVE_IRP CsqRemoveIrp
Definition: csq.h:225
PIO_CSQ_RELEASE_LOCK CsqReleaseLock
Definition: csq.h:228
struct _IO_CSQ_IRP_CONTEXT * PIO_CSQ_IRP_CONTEXT
#define NULL
Definition: types.h:112
IO_CSQ Csq
Definition: csqrtns.c:46

◆ IoCsqRemoveNextIrp()

NTKERNELAPI PIRP NTAPI IoCsqRemoveNextIrp ( _Inout_ PIO_CSQ  Csq,
_In_opt_ PVOID  PeekContext 
)

IoCsqRemoveNextIrp - Removes the next IRP from the queue.

Parameters
Csq- Queue to remove the IRP from
PeekContext- Identifier of the IRP to be removed
Returns
Pointer to the IRP that was removed, or NULL if one could not be found
Note
  • This function is sensitive to yet another race condition. The basic idea is that we have to return the first IRP that we get that matches the PeekContext >that is not already canceled<. Therefore, we have to do a trick similar to the one done in Insert above.

Definition at line 398 of file csq.c.

401 {
402  KIRQL Irql;
403  PIRP Irp = NULL;
405 
407 
408  while((Irp = Csq->CsqPeekNextIrp(Csq, Irp, PeekContext)))
409  {
410  /*
411  * If the cancel routine is gone, we're already canceled,
412  * and are spinning on the queue lock in our own cancel
413  * routine. Move on to the next candidate. It'll get
414  * removed by the cance routine.
415  */
417  continue;
418 
419  Csq->CsqRemoveIrp(Csq, Irp);
420 
421  /* Unset the context stuff and return */
422  Context = (PIO_CSQ_IRP_CONTEXT)InterlockedExchangePointer(&Irp->Tail.Overlay.DriverContext[3], NULL);
423 
424  if (Context && Context->Type == IO_TYPE_CSQ_IRP_CONTEXT)
425  {
426  Context->Irp = NULL;
427 
428  ASSERT(Context->Csq == Csq);
429  }
430 
431  Irp->Tail.Overlay.DriverContext[3] = 0;
432 
433  break;
434  }
435 
437 
438  return Irp;
439 }
PIO_CSQ_ACQUIRE_LOCK CsqAcquireLock
Definition: csq.h:227
IoSetCancelRoutine(Irp, CancelRoutine)
_Out_ PKIRQL Irql
Definition: csq.h:179
UCHAR KIRQL
Definition: env_spec_w32.h:591
_In_ PIRP Irp
Definition: csq.h:116
PIO_CSQ_PEEK_NEXT_IRP CsqPeekNextIrp
Definition: csq.h:226
#define InterlockedExchangePointer(Target, Value)
Definition: dshow.h:45
#define IO_TYPE_CSQ_IRP_CONTEXT
Definition: csq.h:78
#define ASSERT(a)
Definition: mode.c:45
PIO_CSQ_REMOVE_IRP CsqRemoveIrp
Definition: csq.h:225
PIO_CSQ_RELEASE_LOCK CsqReleaseLock
Definition: csq.h:228
struct _IO_CSQ_IRP_CONTEXT * PIO_CSQ_IRP_CONTEXT
#define NULL
Definition: types.h:112
_In_opt_ PIRP _In_opt_ PVOID PeekContext
Definition: csq.h:159
IO_CSQ Csq
Definition: csqrtns.c:46
struct tagContext Context
Definition: acpixf.h:1034

◆ IoDisconnectInterruptEx()

NTKERNELAPI VOID NTAPI IoDisconnectInterruptEx ( _In_ PIO_DISCONNECT_INTERRUPT_PARAMETERS  Parameters)

◆ IoEnumerateDeviceObjectList()

NTKERNELAPI NTSTATUS NTAPI IoEnumerateDeviceObjectList ( _In_ PDRIVER_OBJECT  DriverObject,
_Out_writes_bytes_to_opt_(DeviceObjectListSize,(*ActualNumberDeviceObjects) *sizeof(PDEVICE_OBJECT)) PDEVICE_OBJECT DeviceObjectList,
_In_ ULONG  DeviceObjectListSize,
_Out_ PULONG  ActualNumberDeviceObjects 
)

◆ IoFastQueryNetworkAttributes()

NTKERNELAPI BOOLEAN NTAPI IoFastQueryNetworkAttributes ( _In_ POBJECT_ATTRIBUTES  ObjectAttributes,
_In_ ACCESS_MASK  DesiredAccess,
_In_ ULONG  OpenOptions,
_Out_ PIO_STATUS_BLOCK  IoStatus,
_Out_ PFILE_NETWORK_OPEN_INFORMATION  Buffer 
)

◆ IoForwardIrpSynchronously()

NTKERNELAPI BOOLEAN NTAPI IoForwardIrpSynchronously ( _In_ PDEVICE_OBJECT  DeviceObject,
_In_ PIRP  Irp 
)

◆ IoFreeErrorLogEntry()

NTKERNELAPI VOID NTAPI IoFreeErrorLogEntry ( _In_ PVOID  ElEntry)

◆ IoFreeSfioStreamIdentifier()

NTSTATUS NTAPI IoFreeSfioStreamIdentifier ( _In_ PFILE_OBJECT  FileObject,
_In_ PVOID  Signature 
)

◆ IoGetAttachedDevice()

NTKERNELAPI PDEVICE_OBJECT NTAPI IoGetAttachedDevice ( IN PDEVICE_OBJECT  DeviceObject)

◆ IoGetBaseFileSystemDeviceObject()

NTKERNELAPI PDEVICE_OBJECT NTAPI IoGetBaseFileSystemDeviceObject ( _In_ PFILE_OBJECT  FileObject)

◆ IoGetBootDiskInformation()

NTKERNELAPI NTSTATUS NTAPI IoGetBootDiskInformation ( _Inout_ PBOOTDISK_INFORMATION  BootDiskInformation,
_In_ ULONG  Size 
)

◆ IoGetContainerInformation()

NTSTATUS NTAPI IoGetContainerInformation ( _In_ IO_CONTAINER_INFORMATION_CLASS  InformationClass,
_In_opt_ PVOID  ContainerObject,
_Inout_updates_bytes_opt_(BufferLength) PVOID  Buffer,
_In_ ULONG  BufferLength 
)

◆ IoGetCurrentIrpStackLocation()

__drv_aliasesMem FORCEINLINE PIO_STACK_LOCATION IoGetCurrentIrpStackLocation ( _In_ PIRP  Irp)

Definition at line 2789 of file iofuncs.h.

2791 {
2792  ASSERT(Irp->CurrentLocation <= Irp->StackCount + 1);
2793 #ifdef NONAMELESSUNION
2794  return Irp->Tail.Overlay.s.u.CurrentStackLocation;
2795 #else
2796  return Irp->Tail.Overlay.CurrentStackLocation;
2797 #endif
2798 }
_In_ PIRP Irp
Definition: csq.h:116
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel) ?(CompletionRoutine !=NULL) :TRUE)

Referenced by FxWmiIrpHandler::_ChangeSingleInstance(), FxWmiIrpHandler::_ChangeSingleItem(), _Dispatch_type_(), FxWmiIrpHandler::_EnableDisableEventsAndCollection(), FxWmiIrpHandler::_ExecuteMethod(), _Function_class_(), _IRQL_requires_max_(), FxWmiIrpHandler::_QueryAllData(), FxWmiIrpHandler::_QuerySingleInstance(), FxWmiIrpHandler::_RegInfo(), _Requires_lock_held_(), _Success_(), ACPIDispatchDeviceControl(), AdapterDispatchPnp(), add_device(), add_thread_job(), AfdCancelHandler(), AfdConnectedSocketWriteData(), AfdDisconnect(), AfdDispatch(), AfdPacketSocketWriteData(), BatteryClassIoctl(), BdaPropertyNodeTypes(), BdaPropertyPinTypes(), BdaPropertyTemplateConnections(), BeepDeviceControl(), BeepStartIo(), BlasterDeviceControl(), BlasterWrite(), BroadcastOpen(), BuildAndSubmitIrp(), Bus_FDO_Power(), Bus_PDO_EvalMethod(), Bus_PDO_Power(), Bus_PDO_QueryDeviceCaps(), Bus_PDO_QueryDeviceId(), Bus_PDO_QueryDeviceRelations(), Bus_PDO_QueryDeviceText(), Bus_PDO_QueryInterface(), Bus_PnP(), bus_pnp(), Bus_Power(), bus_query_capabilities(), CdAddToWorkque(), CdAllowExtendedDasdIo(), CdCommonDevControl(), CdCommonLockControl(), CdCompleteMdl(), CdCreateIrpContext(), CdFspDispatch(), CdHijackIrpAndFlushDevice(), CdIsVolumeDirty(), CdIsVolumeMounted(), CdMultipleXAAsync(), CdOperationIsDasdOpen(), CdRomDeviceControl(), CdRomDeviceControlCompletion(), CdRomMediaChangeCompletion(), CdRomSetVolumeIntermediateCompletion(), CdRomSwitchModeCompletion(), CdRomTickHandler(), CdRomUpdateCapacity(), CdRomUpdateGeometryCompletion(), CdRomXACompletion(), CdVerifyFcbOperation(), CdVerifyVcb(), ClassCheckVerifyComplete(), ClassCreateClose(), ClassDeviceControl(), ClassDeviceGetLBProvisioningResources(), ClassDeviceHwFirmwareActivateProcess(), ClassDeviceHwFirmwareDownloadProcess(), ClassDeviceHwFirmwareGetInfoProcess(), ClassDispatchPnp(), ClassDispatchUnimplemented(), ClassGlobalDispatch(), ClassInternalIoControl(), ClassIoComplete(), ClassIoCompleteAssociated(), ClassMinimalPowerHandler(), ClasspAccessAlignmentProperty(), ClasspBuildRequestEx(), ClasspCreateClose(), ClasspDeviceGetLBAStatus(), ClasspDeviceLBProvisioningProperty(), ClasspDeviceLockFailurePowerIrpCompletion(), ClasspDeviceMediaTypeProperty(), ClasspDeviceSeekPenaltyProperty(), ClasspDeviceTrimProperty(), ClasspDuidGetDeviceIdProperty(), ClasspDuidGetDeviceProperty(), ClasspDuidGetDriveLayout(), ClasspDuidQueryProperty(), ClasspEjectionControl(), ClasspMcnControl(), ClasspMediaChangeDetectionCompletion(), ClassPnp(), ClassPower(), ClasspPersistentReserve(), ClasspPowerDownCompletion(), ClasspPowerHandler(), ClasspPowerUpCompletion(), ClasspPrepareMcnIrp(), ClasspPriorityHint(), ClasspRetryRequestDpc(), ClasspStorageEventNotification(), ClasspWriteCacheProperty(), ClassRead(), ClassReadWrite(), ClassSystemControl(), ClassWmiCompleteRequest(), ClockPropertyCorrelatedPhysicalTime(), ClockPropertyCorrelatedTime(), ClockPropertyPhysicalTime(), ClockPropertyResolution(), ClockPropertyState(), ClockPropertyTime(), CmBattIoctl(), CmBattOpenClose(), CmBattPnpDispatch(), CmBattPowerDispatch(), CmBattSystemControl(), CompBattPnpDispatch(), FxWmiIrpHandler::CompleteWmiExecuteMethodRequest(), FxWmiIrpHandler::CompleteWmiQueryAllDataRequest(), FxWmiIrpHandler::CompleteWmiQuerySingleInstanceRequest(), FxWmiIrpHandler::CompleteWmiRequest(), ConDrvDispatch(), control_ioctl(), ControlSoundBlaster(), create_stream(), CreateCdRomDeviceObject(), CreatePin(), CreateRedirectedFile(), delete_reparse_point(), DeviceIoctlPassive(), DisconnectComplete(), DiskDetermineMediaTypes(), DiskDeviceControl(), DiskFlushDispatch(), DiskInfoExceptionCheck(), DiskInfoExceptionComplete(), DiskIoctlEnableFailurePrediction(), DiskIoctlGetCacheInformation(), DiskIoctlGetCacheSetting(), DiskIoctlGetDriveGeometry(), DiskIoctlGetDriveGeometryEx(), DiskIoctlGetLengthInfo(), DiskIoctlGetMediaTypesEx(), DiskIoctlGetVolumeDiskExtents(), DiskIoctlPredictFailure(), DiskIoctlReassignBlocks(), DiskIoctlReassignBlocksEx(), DiskIoctlSetCacheInformation(), DiskIoctlSetCacheSetting(), DiskIoctlSmartGetVersion(), DiskIoctlSmartReceiveDriveData(), DiskIoctlSmartSendDriveCommand(), DiskIoctlUpdateDriveSize(), DiskIoctlVerify(), DiskReadWriteVerification(), DiskShutdownFlush(), FxWmiIrpHandler::Dispatch(), Dispatch(), Dispatch_fnClose(), Dispatch_fnDeviceIoControl(), Dispatch_fnFlush(), Dispatch_fnQuerySecurity(), Dispatch_fnRead(), Dispatch_fnSetSecurity(), Dispatch_fnWrite(), DispatchCreateCloseCleanup(), DispatchCreateSysAudioPin(), DispCancelListenRequest(), DispCancelRequest(), DispPrepareIrpForCancel(), DispTdiAssociateAddress(), DispTdiConnect(), DispTdiDisassociateAddress(), DispTdiDisconnect(), DispTdiListen(), DispTdiQueryInformation(), DispTdiReceive(), DispTdiReceiveDatagram(), DispTdiSend(), DispTdiSendDatagram(), DispTdiSetEventHandler(), do_read(), do_read_job(), DriverCleanup(), DriverCreate(), DriverDispatch(), DriverIoControl(), EndRequestHandler(), Ext2AllocateIrpContext(), Ext2AllowExtendedDasdIo(), Ext2Create(), Ext2CreateFile(), Ext2CreateVolume(), Ext2DeviceControl(), Ext2DeviceControlNormal(), Ext2ExceptionHandler(), Ext2Flush(), Ext2GetReparsePoint(), Ext2GetRetrievalPointerBase(), Ext2GetRetrievalPointers(), Ext2InvalidateVolumes(), Ext2IsVolumeDirty(), Ext2LockIrp(), Ext2LockVolume(), Ext2MountVolume(), Ext2NotifyChangeDirectory(), Ext2OplockRequest(), Ext2OverwriteEa(), Ext2QueryDirectory(), Ext2QueryEa(), Ext2QueryFileInformation(), Ext2QueryRetrievalPointers(), Ext2QueryVolumeInformation(), Ext2ReadFile(), Ext2ReadVolume(), Ext2ReadWriteBlockAsyncCompletionRoutine(), Ext2ReadWriteBlocks(), Ext2SetDispositionInfo(), Ext2SetEa(), Ext2SetFileInformation(), Ext2SetLinkInfo(), Ext2SetRenameInfo(), Ext2SetReparsePoint(), Ext2SetVolumeInformation(), Ext2UnlockVolume(), Ext2UserFsRequest(), Ext2VerifyVcb(), Ext2WriteComplete(), Ext2WriteFile(), Ext2WriteVolume(), FatAddToWorkque(), FatAllowExtendedDasdIo(), FatCheckSystemSecurityAccess(), FatCommonQueryEa(), FatCommonSetEa(), FatCompleteMdl(), FatCreateIrpContext(), FatFspDispatch(), FatGetStatistics(), FatIsVolumeDirty(), FatIsVolumeMounted(), FatMultiAsyncCompletionRoutine(), FatMultipleAsync(), FatPagingFileErrorHandler(), FatPagingFileIo(), FatPrePostIrp(), FatQueryBpb(), FatQuickVerifyVcb(), FatSetPositionInfo(), FatSetRenameInfo(), FatSetZeroOnDeallocate(), FatSingleAsyncCompletionRoutine(), FatSwapVpb(), FatUnlockVolume(), FatUnpinRepinnedBcbs(), FatVerifyOperationIsLegal(), FatVerifyVcb(), FdcFdoPnp(), FdcPdoPnp(), FdcPower(), FDO_DeviceRelations(), FDO_Dispatch(), FDO_HandleInternalDeviceControl(), FDO_HandlePnp(), FDO_HandleResetCyclePort(), FdoCreate(), FdoHandleDeviceRelations(), FdoIoctlDiskGetDriveGeometryEx(), FdoPnp(), FdoPnpControl(), FdoStartDevice(), FFSAllocateIrpContext(), FFSAllowExtendedDasdIo(), FFSCreate(), FFSCreateFile(), FFSCreateVolume(), FFSDeviceControl(), FFSDeviceControlNormal(), FFSExceptionHandler(), FFSFlush(), FFSInvalidateVolumes(), FFSLockVolume(), FFSMountVolume(), FFSNotifyChangeDirectory(), FFSQueryDirectory(), FFSQueryInformation(), FFSQueryVolumeInformation(), FFSReadFile(), FFSReadVolume(), FFSReadWriteBlocks(), FFSSetDispositionInfo(), FFSSetInformation(), FFSSetRenameInfo(), FFSSetVolumeInformation(), FFSShutDown(), FFSUnlockVolume(), FFSUserFsRequest(), FFSVerifyVolume(), FFSWriteComplete(), FFSWriteFile(), FFSWriteVolume(), file_create(), file_create2(), FilterGeneralComponentIdHandler(), FilterPinPropertyHandler(), FinishDevPoDnIrp(), FltpDeviceControlHandler(), FltpDispatch(), FltpDispatchHandler(), FltpFastIoQueryOpen(), FltpGetNextMessageWaiter(), FltpMsgCreate(), FltpMsgDispatch(), FreeBT_DispatchClean(), FreeBT_DispatchClose(), FreeBT_DispatchCreate(), FreeBT_DispatchDevCtrl(), FreeBT_DispatchPnP(), FreeBT_DispatchPower(), FreeBT_DispatchRead(), FreeBT_DispatchSysCtrl(), FreeBT_DispatchWrite(), fsctl_oplock(), fsctl_request(), FsdClose(), FsdCreate(), FsdFileSystemControl(), FsdRead(), FsRecBtrfsFsControl(), FsRecCdfsFsControl(), FsRecCreate(), FsRecExt2FsControl(), FsRecFfsFsControl(), FsRecNtfsFsControl(), FsRecReiserfsFsControl(), FsRecUdfsFsControl(), FsRecVfatFsControl(), FsRtlCancelNotify(), FsRtlCheckLockForReadAccess(), FsRtlCheckLockForWriteAccess(), FsRtlCheckOplock(), FsRtlNotifyCompleteIrp(), FsRtlNotifyFilterChangeDirectory(), FsRtlNotifyFilterReportChange(), FsRtlOplockCleanup(), FsRtlOplockFsctrl(), FsRtlProcessFileLock(), FsRtlRemoveAndCompleteIrp(), FsRtlUninitializeOplock(), FxLibraryDispatch(), get_compression(), GetConnectRequest(), GetNfsVolumeData(), GetNtfsFileRecord(), GetVolumeBitmap(), GreenDispatch(), GreenPnp(), GreenPower(), GreenQueryId(), HalpDispatchPnp(), HandleDeviceQueryPower(), HandleDeviceSetPower(), CPortPinWaveRT::HandleKsProperty(), CPortPinWavePci::HandleKsProperty(), HandleLoadUnloadIoctl(), HandleQueryCapabilities(), HandleReadIrp(), HandleSysAudioFilterPinProperties(), HandleSystemQueryPower(), HandleSystemSetPower(), HDA_FdoPnp(), HDA_FDOStartDevice(), HDA_PDOHandleQueryDeviceText(), HDA_PDOHandleQueryInterface(), HDA_PdoPnp(), HDA_PDOQueryBusDeviceCapabilities(), HDA_PDOQueryId(), HidClass_Close(), HidClass_Create(), HidClass_DeviceControl(), HidClass_Read(), HidClass_Write(), HidClassDispatch(), HidClassFDO_DeviceRelations(), HidClassFDO_DispatchRequest(), HidClassFDO_DispatchRequestSynchronous(), HidClassFDO_PnP(), HidClassPDO_PnP(), HidCreate(), HidInternalDeviceControl(), HidPnp(), HidUsb_GetReportDescriptor(), HidUsb_ReadReport(), i8042InternalDeviceControl(), i8042KbdDeviceControl(), i8042KbdInternalDeviceControl(), i8042KbdStartIo(), i8042MouInternalDeviceControl(), i8042Pnp(), if(), IKsAllocator_DispatchClose(), IKsAllocator_DispatchDeviceIoControl(), IKsAllocator_fnDeviceIoControl(), IKsClock_DispatchDeviceIoControl(), IKsDevice_Create(), IKsDevice_Pnp(), IKsDevice_PnpStartDevice(), IKsFilter_DispatchDeviceIoControl(), IKsFilter_GetFilterFromIrp(), IKsPin_Close(), IKsPin_DispatchDeviceIoControl(), IKsPin_DispatchKsStream(), IKsPin_PinAllocatorFramingPropertyHandler(), IKsPin_PinDataFormatPropertyHandler(), IKsPin_PinMasterClock(), IKsPin_PinStatePropertyHandler(), InitializeFilterWithKs(), InPortCreateClose(), InPortInternalDeviceControl(), InPortPnp(), InPortPower(), InPortStartDevice(), InPortWmi(), InterpretTransferPacketError(), IntVideoPortDispatchDeviceControl(), IntVideoPortDispatchFdoPnp(), IntVideoPortDispatchPdoPnp(), IntVideoPortDispatchPower(), IntVideoPortPnPStartDevice(), invalidate_volumes(), IoCancelIrp(), IoCopyCurrentIrpStackLocationToNext(), IofCompleteRequest(), IoIsOperationSynchronous(), IoMarkIrpPending(), IopDisassociateThreadIrp(), IrpStub(), is_volume_dirty(), IsaIoctl(), IsaPdoOnRepeaterComplete(), IsaPdoRepeatRequest(), IsaPnp(), FxIoQueue::IsPagingIo(), IsRequestValid(), KbdHid_Create(), KbdHid_InternalDeviceControl(), KbdHid_Pnp(), KeyboardInternalDeviceControl(), KMix_Pnp(), KopDispatchClose(), KopDispatchCreate(), KsAcquireResetValue(), KsAddIrpToCancelableQueue(), KsAllocateExtraData(), KsAllocateObjectHeader(), KsCancelIo(), KsCompletePendingRequest(), KsDefaultAddEventHandler(), KsDefaultDeviceIoCompletion(), KsDefaultDispatchPnp(), KsDisableEvent(), KsDispatchIrp(), KsDispatchQuerySecurity(), KsDispatchSetSecurity(), KsDispatchSpecificProperty(), KsecDdDispatch(), KsGetBusEnumIdentifier(), KsGetFilterFromIrp(), KsGetObjectTypeFromIrp(), KsGetPinFromIrp(), KsHandleSizedListQuery(), KsInstallBusEnumInterface(), KsoGetIrpTargetFromIrp(), KspCopyCreateRequest(), KspCreate(), KspCreateFilter(), KspCreatePin(), KspDisableEvent(), KspDispatchIrp(), KspDoReparseForIrp(), KspEnableEvent(), KspHandleDataIntersection(), KsPinDataIntersection(), KspInstallBusEnumInterface(), KspMethodHandlerWithAllocator(), KspPinPropertyHandler(), KspPropertyHandler(), KspQueryBusDeviceCapabilities(), KspQueryBusDeviceInterface(), KspQueryId(), KsProbeStreamIrp(), KsReleaseIrpOnCancelableQueue(), KsRemoveBusEnumInterface(), KsServiceBusEnumCreateRequest(), KsServiceBusEnumPnpRequest(), KsTopologyPropertyHandler(), LanDispatch(), ListenComplete(), lock_volume(), LockOrUnlockVolume(), LockPeekNextIrp(), LostSocket(), MouHid_Create(), MouHid_InternalDeviceControl(), MouHid_Pnp(), mount_vol(), mountdev_query_stable_guid(), MountMgrChangeNotify(), MountMgrCleanup(), MountMgrCreateClose(), MountMgrCreatePoint(), MountMgrDeletePoints(), MountMgrDeviceControl(), MountMgrKeepLinksWhenOffline(), MountMgrNextDriveLetter(), MountMgrQueryAutoMount(), MountMgrQueryDosVolumePath(), MountMgrQueryDosVolumePaths(), MountMgrQueryPoints(), MountMgrSetAutoMount(), MountMgrVolumeArrivalNotification(), MountMgrVolumeMountPointChanged(), MPU401DeviceControl(), MsfsClose(), MsfsCreate(), MsfsCreateMailslot(), MsfsFileSystemControl(), MsfsPeekNextIrp(), MsfsQueryInformation(), MsfsRead(), MsfsSetInformation(), MsfsWrite(), MupCleanup(), MupCleanupVcb(), MupClose(), MupCreate(), MupDereferenceMasterIoContext(), MupForwardIoRequest(), MupFsControl(), NdisGenericIrpHandler(), NdisIDeviceIoControl(), NdisIDispatchPnp(), NdisIPnPStartDevice(), NdisIPwrQueryPower(), NdisIPwrSetPower(), NduDispatchClose(), NduDispatchCreate(), NduDispatchDeviceControl(), NduDispatchRead(), NduDispatchWrite(), NewDispatchObject(), nfs41_FsdDispatch(), notify_change_directory(), NpAddWaiter(), NpCommonCleanup(), NpCommonClose(), NpCommonFileSystemControl(), NpCommonFlushBuffers(), NpCommonQueryInformation(), NpCommonQuerySecurityInfo(), NpCommonQueryVolumeInformation(), NpCommonSetInformation(), NpCommonSetSecurityInfo(), NpDisconnect(), NpFsdCreate(), NpFsdCreateNamedPipe(), NpFsdRead(), NpFsdWrite(), NpImpersonate(), NpListen(), NpPeek(), NpQueryClientProcess(), NpSetClientProcess(), NpTransceive(), NpWaitForNamedPipe(), NpWriteDataQueue(), NtfsAllocateIrpContext(), NtfsCreateFile(), NtfsMountVolume(), NtfsQueryDirectory(), NtfsUserFsRequest(), NullDispatch(), open_file(), open_file2(), PacketSocketRecvComplete(), PacketSocketSendComplete(), PartitionHandleDeviceControl(), PartitionHandleDeviceRelations(), PartitionHandlePnp(), PartitionHandleQueryCapabilities(), PartitionHandleQueryId(), PartMgrDeviceControl(), PartMgrPnp(), PartMgrPower(), PartMgrReadWrite(), PcDispatchIrp(), PcHandlePropertyWithTable(), PciDispatchDeviceControl(), PciDispatchIrp(), PciIdeXFdoPnpDispatch(), PciIdeXFdoStartDevice(), PciIdeXForwardOrIgnore(), PciIdeXPdoPnpDispatch(), PciIdeXPdoQueryDeviceText(), PciIdeXPdoQueryId(), PciPassIrpFromFdoToPdo(), PcmciaDeviceControl(), PcmciaPower(), pdo_device_usage_notification(), PDO_Dispatch(), PDO_HandleInternalDeviceControl(), PDO_HandlePnp(), PDO_HandlePower(), pdo_pnp(), pdo_query_device_relations(), pdo_query_id(), PdoCreate(), PdoPnpControl(), PdoPower(), PdoPowerControl(), PdoWrite(), pice_ioctl(), Pin_fnClose(), Pin_fnDeviceIoControl(), Pin_fnWrite(), PinPropertyHandler(), PinWaveCyclicDataFormat(), PinWavePciDataFormat(), pnp_device_usage_notification(), PnpRootFdoPnpControl(), PnpRootPdoPnpControl(), PnpRootPowerControl(), PopRequestPowerIrpCompletion(), PortClsPnp(), PortClsPower(), PortFdoPnp(), PortFdoStartDevice(), ProcessorPnp(), PropertyItemDispatch(), query_dir_item(), query_directory(), query_info(), QueryPointsFromMemory(), QueryPointsFromSymbolicLinkName(), QueueThread(), QueueUserModeIrp(), RamdiskCreateRamdisk(), RamdiskDeviceControl(), RamdiskGetPartitionInfo(), RamdiskPnp(), RamdiskPower(), RamdiskQueryCapabilities(), RamdiskQueryDeviceText(), RamdiskQueryId(), RamdiskReadWrite(), RamdiskReadWriteReal(), RamdiskSetPartitionInfo(), RamdiskWorkerThread(), RawCompletionRoutine(), RawDispatch(), ReadBytes(), ReadIrpCancel(), ReadWritePassive(), ReceiveActivity(), ReceiveComplete(), RegisterUncProvider(), RequestedPowerCompletion(), RequestGetCurrentStackLocationFlags(), RequestHandleReadWrite(), RequestIssueShutdownFlush(), RequestProcessInternalDeviceControl(), RequestProcessPowerIrpCompletion(), RequestProcessSetPower(), RequestProcessShutdownFlush(), RequestSetupMcnSyncIrp(), RequestValidateRawRead(), RequestValidateReadWrite(), RetryRequest(), RfsdAllocateIrpContext(), RfsdAllowExtendedDasdIo(), RfsdCreate(), RfsdCreateFile(), RfsdCreateVolume(), RfsdDeviceControl(), RfsdDeviceControlNormal(), RfsdExceptionHandler(), RfsdFlush(), RfsdInvalidateVolumes(), RfsdLockVolume(), RfsdMountVolume(), RfsdNotifyChangeDirectory(), RfsdQueryDirectory(), RfsdQueryInformation(), RfsdQueryVolumeInformation(), RfsdReadFile(), RfsdReadVolume(), RfsdReadWriteBlocks(), RfsdSetDispositionInfo(), RfsdSetInformation(), RfsdSetRenameInfo(), RfsdSetVolumeInformation(), RfsdShutDown(), RfsdUnlockVolume(), RfsdUserFsRequest(), RfsdVerifyVolume(), RfsdWriteComplete(), RfsdWriteFile(), RfsdWriteVolume(), RxCommonWrite(), RxCompleteRequest_Real(), RxFsdDispatch(), RxInitializeContext(), SatisfyPacketRecvRequest(), SatisfyPreAccept(), ScrCreateClose(), ScrDispatch(), ScreenDeviceControl(), ScreenWrite(), ScrIoControl(), ScrWrite(), ScsiCdRomReadVerification(), ScsiCdRomStartIo(), ScsiClassBuildRequest(), ScsiClassCheckVerifyComplete(), ScsiClassDeviceControl(), ScsiClassInternalIoControl(), ScsiClassIoComplete(), ScsiClassIoCompleteAssociated(), ScsiClassPlugPlay(), ScsiClassReadWrite(), ScsiClassSendSrbAsynchronous(), ScsiClassSplitRequest(), ScsiDiskDeviceControl(), ScsiDiskReadWriteVerification(), ScsiDiskShutdownFlush(), ScsiFlopDeviceControl(), ScsiFlopReadWriteVerification(), ScsiPortDeviceControl(), ScsiPortDispatchScsi(), ScsiPortStartIo(), ScsiPortStartPacket(), SendComplete(), SendDeviceIrp(), SenseInfoRequestGetInformation(), SequentialQueueEvtIoReadWrite(), SerenumFdoPnp(), SerenumPdoPnp(), SerenumPdoQueryId(), SerialCreate(), SerialDeviceControl(), SerialGetPerfStats(), SerialGetUserBuffers(), SerialPnp(), SerialQueryInformation(), SerialRead(), SerialWrite(), SermouseInternalDeviceControl(), SermousePnp(), ServiceTransferRequest(), set_case_sensitive_information(), set_compression(), set_reparse_point(), set_valid_data_length_information(), SetDeviceFunctional(), SetupReadWriteTransferPacket(), SignalSocket(), SpiAdapterControl(), SpiGetInquiryData(), SpiGetNextRequestFromLun(), SpiHandleAttachRelease(), StreamClassPnp(), StreamClassStartDevice(), StreamSocketConnectComplete(), SubmitTransferPacket(), SwDispatchDeviceControl(), SwDispatchPnp(), SwDispatchPower(), SysAudio_Pnp(), SysAudioHandleProperty(), SysAudioOpenVirtualDevice(), SysPoCompletionRoutine(), TCPAcceptEventHandler(), TestDispatch(), TiCloseFileObject(), TiCreateFileObject(), TiDispatch(), TiDispatchInternal(), TiDispatchOpenClose(), ToshibaProcessError(), TransferPktComplete(), UDFAllocateIrpContext(), UDFCleanup(), UDFCommonCleanup(), UDFCommonClose(), UDFCommonCreate(), UDFCommonDeviceControl(), UDFCommonDirControl(), UDFCommonFileInfo(), UDFCommonFlush(), UDFCommonFSControl(), UDFCommonLockControl(), UDFCommonPnp(), UDFCommonQueryVolInfo(), UDFCommonRead(), UDFCommonSetVolInfo(), UDFCommonShutdown(), UDFCommonWrite(), UDFDismountVolume(), UDFExceptionHandler(), UDFGetFileAllocModeFromICB(), UDFGetRetrievalPointers(), UDFGetStatistics(), UDFGetVolumeBitmap(), UDFInvalidateVolumes(), UDFIsPathnameValid(), UDFIsVolumeDirty(), UDFIsVolumeMounted(), UDFLockVolume(), UDFMountVolume(), UDFPerformVerify(), UDFSetFileAllocModeFromICB(), UDFUnlockCallersBuffer(), UDFUnlockVolume(), UDFUserFsCtrlRequest(), UDFVerifyVolume(), unlock_volume(), UnlockAndMaybeComplete(), USBCCGP_BuildConfigurationDescriptor(), USBCCGP_Dispatch(), USBCCGP_PdoHandleDeviceRelations(), USBCCGP_PdoHandleQueryDeviceText(), USBCCGP_PdoHandleQueryId(), USBCCGP_PDOSelectConfiguration(), USBFlopFormatTracks(), USBFlopGetMediaTypes(), USBH_DeviceControl(), USBH_FdoDeferPoRequestCompletion(), USBH_FdoDispatch(), USBH_FdoIdleNotificationCallback(), USBH_FdoPnP(), USBH_FdoPower(), USBH_HubDispatch(), USBH_IoctlGetDescriptor(), USBH_IoctlGetHubCapabilities(), USBH_IoctlGetNodeConnectionAttributes(), USBH_IoctlGetNodeConnectionDriverKeyName(), USBH_IoctlGetNodeConnectionInformation(), USBH_IoctlGetNodeInformation(), USBH_IoctlGetNodeName(), USBH_PdoDispatch(), USBH_PdoInternalControl(), USBH_PdoIoctlGetPortStatus(), USBH_PdoPnP(), USBH_PdoQueryDeviceText(), USBH_PdoQueryId(), USBH_PortIdleNotificationRequest(), USBH_PowerIrpCompletion(), USBH_QueryCapsComplete(), USBPORT_Dispatch(), USBPORT_DoIdleNotificationCallback(), USBPORT_FdoDeviceControl(), USBPORT_FdoPnP(), USBPORT_FdoPower(), USBPORT_GetUnicodeName(), USBPORT_ParseResources(), USBPORT_PdoDevicePowerState(), USBPORT_PdoInternalDeviceControl(), USBPORT_PdoPnP(), USBPORT_PdoPower(), USBPORT_PdoQueryInterface(), USBPORT_QueryCapabilities(), USBSTOR_CBWCompletionRoutine(), USBSTOR_CSWCompletionRoutine(), USBSTOR_DataCompletionRoutine(), USBSTOR_FdoHandleDeviceRelations(), USBSTOR_FdoHandlePnp(), USBSTOR_HandleDeviceControl(), USBSTOR_HandleExecuteSCSI(), USBSTOR_HandleInternalDeviceControl(), USBSTOR_HandleQueryProperty(), USBSTOR_HandleTransferError(), USBSTOR_IssueRequestSense(), USBSTOR_PdoHandleDeviceRelations(), USBSTOR_PdoHandlePnp(), USBSTOR_PdoHandleQueryDeviceText(), USBSTOR_QueueAddIrp(), USBSTOR_QueueNextRequest(), USBSTOR_QueueRelease(), USBSTOR_QueueTerminateRequest(), USBSTOR_SendCBWRequest(), USBSTOR_SendFormatCapacity(), USBSTOR_SendInquiry(), USBSTOR_SendModeSense(), USBSTOR_SendReadWrite(), USBSTOR_SendTestUnit(), USBSTOR_SendUnknownRequest(), USBSTOR_StartIo(), VcdDeviceControl(), VcdRead(), VerifyIrpInBufferSize(), VerifyIrpOutBufferSize(), VfatAllocateIrpContext(), VfatCreateFile(), VfdCreateClose(), VfdDeviceControl(), VfdDeviceThread(), VfdReadWrite(), ViCheckVerify(), ViCreateDevice(), VideoPortForwardDeviceControl(), ViEnumerateDrives(), ViGetDriveGeometry(), ViGetImagePath(), ViGetLastSession(), ViReadToc(), ViReadTocEx(), vol_device_control(), vol_get_device_number(), vol_get_disk_extents(), vol_get_drive_geometry(), vol_get_gpt_attributes(), vol_get_length(), vol_ioctl_passthrough(), vol_is_dynamic(), vol_query_device_name(), vol_query_stable_guid(), vol_query_unique_id(), vol_read(), vol_write(), WdmAudCleanup(), WdmAudCreate(), WdmAudDeviceControl(), WdmAudPnp(), WdmAudReadWrite(), WmipIoControl(), write_file(), and write_file2().

◆ IoGetCurrentProcess()

NTKERNELAPI PEPROCESS NTAPI IoGetCurrentProcess ( VOID  )

◆ IoGetDeviceAttachmentBaseRef()

NTKERNELAPI PDEVICE_OBJECT NTAPI IoGetDeviceAttachmentBaseRef ( _In_ PDEVICE_OBJECT  DeviceObject)

◆ IoGetDiskDeviceObject()

NTKERNELAPI NTSTATUS NTAPI IoGetDiskDeviceObject ( _In_ PDEVICE_OBJECT  FileSystemDeviceObject,
_Out_ PDEVICE_OBJECT DiskDeviceObject 
)

◆ IoGetIoPriorityHint()

◆ IoGetIrpExtraCreateParameter()

NTKRNLVISTAAPI NTSTATUS NTAPI IoGetIrpExtraCreateParameter ( _In_ PIRP  Irp,
_Outptr_result_maybenull_ struct _ECP_LIST **  ExtraCreateParameter 
)

Referenced by FsRtlGetEcpListFromIrp().

◆ IoGetLowerDeviceObject()

NTKERNELAPI PDEVICE_OBJECT NTAPI IoGetLowerDeviceObject ( _In_ PDEVICE_OBJECT  DeviceObject)

◆ IoGetNextIrpStackLocation()

__drv_aliasesMem FORCEINLINE PIO_STACK_LOCATION IoGetNextIrpStackLocation ( _In_ PIRP  Irp)

Definition at line 2691 of file iofuncs.h.

2693 {
2694  ASSERT(Irp->CurrentLocation > 0);
2695 #ifdef NONAMELESSUNION
2696  return ((Irp)->Tail.Overlay.s.u.CurrentStackLocation - 1 );
2697 #else
2698  return ((Irp)->Tail.Overlay.CurrentStackLocation - 1 );
2699 #endif
2700 }
_In_ PIRP Irp
Definition: csq.h:116
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel) ?(CompletionRoutine !=NULL) :TRUE)

Referenced by FxQueryInterface::_FormatIrp(), FxIrp::_GetAndClearNextStackLocation(), _IRQL_requires_max_(), _MiSimpleWrite(), _Success_(), BuildAndSubmitIrp(), Bus_GetDeviceCapabilities(), CallUSBD(), CaptureInitializeUrbAndIrp(), CdCommonDevControl(), CdHijackIrpAndFlushDevice(), CdMultipleXAAsync(), CdPerformDevIoCtrlEx(), CdReadSectors(), CdRomDeviceControl(), CdRomDeviceControlCompletion(), CdRomMediaChangeCompletion(), CdRomSetVolumeIntermediateCompletion(), CdRomSwitchModeCompletion(), CdRomTickHandler(), CdRomUpdateCapacity(), CdRomUpdateGeometryCompletion(), CdRomXACompletion(), ClassDeviceControl(), ClassInternalIoControl(), ClassIoCompleteAssociated(), ClasspBuildRequestEx(), ClasspMediaChangeDetectionCompletion(), ClasspPowerDownCompletion(), ClasspPowerHandler(), ClasspPowerUpCompletion(), ClasspPrepareMcnIrp(), ClasspReleaseQueue(), ClassSendDeviceIoControlSynchronous(), ClassSendSrbSynchronous(), ClassSendStartUnit(), clean_space_cache(), CmBattGetAcpiInterfaces(), CompBattAddNewBattery(), CreateCdRomDeviceObject(), dev_ioctl(), DeviceSendIoctlAsynchronously(), DiskFlushDispatch(), DiskInfoExceptionCheck(), DiskInfoExceptionComplete(), DiskPerformSmartCommand(), DiskShutdownFlush(), Ext2DeviceControlNormal(), Ext2Flush(), Ext2IsMediaWriteProtected(), Ext2ReadSync(), Ext2ReadWriteBlocks(), FatHijackIrpAndFlushDevice(), FatIsMediaWriteProtected(), FatMultipleAsync(), FatPagingFileIo(), FatPerformDevIoCtrl(), FatPerformVerifyDiskRead(), FatSingleAsync(), FatSingleNonAlignedSync(), FDO_QueryCapabilities(), FFSDeviceControlNormal(), FFSFlush(), FFSIsMediaWriteProtected(), FFSReadSync(), FFSReadWriteBlocks(), flush_disk_caches(), FreeBT_DispatchRead(), FreeBT_DispatchWrite(), FreeBT_GetHCIEvent(), FreeBT_GetPortStatus(), FreeBT_HCIEventCompletion(), FreeBT_ResetParentPort(), FreeBT_SendHCICommand(), FreeBT_WriteCompletion(), FsRecGetDeviceSectors(), FsRecGetDeviceSectorSize(), FsRecReadBlock(), FstubReadSector(), FstubWriteSector(), GetBusInterface(), GetDeviceId(), Hid_DispatchUrb(), HidClass_BuildIrp(), HidClassFDO_GetDescriptors(), HidClassFDO_QueryCapabilities(), HidUsb_GetPortStatus(), HidUsb_ReadReport(), HitachProcessError(), InitCapturePin(), InitStreamPin(), IoBuildAsynchronousFsdRequest(), IoBuildDeviceIoControlRequest(), IoCancelFileOpen(), IoCopyCurrentIrpStackLocationToNext(), IofCallDriver(), IoPageRead(), IopCloseFile(), IopDeleteFile(), IopDeviceFsIoControl(), IopGetFileInformation(), IopGetSetSecurityObject(), IopInitiatePnpIrp(), IopLoadFileSystemDriver(), IopMountVolume(), IopOpenLinkOrRenameTarget(), IopParseDevice(), IopQueryDeviceInformation(), IopSynchronousCall(), IoSetInformation(), IoSynchronousPageWrite(), IoVerifyVolume(), IsaPdoRepeatRequest(), IssueUniqueIdChangeNotifyWorker(), KbdHid_Flush(), KbdHid_InitiateRead(), KspDeviceSetGetBusData(), KsQueryInformationFile(), KsSetInformationFile(), KsStreamIo(), KsSynchronousIoControlDevice(), MiSimpleRead(), MouHid_Flush(), MouHid_InitiateRead(), MountMgrNotifyNameChange(), MupBuildIoControlRequest(), NpTransceive(), NtFlushBuffersFile(), NtfsDeviceIoControl(), NtfsReadDisk(), NtLockFile(), NtNotifyChangeDirectoryFile(), NtQueryDirectoryFile(), NtQueryInformationFile(), NtQueryVolumeInformationFile(), NtReadFile(), NtSetInformationFile(), NtSetVolumeInformationFile(), NtUnlockFile(), NtWriteFile(), PciGetDeviceCapabilities(), PciQueryForPciBusInterface(), pdo_device_usage_notification(), Pin_fnWrite(), PopPassivePowerCall(), PopSendQuerySystemPowerState(), PopSendSetSystemPowerState(), PoRequestPowerIrp(), PortSendInquiry(), QueryBusInterface(), QueryDeviceInformation(), QuerySuggestedLinkName(), RawReadWriteDeviceControl(), read_data(), RenderInitializeUrbAndIrp(), RequestProcessInternalDeviceControl(), RequestSetupMcnSyncIrp(), ResetBus(), ResetScsiBus(), RetryPowerRequest(), RetryRequest(), RfsdDeviceControlNormal(), RfsdFlush(), RfsdIsMediaWriteProtected(), RfsdReadSync(), RfsdReadWriteBlocks(), ScratchBuffer_SetupReadWriteSrb(), scrub_chunk_raid56_stripe_run(), scrub_extent(), ScsiCdRomStartIo(), ScsiClassBuildRequest(), ScsiClassClaimDevice(), ScsiClassDeviceControl(), ScsiClassInternalIoControl(), ScsiClassIoCompleteAssociated(), ScsiClassReleaseQueue(), ScsiClassSendSrbAsynchronous(), ScsiClassSendSrbSynchronous(), ScsiClassSplitRequest(), ScsiDiskShutdownFlush(), ScsiFlopProcessError(), send_disks_pnp_message(), SendLinkCreated(), SendLinkDeleted(), SendOnlineNotification(), SpiSendInquiry(), SpiSendRequestSense(), StartUnit(), SubmitIdleRequestIrp(), SubmitTransferPacket(), SubmitUrbSync(), sync_read_phys(), TdiQueryDeviceControl(), ToshibaProcessError(), UDFCommonFlush(), UDFPhReadSynchronous(), UDFPhSendIOCTL(), UDFPhWriteSynchronous(), USBCCGP_QueryInterface(), USBCCGP_SyncUrbRequest(), USBH_ChangeIndicationAckChange(), USBH_ChangeIndicationQueryChange(), USBH_FdoSubmitIdleRequestIrp(), USBH_GetPortStatus(), USBH_QueryCapabilities(), USBH_SubmitStatusChangeTransfer(), USBH_SyncGetDeviceHandle(), USBH_SyncGetHubCount(), USBH_SyncGetRootHubPdo(), USBH_SyncSubmitUrb(), USBHUB_GetBusInterface(), USBHUB_GetBusInterfaceUSBDI(), USBPORT_IsCompanionController(), USBPORT_QueryCapabilities(), USBPORT_QueryPciBusInterface(), USBSTOR_AllocateIrp(), USBSTOR_CBWCompletionRoutine(), USBSTOR_GetBusInterface(), USBSTOR_IssueBulkOrInterruptRequest(), USBSTOR_SendCBW(), USBSTOR_SendCSW(), USBSTOR_SendInternalCdb(), USBSTOR_SyncUrbRequest(), VfatBlockDeviceIoControl(), VfatReadDisk(), VfatReadDiskPartial(), VfatWriteDisk(), VfatWriteDiskPartial(), ViReadFile(), vol_ioctl_passthrough(), vol_read(), vol_write(), WdmAudReadWrite(), write_data(), write_data_phys(), write_superblock(), xHalExamineMBR(), xHalIoReadPartitionTable(), xHalIoSetPartitionInformation(), and xHalIoWritePartitionTable().

◆ IoGetRelatedDeviceObject()

NTKERNELAPI PDEVICE_OBJECT NTAPI IoGetRelatedDeviceObject ( _In_ PFILE_OBJECT  FileObject)

◆ IoGetRequestorProcess()

NTKERNELAPI PEPROCESS NTAPI IoGetRequestorProcess ( _In_ PIRP  Irp)

◆ IoGetRequestorProcessId()

NTKERNELAPI ULONG NTAPI IoGetRequestorProcessId ( _In_ PIRP  Irp)

◆ IoGetRequestorSessionId()

NTKERNELAPI NTSTATUS NTAPI IoGetRequestorSessionId ( _In_ PIRP  Irp,
_Out_ PULONG  pSessionId 
)

◆ IoGetSfioStreamIdentifier()

PVOID NTAPI IoGetSfioStreamIdentifier ( _In_ PFILE_OBJECT  FileObject,
_In_ PVOID  Signature 
)

◆ IoGetTopLevelIrp()

NTKERNELAPI PIRP NTAPI IoGetTopLevelIrp ( VOID  )

◆ IoGetTransactionParameterBlock()

PTXN_PARAMETER_BLOCK NTAPI IoGetTransactionParameterBlock ( _In_ PFILE_OBJECT  FileObject)

◆ IoInitializeDpcRequest()

FORCEINLINE VOID IoInitializeDpcRequest ( _In_ PDEVICE_OBJECT  DeviceObject,
_In_ PIO_DPC_ROUTINE  DpcRoutine 
)

Definition at line 2836 of file iofuncs.h.

2839 {
2840 #ifdef _MSC_VER
2841 #pragma warning(push)
2842 #pragma warning(disable:28024)
2843 #endif
2846  DeviceObject);
2847 #ifdef _MSC_VER
2848 #pragma warning(pop)
2849 #endif
2850 }
VOID NTAPI DpcRoutine(IN PKDPC Dpc, IN PVOID DeferredContext, IN PVOID SystemArgument1, IN PVOID SystemArgument2)
Definition: fbtpnp.c:1298
_In_ PDEVICE_OBJECT DeviceObject
Definition: wdfdevice.h:2055
KDEFERRED_ROUTINE * PKDEFERRED_ROUTINE
Definition: ketypes.h:678
VOID NTAPI KeInitializeDpc(IN PKDPC Dpc, IN PKDEFERRED_ROUTINE DeferredRoutine, IN PVOID DeferredContext)
Definition: dpc.c:711

Referenced by AddControllers(), DriverEntry(), HDA_AddDevice(), InPortAddDevice(), and ScsiPortInitialize().

◆ IoInitializeThreadedDpcRequest()

FORCEINLINE VOID IoInitializeThreadedDpcRequest ( _In_ PDEVICE_OBJECT  DeviceObject,
_In_ PIO_DPC_ROUTINE  DpcRoutine 
)

Definition at line 2899 of file iofuncs.h.

2902 {
2903 #ifdef _MSC_VER
2904 #pragma warning(push)
2905 #pragma warning(disable:28024)
2906 #pragma warning(disable:28128)
2907 #endif
2910  DeviceObject );
2911 #ifdef _MSC_VER
2912 #pragma warning(pop)
2913 #endif
2914 }
VOID NTAPI DpcRoutine(IN PKDPC Dpc, IN PVOID DeferredContext, IN PVOID SystemArgument1, IN PVOID SystemArgument2)
Definition: fbtpnp.c:1298
VOID NTAPI KeInitializeThreadedDpc(IN PKDPC Dpc, IN PKDEFERRED_ROUTINE DeferredRoutine, IN PVOID DeferredContext)
Definition: dpc.c:698
_In_ PDEVICE_OBJECT DeviceObject
Definition: wdfdevice.h:2055
KDEFERRED_ROUTINE * PKDEFERRED_ROUTINE
Definition: ketypes.h:678

◆ IoInitializeWorkItem()

VOID NTAPI IoInitializeWorkItem ( _In_ PVOID  IoObject,
_Out_ PIO_WORKITEM  IoWorkItem 
)

◆ IoIsFileObjectIgnoringSharing()

BOOLEAN NTAPI IoIsFileObjectIgnoringSharing ( _In_ PFILE_OBJECT  FileObject)

◆ IoIsOperationSynchronous()

NTKERNELAPI BOOLEAN NTAPI IoIsOperationSynchronous ( _In_ PIRP  Irp)

◆ IoIsSystemThread()

NTKERNELAPI BOOLEAN NTAPI IoIsSystemThread ( _In_ PETHREAD  Thread)

◆ IoIsValidNameGraftingBuffer()

NTKERNELAPI BOOLEAN NTAPI IoIsValidNameGraftingBuffer ( _In_ PIRP  Irp,
_In_ PREPARSE_DATA_BUFFER  ReparseBuffer 
)

◆ IoMapTransfer()

NTHALAPI PHYSICAL_ADDRESS NTAPI IoMapTransfer ( _In_ PADAPTER_OBJECT  AdapterObject,
_In_ PMDL  Mdl,
_In_ PVOID  MapRegisterBase,
_In_ PVOID  CurrentVa,
_Inout_ PULONG  Length,
_In_ BOOLEAN  WriteToDevice 
)

◆ IoMarkIrpPending()

FORCEINLINE VOID IoMarkIrpPending ( _Inout_ PIRP  Irp)

Definition at line 2802 of file iofuncs.h.

2804 {
2806 }
#define SL_PENDING_RETURNED
Definition: iotypes.h:3304
_In_ PIRP Irp
Definition: csq.h:116
__drv_aliasesMem FORCEINLINE PIO_STACK_LOCATION IoGetCurrentIrpStackLocation(_In_ PIRP Irp)
Definition: iofuncs.h:2789

◆ IoPageRead()

NTKERNELAPI NTSTATUS NTAPI IoPageRead ( _In_ PFILE_OBJECT  FileObject,
_In_ PMDL  Mdl,
_In_ PLARGE_INTEGER  Offset,
_In_ PKEVENT  Event,
_Out_ PIO_STATUS_BLOCK  IoStatusBlock 
)

◆ IoQueryDeviceDescription()

NTKERNELAPI NTSTATUS NTAPI IoQueryDeviceDescription ( _In_opt_ PINTERFACE_TYPE  BusType,
_In_opt_ PULONG  BusNumber,
_In_opt_ PCONFIGURATION_TYPE  ControllerType,
_In_opt_ PULONG  ControllerNumber,
_In_opt_ PCONFIGURATION_TYPE  PeripheralType,
_In_opt_ PULONG  PeripheralNumber,
_In_ PIO_QUERY_DEVICE_ROUTINE  CalloutRoutine,
_Inout_opt_ PVOID  Context 
)

◆ IoQueryFileDosDeviceName()

NTKERNELAPI NTSTATUS NTAPI IoQueryFileDosDeviceName ( _In_ PFILE_OBJECT  FileObject,
_Out_ POBJECT_NAME_INFORMATION ObjectNameInformation 
)

◆ IoQueryFileInformation()

NTKERNELAPI NTSTATUS NTAPI IoQueryFileInformation ( _In_ PFILE_OBJECT  FileObject,
_In_ FILE_INFORMATION_CLASS  FileInformationClass,
_In_ ULONG  Length,
_Out_ PVOID  FileInformation,
_Out_ PULONG  ReturnedLength 
)

◆ IoQueryVolumeInformation()

NTKERNELAPI NTSTATUS NTAPI IoQueryVolumeInformation ( _In_ PFILE_OBJECT  FileObject,
_In_ FS_INFORMATION_CLASS  FsInformationClass,
_In_ ULONG  Length,
_Out_ PVOID  FsInformation,
_Out_ PULONG  ReturnedLength 
)

◆ IoQueueThreadIrp()

NTKERNELAPI VOID NTAPI IoQueueThreadIrp ( _In_ PIRP  Irp)

◆ IoReadDiskSignature()

NTKERNELAPI NTSTATUS NTAPI IoReadDiskSignature ( _In_ PDEVICE_OBJECT  DeviceObject,
_In_ ULONG  BytesPerSector,
_Out_ PDISK_SIGNATURE  Signature 
)

◆ IoRegisterContainerNotification()

NTSTATUS NTAPI IoRegisterContainerNotification ( _In_ IO_CONTAINER_NOTIFICATION_CLASS  NotificationClass,
_In_ PIO_CONTAINER_NOTIFICATION_FUNCTION  CallbackFunction,
_In_reads_bytes_opt_(NotificationInformationLength) PVOID  NotificationInformation,
_In_ ULONG  NotificationInformationLength,
_Out_ PVOID  CallbackRegistration 
)

◆ IoRegisterFileSystem()

NTKERNELAPI VOID NTAPI IoRegisterFileSystem ( _In_ __drv_aliasesMem PDEVICE_OBJECT  DeviceObject)

◆ IoRegisterFsRegistrationChange()

NTKERNELAPI NTSTATUS NTAPI IoRegisterFsRegistrationChange ( _In_ PDRIVER_OBJECT  DriverObject,
_In_ PDRIVER_FS_NOTIFICATION  DriverNotificationRoutine 
)

◆ IoReleaseRemoveLockEx()

NTKERNELAPI VOID NTAPI IoReleaseRemoveLockEx ( _Inout_ PIO_REMOVE_LOCK  RemoveLock,
_In_opt_ PVOID  Tag,
_In_ ULONG  RemlockSize 
)

◆ IoReleaseVpbSpinLock()

NTKERNELAPI VOID NTAPI IoReleaseVpbSpinLock ( _In_ KIRQL  Irql)

◆ IoReplaceFileObjectName()

NTKERNELAPI NTSTATUS NTAPI IoReplaceFileObjectName ( _In_ PFILE_OBJECT  FileObject,
_In_reads_bytes_(FileNameLength) PWSTR  NewFileName,
_In_ USHORT  FileNameLength 
)

◆ IoReportResourceForDetection()

NTKERNELAPI NTSTATUS NTAPI IoReportResourceForDetection ( _In_ PDRIVER_OBJECT  DriverObject,
_In_reads_bytes_opt_(DriverListSize) PCM_RESOURCE_LIST  DriverList,
_In_opt_ ULONG  DriverListSize,
_In_opt_ PDEVICE_OBJECT  DeviceObject,
_In_reads_bytes_opt_(DeviceListSize) PCM_RESOURCE_LIST  DeviceList,
_In_opt_ ULONG  DeviceListSize,
_Out_ PBOOLEAN  ConflictDetected 
)

◆ IoReportResourceUsage()

NTKERNELAPI NTSTATUS NTAPI IoReportResourceUsage ( _In_opt_ PUNICODE_STRING  DriverClassName,
_In_ PDRIVER_OBJECT  DriverObject,
_In_reads_bytes_opt_(DriverListSize) PCM_RESOURCE_LIST  DriverList,
_In_opt_ ULONG  DriverListSize,
_In_opt_ PDEVICE_OBJECT  DeviceObject,
_In_reads_bytes_opt_(DeviceListSize) PCM_RESOURCE_LIST  DeviceList,
_In_opt_ ULONG  DeviceListSize,
_In_ BOOLEAN  OverrideConflict,
_Out_ PBOOLEAN  ConflictDetected 
)

◆ IoRequestDpc()

FORCEINLINE VOID IoRequestDpc ( _Inout_ PDEVICE_OBJECT  DeviceObject,
_In_opt_ PIRP  Irp,
_In_opt_ __drv_aliasesMem PVOID  Context 
)

Definition at line 2746 of file iofuncs.h.

2750 {
2752 }
BOOLEAN NTAPI KeInsertQueueDpc(IN PKDPC Dpc, IN PVOID SystemArgument1, IN PVOID SystemArgument2)
Definition: dpc.c:724
_In_ PDEVICE_OBJECT DeviceObject
Definition: wdfdevice.h:2055
_In_ PIRP Irp
Definition: csq.h:116

Referenced by HDA_InterruptService(), InPortIsr(), ScsiPortIsr(), ScsiPortStartIo(), ScsiPortStartPacket(), SpiProcessTimeout(), and SpiResetBus().

◆ IoSetDeviceToVerify()

NTKERNELAPI VOID NTAPI IoSetDeviceToVerify ( _In_ PETHREAD  Thread,
_In_opt_ PDEVICE_OBJECT  DeviceObject 
)

◆ IoSetFileOrigin()

NTKERNELAPI NTSTATUS NTAPI IoSetFileOrigin ( _In_ PFILE_OBJECT  FileObject,
_In_ BOOLEAN  Remote 
)

◆ IoSetInformation()

NTKERNELAPI NTSTATUS NTAPI IoSetInformation ( _In_ PFILE_OBJECT  FileObject,
_In_ FILE_INFORMATION_CLASS  FileInformationClass,
_In_ ULONG  Length,
_In_ PVOID  FileInformation 
)

◆ IoSetIoPriorityHint()

NTSTATUS NTAPI IoSetIoPriorityHint ( _In_ PIRP  Irp,
_In_ IO_PRIORITY_HINT  PriorityHint 
)

◆ IoSetIrpExtraCreateParameter()

NTSTATUS NTAPI IoSetIrpExtraCreateParameter ( _Inout_ PIRP  Irp,
_In_ struct _ECP_LIST ExtraCreateParameter 
)

◆ IoSetNextIrpStackLocation()

FORCEINLINE VOID IoSetNextIrpStackLocation ( _Inout_ PIRP  Irp)

◆ IoSetShareAccess()

NTKERNELAPI VOID NTAPI IoSetShareAccess ( _In_ ACCESS_MASK  DesiredAccess,
_In_ ULONG  DesiredShareAccess,
_Inout_ PFILE_OBJECT  FileObject,
_Out_ PSHARE_ACCESS  ShareAccess 
)

◆ IoSetShareAccessEx()

NTKERNELAPI VOID NTAPI IoSetShareAccessEx ( _In_ ACCESS_MASK  DesiredAccess,
_In_ ULONG  DesiredShareAccess,
_Inout_ PFILE_OBJECT  FileObject,
_Out_ PSHARE_ACCESS  ShareAccess,
_In_ PBOOLEAN  WritePermission 
)

◆ IoSetStartIoAttributes()

VOID NTAPI IoSetStartIoAttributes ( _In_ PDEVICE_OBJECT  DeviceObject,
_In_ BOOLEAN  DeferredStartIo,
_In_ BOOLEAN  NonCancelable 
)

◆ IoSetSystemPartition()

NTKERNELAPI NTSTATUS NTAPI IoSetSystemPartition ( _In_ PUNICODE_STRING  VolumeNameString)

◆ IoSetTopLevelIrp()

NTKERNELAPI VOID NTAPI IoSetTopLevelIrp ( _In_opt_ PIRP  Irp)

◆ IoSizeofWorkItem()

ULONG NTAPI IoSizeofWorkItem ( VOID  )

◆ IoSynchronousPageWrite()

NTKERNELAPI NTSTATUS NTAPI IoSynchronousPageWrite ( _In_ PFILE_OBJECT