Help ! IRP_MN_QUERY_DIRECTORY

Hi,All

I am trying to create a virtual file in a specify folder. I handle
IRP_MJ_CREATE ,it will create a temporary file, it works fine for most
applications. But when i open the file from network it will query
the file with request IRP_MN_QUERY_DIRECTORY .

I try to intercept IRP_MN_QUERY_DIRECTORY, the first time i change
IrpSp->Parameters.QueryDirectory.FileName to my temporary file. The second
request comes in, IrpSp->Parameters.QueryDirectory.FileName is NULL,so i
pass down to lower file system.

my application get return " No SUCH FILE"…

Anyone can help I will be appreciated.

Thanks

Bin

Can you describe what you expected to see? STATUS_NO_SUCH_FILE is a
legitimate return from a directory enumeration (although on the SECOND
call it would be irregular unless returned also to the first call.)
What was returned on the first enumeration call? What else is in the
directory?

I have often found with directory enumeration that it is useful to build
your own test program that sends NtQueryDirectoryFile calls (it allows
me to know what the application requested AND what the application sees
in return.)

Regards,

Tony

Tony Mason
Consulting Partner
OSR Open Systems Resources, Inc.
http://www.osr.com

Looking forward to seeing you at the next OSR File Systems class in
Boston, MA April 24-27, 2006.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Bin Zeng
Sent: Wednesday, January 11, 2006 2:03 PM
To: ntfsd redirect
Subject: [ntfsd] Help ! IRP_MN_QUERY_DIRECTORY

Hi,All

I am trying to create a virtual file in a specify folder. I handle
IRP_MJ_CREATE ,it will create a temporary file, it works fine for most
applications. But when i open the file from network it will query
the file with request IRP_MN_QUERY_DIRECTORY .

I try to intercept IRP_MN_QUERY_DIRECTORY, the first time i change
IrpSp->Parameters.QueryDirectory.FileName to my temporary file. The
second
request comes in, IrpSp->Parameters.QueryDirectory.FileName is NULL,so
i
pass down to lower file system.

my application get return " No SUCH FILE"…

Anyone can help I will be appreciated.

Thanks

Bin


Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17

You are currently subscribed to ntfsd as: xxxxx@osr.com
To unsubscribe send a blank email to xxxxx@lists.osr.com