irpSp->Parameters.QueryDirectory.FileIndex ???

Hi all,

I’m writing filter driver which redirects request from
X:\foo to Y:\foo and drive Y can be either local or network drive.

Everything works fine, excluding the case when I share hooked drive (X) and
browse it through the network. In this case I can’t see all files in some
big directories (200 files).

I found that the problem appears when I receive IRP_MJ_DIRECTORY_CONTROL
(IRP_MN_QUERY_DIRECTORY) with SL_INDEX_SPECIFIED in irpSp->Flags…
In my filter driver IRP_MJ_DIRECTORY_CONTROL dispatch routine I use user
supplied parameters to make my own call ZwQueryDirectoryFile() but this
function hasn’t FileIndex input parameter.

As I read a note in Rajeev Nagar’s book “File System Internals”:

“The FileIndex is simply an FSD-specific value that your FSD can
subsequently use (in the next request to get directory contents) to
determine the offset from which to begin scanning the target directory.
As an example, you could return the byte offset of the next entry in the
directory and use this byte offset to begin searching the directory when
the next query directory request is received.”

But I’ve received only FileIndex=0 …

Can someone to explain me, where is the problem?

Thanks,
Kristian


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

What’s up guys? I can’t believe that nobody in this list had this
problem…

Anyway, if somebody has an interest, I found a valuable posting in mail
list archives from David Goebel (Wed, 25 Feb 1998) :

"As you can see from the fastfat and cdfs source (file dirctrl.c) in the
MS IFS kit, they both use FileIndex for SL_INDEX_SPECIFIED as Robert
described below.

NTFS, for several good reasons, doesn’t use this numeric approach.
Instead simply pass a name in the Irp stack location
Parameters.QueryDirectory.FileName along with the SL_INDEX_SPECIFIED
flag and it should start there. I Haven’t personally tried it, but I
do recall it works this way.

David"

Thanks,
Kristian


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com