FLT_PARAMETERS for IRP_MJ_READ union
The following union component is used when the MajorFunction field of the FLT_IO_PARAMETER_BLOCK structure for the operation is IRP_MJ_READ.
Syntax
typedef union _FLT_PARAMETERS {
... ;
struct {
ULONG Length;
ULONG POINTER_ALIGNMENT Key;
LARGE_INTEGER ByteOffset;
PVOID ReadBuffer;
PMDL MdlAddress;
} Read;
... ;
} FLT_PARAMETERS, *PFLT_PARAMETERS;
Members
Read: Structure containing the following members.
Length: Length, in bytes, of the data to be read.
Key: Key value associated with a byte-range lock on the target file.
ByteOffset: Starting byte offset within the file of the data to be read.
ReadBuffer: Pointer to a buffer that receives the data that is read from the file. This member is optional and can be NULL if a MDL is provided in MdlAddress. See Remarks.
MdlAddress: Address of a memory descriptor list (MDL) that describes the buffer that the ReadBuffer member points to. This member is optional and can be NULL if a buffer is provided in ReadBuffer. See Remarks.
Remarks
The FLT_PARAMETERS structure for IRP_MJ_READ operations contains the parameters for a read operation represented by a callback data (FLT_CALLBACK_DATA) structure. It is contained in an FLT_IO_PARAMETER_BLOCK structure.
If both a ReadBuffer and MdlAddress buffer are provided, it is recommended that minifilters use the MDL. The memory that ReadBuffer points to is valid when it is a user mode address being accessed within the context of the calling process, or if it is a kernel mode address.
If a minifilter changes the value of MdlAddress, then after its post operation callback, Filter Manager will free the MDL currently stored in MdlAddress and restore the previous value of MdlAddress.
If the IRP_MN_COMPLETE bit is set in Iopb->MinorFunction then MdlAddress is the address to send to CcMdlReadComplete.
If the IRP_MN_MDL bit (and not the IRP_MN_COMPLETE bit) is set in Iopb->MinorFunction then MdlAddress is the address to send to CcMdlRead.
IRP_MJ_READ can be an IRP-based operation or a fast I/O operation.
Requirements
Requirement type | Requirement |
---|---|
Header | Fltkernel.h (include Fltkernel.h) |