Tony,
Thanks.
But, I am still unable to figure out where exactly to read the
UserBuffer and copy its contents to the log file (I am using FileSpy). I
am plugging this piece of code in SpyPassThroughCompletion.
if (Irp->AssociatedIrp.SystemBuffer) {
if
(irpStack->Parameters.DeviceIoControl.OutputBufferLength) {
RtlCopyMemory(Irp->UserBuffer,
Irp->AssociatedIrp.SystemBuffer,
irpStack->Parameters.DeviceIoControl.OutputBufferLength);
}
ExFreePool (Irp->AssociatedIrp.SystemBuffer);
}
And, I am unsure how I should be using the SPY_LOG_PRINT function to
enable it to print the contents of the Irp->UserBuffer to log file.
Also, I thought of populating the contents of a (small) file by
modifying the fspylog file. In the IrpFileDump, if I had access to Irp,
I can get the UserBuffer. But, all I have at that point is pRecordIrp
which doesn’t give me UserBuffer access.
Any suggestions to copy the contents of the file which was read to the
log file would be appreciated.
Thanks,
Sri.
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Tony Hoyle
Sent: Monday, March 20, 2006 6:40 PM
To: Windows File Systems Devs Interest List
Subject: Re: [ntfsd] file read - Question
Srivathsan_Srinivasagopalan wrote:
Hi,
into the userBuffer. How do I read the contents of the UserBuffer? Is
it
in Binary or ASCII format?
In drivers there’s no distinction - it could be Unicode, or Klingon or
something. It’s just bytes.
The buffers hold all sorts of things not just file data - and they’re
rarely the whole file (probably on the return path from IRP_MJ_READ with
a zero offset, if the file is small enough… can’t think of another
case).
Tony
Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17
You are currently subscribed to ntfsd as:
xxxxx@satyam.com
To unsubscribe send a blank email to xxxxx@lists.osr.com
DISCLAIMER:
This email (including any attachments) is intended for the sole use of the intended recipient/s and may contain material that is CONFIDENTIAL AND PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or distribution or forwarding of any or all of the contents in this message is STRICTLY PROHIBITED. If you are not the intended recipient, please contact the sender by email and delete all copies; your cooperation in this regard is appreciated.