Problem with IRP_MN_QUERY_DIRECTORY....

I am currently having problems with the IRP_MN_QUERY_DIRECTORY…

My Filesystem currently has 4 Directory Entries in the root directory, when
I try to explore the root directory via the Windows Explorer, a
IRP_MN_QUERY_DIRECTORY request is made to return the first single entry.

Once i’ve managed to locate the first single entry and populate the
necessary data required for a FileBothDirectoryInformation request… Another
IRP_MN_QUERY_DIRECTORY request is made, but this time to locate all the
directory entries…

Once i’ve located all 4 directory entries, and populated the necessary data
structures, I return STATUS_SUCCESS…

the problem im having at the moment is that once i’ve located all the
directory entries, and completed the request… IRP_MN_QUERY_DIRECTORY is
constantly being requested!!

why is this? surely im missing something somewhere!! i’ve noticed that the
FastFat filesystem returns STATUS_NO_MORE_FILES when (NextEntry == 0) this
is not the case in my filesystem… when there are no more entries in the
root directory, Dirent is set to NULL… then returns STATUS_SUCCESS…

Regards,
James

General Dynamics United Kingdom Limited
Registered in England and Wales No. 1911653
Registered Office: 100 New Bridge Street, London, EC4V 6JA

As far as I know, you must return STATUS_NO_MORE_FILES, if
you previously returned some entries on queries for this file object
and now you have reached the end. If it is the first call and there is
no entries to return, you must return STATUS_FILE_NOT_FOUND.

Leonid.

“James Dunning” wrote in message
news:xxxxx@ntfsd…
>
> I am currently having problems with the IRP_MN_QUERY_DIRECTORY…
>
> My Filesystem currently has 4 Directory Entries in the root directory,
when
> I try to explore the root directory via the Windows Explorer, a
> IRP_MN_QUERY_DIRECTORY request is made to return the first single entry.
>
> Once i’ve managed to locate the first single entry and populate the
> necessary data required for a FileBothDirectoryInformation request…
Another
> IRP_MN_QUERY_DIRECTORY request is made, but this time to locate all the
> directory entries…
>
> Once i’ve located all 4 directory entries, and populated the necessary
data
> structures, I return STATUS_SUCCESS…
>
> the problem im having at the moment is that once i’ve located all the
> directory entries, and completed the request… IRP_MN_QUERY_DIRECTORY is
> constantly being requested!!
>
> why is this? surely im missing something somewhere!! i’ve noticed that the
> FastFat filesystem returns STATUS_NO_MORE_FILES when (NextEntry == 0) this
> is not the case in my filesystem… when there are no more entries in the
> root directory, Dirent is set to NULL… then returns STATUS_SUCCESS…
>
> Regards,
> James
>
>
> General Dynamics United Kingdom Limited
> Registered in England and Wales No. 1911653
> Registered Office: 100 New Bridge Street, London, EC4V 6JA
>
>
>