I was wondering could anybody help me with a problem I have developing a File
System Filter Driver. Basically what I’m trying to do is when a request is
made to open a certain file a seperate file opens first.
What I’m doing now is creating a new irp to open the second file object (say
“c:\test\test.txt”). The problem I’m having is creating the new file object.
I’m not to sure how to give the File object, I’m not sure how to initialuze
the file or give the full name in a Unicode String.
If anyone has any ideas on how to solve this I would be very grateful,
Thanks
Darren
I’d suggest using IoCreateFile rather than trying to reverse engineer the
mess involved in building your own IRP_MJ_CREATE. You do have the ifs kit,
right? If not, then you need to go and purchase it right now from billg, as
you will not be able to implement a real file system filter driver without
the header files and samples that this comes with.
Meanwhile, IoCreateFile is documented in the ddk:
NTSTATUS
IoCreateFile(
OUT PHANDLE FileHandle,
IN ACCESS_MASK DesiredAccess,
IN POBJECT_ATTRIBUTES ObjectAttributes,
OUT PIO_STATUS_BLOCK IoStatusBlock,
IN PLARGE_INTEGER AllocationSize OPTIONAL,
IN ULONG FileAttributes,
IN ULONG ShareAccess,
IN ULONG Disposition,
IN ULONG CreateOptions,
IN PVOID EaBuffer OPTIONAL,
IN ULONG EaLength,
IN CREATE_FILE_TYPE CreateFileType,
IN PVOID ExtraCreateParameters OPTIONAL,
IN ULONG Options
) ;
-----Original Message-----
From: Darren [mailto:xxxxx@tcd.ie]
Sent: Thursday, March 28, 2002 7:15 AM
To: NT Developers Interest List
Subject: [ntdev] Opening files from Filter Driver.I was wondering could anybody help me with a problem I have
developing a File
System Filter Driver. Basically what I’m trying to do is when
a request is
made to open a certain file a seperate file opens first.
What I’m doing now is creating a new irp to open the second
file object (say
“c:\test\test.txt”). The problem I’m having is creating the
new file object.
I’m not to sure how to give the File object, I’m not sure how
to initialuze
the file or give the full name in a Unicode String.
If anyone has any ideas on how to solve this I would be very
grateful, Thanks Darren
You are currently subscribed to ntdev as:
xxxxx@stratus.com To unsubscribe send a blank email to
%%email.unsub%%