Thanks Tony and others. I shall try to use fltcreatefile and
fltreadfile.
But, before that, I want to quickly see how I use DbgPrint to display
the contents of the buffer. For eg., in FltReadFile (as is in
scanner.c),
status = FltReadFile( Instance,
FileObject,
&offset,
length,
buffer,
FLTFL_IO_OPERATION_NON_CACHED |
FLTFL_IO_OPERATION_DO_NOT_UPDATE_BYTE_OFFSET,
&bytesRead,
NULL,
NULL );
Once the above function is successful, the buffer would be populated.
Now, I want to peek into the contents of buffer. So, I did the
following:
DbgPrint(“Contents of buffer: %s\n”, buffer);
But, this DbgPrint itself doesn’t show up. Not even the words “Contents
of buffer”. Maybe I am going wrong in the output formatting (0x%X ??) ?
I am able to see other DbgPrint values from the DbgViewer.
Please let me know how I can view the contents of the buffer from the
kernel-mode.
Thanks,
Sri.
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Tony Hoyle
Sent: Thursday, March 23, 2006 3:50 PM
To: Windows File Systems Devs Interest List
Subject: Re: [ntfsd] linker errors
Srivathsan_Srinivasagopalan wrote:
I am currently using DbgPrint to see what is going on (using
sysinternal’s dbgview) . But, I really need to log things into a file.
Hence, my question.
You can save the buffer from dbgview easily enough.
There are lots of places where it is not safe even to write to a file,
let alone open a new one (I’m not enough of an expert to know exactly
where these are so avoid it generally - keep kernel space simple, since
an error there can be catastrophic)… it’s generally not worth the
hassle just for logging.
If you really need to do this everywhere it’s probably safer to create a
communications port (FltCreateCommunictionPort) and run a service that
picks up the driver output and processes it. That way most of your
processing stays in userspace.
Tony
Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17
You are currently subscribed to ntfsd as: unknown lmsubst tag argument:
‘’
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.