The only time you can set the name is on the first call. After that
point, the name is saved by the underlying FSD. Look at the FAT code
(dirctrl.c):
//
// If this is the first try then allocate a buffer for the file
// name.
//
if (InitialQuery) {
and earlier:
InitialQuery = (BOOLEAN)((Ccb->UnicodeQueryTemplate.Buffer == NULL)
&&
!FlagOn(Ccb->Flags, CCB_FLAG_MATCH_ALL));
Thus, the only time the name is captured is on first call. You can’t
change the name of a query in the midst of the query - the API just
doesn’t support that.
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 18-21, 2006 (note new date - MS scheduled plugfest the
same week again.)
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Bin Zeng
Sent: Tuesday, March 07, 2006 1:03 PM
To: ntfsd redirect
Subject: [ntfsd] Help: Reset IRP_MJ_DIRECTORY_CONTROL Problem
Hi,All
In IRP_MJ_DIRECTORY_CONTROL/IRP_MN_QUERY_DIRECTORY,
In the completion routing, if it doesn’t return STATUS_SUCCESS, then i
want
to change the filename in IrpSp->Parameters.QueryDirectory.FileName, and
resend the Roll Irp,but it never return STATUS_SUCCESS.
If at the beginning i change the filename in
IrpSp->Parameters.QueryDirectory.FileName. It will
return STATUS_SUCCESS.
Even i reset the IrpSp->Flags = SL_RESTART_SCAN |
SL_RETURN_SINGLE_ENTRY;
It still wont’ return the STATUS_SUCCESS.
Anyone can give me a hint?
Thanks
Ben
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