I think use of Nt(Zw)QueryDirectoryFile is correct because
I don’t see any reason to change the definition of this function
in next NT/2000 releases. If somebody wants to do this I think
he is STUPID.
Here is the prototype of the desired routine:
NTSYSAPI
NTSTATUS
NTAPI
NtQueryDirectoryFile (
IN HANDLE FileHandle,
IN HANDLE Event OPTIONAL,
IN PIO_APC_ROUTINE ApcRoutine OPTIONAL,
IN PVOID ApcContext OPTIONAL,
OUT PIO_STATUS_BLOCK IoStatusBlock,
OUT PVOID FileInformation,
IN ULONG Length,
IN FILE_INFORMATION_CLASS FileInformationClass,
IN BOOLEAN ReturnSingleEntry,
IN PUNICODE_STRING FileName OPTIONAL,
IN BOOLEAN RestartScan
);
You can use either Nt or Zw variant. From some system thread
I recommend Nt variant while from use thread the Zw is better (you
do not need take care of previous mode)
Paul
-----P?vodn? zpr?va-----
Od: xxxxx@omnishift.com [SMTP:xxxxx@omnishift.com]
Odesl?no: 14. ?ervna 2000 17:04
Komu: File Systems Developers
P?edm?t: [ntfsd] RE: Is there a Zw() routine like FindFirstFile()?
Pavel Hrdina wrote:
> Try to use ZwQueryDirectoryFile routine.
> It does all you want to be done.
and Maxim Shatskih wrote:
> As about querying the contents - use NtQueryDirectoryFile.
and thank you for the replies. However, I see no word about either of
these routines in the Win2000 DDK documentation, or the header files in
the DDK, or the header files in my VC++ directory.
I forgot to mention that I’m needing this for Win2000, if that makes any
difference.
Further advice would be most welcome!
Thanks,
Curt