FLT_PARAMETERS for IRP_MJ_WRITE union
The following union component is used when the MajorFunction field of the FLT_IO_PARAMETER_BLOCK structure for the operation is IRP_MJ_WRITE.
Syntax
typedef union _FLT_PARAMETERS {
... ;
struct {
ULONG Length;
ULONG Key;
LARGE_INTEGER ByteOffset;
PVOID WriteBuffer;
PMDL MdlAddress;
} Write;
... ;
} FLT_PARAMETERS, *PFLT_PARAMETERS;
Members
Write: Structure containing the following members.
Length: Length, in bytes, of the data to be written.
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 written.
WriteBuffer: Pointer to a buffer that contains the data to be written to 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 WriteBuffer member points to. This member is optional and can be NULL if a buffer is provided in WriteBuffer. See Remarks.
Remarks
The FLT_PARAMETERS structure for IRP_MJ_WRITE operations contains the parameters for a write operation represented by a callback data (FLT_CALLBACK_DATA) structure. It is contained in an FLT_IO_PARAMETER_BLOCK structure.
If both a WriteBuffer and MdlAddress buffer are provided, it is recommended that minifilters use the MDL. The memory that WriteBuffer 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.
IRP_MJ_WRITE can be an IRP-based operation or a fast I/O operation.
Requirements
Requirement type | Requirement |
---|---|
Header | Fltkernel.h (include Fltkernel.h) |
See also
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for