When I trap the call to see what IRP_MJ_WRITE is doing, I find that there
is two call for a write. However I got nothing when I try to print the
buffer for the first write, while I can get back the data before the
second write (I call a read before the write).
Anybody knows what is happening in a IRP_MJ_WRITE?
FilemonHookRoutine - IRP_MJ_WRITE
FilemonWrite - irql=0, writeLength=5, offset=0, information=0,
CurrentByteOffset.LowPart=0, Irp->Flags=a00, FileObject->Flags=41062,
DeviceObject->Flags=50
FilemonWrite - readIrp->Flags=184, FileObject->Flags=41062,
DeviceObject->Flags=50
FilemonWrite - IoCallDriver - Read data success - ntStatus=0,
Information=5
Data=
FilemonWrite - writeLength=5, offset=0, information=0,
CurrentByteOffset.LowPart=5, Irp->Flags=a00, FileObject->Flags=c1062,
DeviceObject->Flags=50
FilemonWrite - Irp->UserBuffer not null
Data=
FilemonWrite - IoCallDriver - write data success - ntStatus=0,
information=5, CurrentByteOffset.LowPart=5
FilemonHookRoutine - IRP_MJ_WRITE - FileObject=8161fb48,
path=C:\FCrypt\12345.txt found in FList.
FilemonWrite - irql=0, writeLength=4096, offset=0, information=0,
CurrentByteOffset.LowPart=5, Irp->Flags=43, FileObject->Flags=c1062,
DeviceObject->Flags=50
FilemonWrite - readIrp->Flags=184, FileObject->Flags=c1062,
DeviceObject->Flags=50
FilemonWrite - IoCallDriver - Read data success - ntStatus=0,
Information=5
Data=12345
FilemonWrite - writeLength=4096, offset=0, information=0,
CurrentByteOffset.LowPart=5, Irp->Flags=43, FileObject->Flags=c1062,
DeviceObject->Flags=50
FilemonWrite - Irp->MdlAddress not null
Data=
FilemonWrite - IoCallDriver - write data success - ntStatus=0,
information=5, CurrentByteOffset.LowPart=5