What's the difference between NtQueryDirectoryFile and NtQueryDirectoryObject?

Hi Everyone,

I am currently trying to list the directory entries using NtQueryDirectoryFile() but I found out that there is another similar call NtQUeryDirectoryObject() to NtQueryDirectoryFile().

I tried to look at the internet to find the difference between these two calls but I have not found much except for that fact that I would have to call NtOpenDirectoryObject before I use NtQueryDirectoryObject and NtQueryDirectoryObject reads information from a namespace directory. Here is an example.

http://www.koders.com/c/fid489FCB77E946C470566FFB9FF3C39785635BB64E.aspx

Can anyone give me why there are such two functions? I know that this sounds very silly but I will really appreciate if anyone can give me some insight.
Thank you very much in advance.

Ilho <><

Windows has an object store, that includes many things, including devices,
volumes, and various other objects. These are not file system things, so
they make no sense to be file directories. So instead, they are kept in
the object store. See
http://www.microsoft.com/technet/sysinternals/SystemInformation/WinObj.mspx
for a tool that will allow you to explore it.


Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr
Remove StopSpam to reply

wrote in message news:xxxxx@ntdev…
> Hi Everyone,
>
> I am currently trying to list the directory entries using
> NtQueryDirectoryFile() but I found out that there is another similar call
> NtQUeryDirectoryObject() to NtQueryDirectoryFile().
>
> I tried to look at the internet to find the difference between these two
> calls but I have not found much except for that fact that I would have to
> call NtOpenDirectoryObject before I use NtQueryDirectoryObject and
> NtQueryDirectoryObject reads information from a namespace directory. Here
> is an example.
>
> http://www.koders.com/c/fid489FCB77E946C470566FFB9FF3C39785635BB64E.aspx
>
> Can anyone give me why there are such two functions? I know that this
> sounds very silly but I will really appreciate if anyone can give me some
> insight.
> Thank you very much in advance.
>
> Ilho <><
>
>

NtQueryDirectoryObject reads information from a namespace directory, and
NtQueryDirectoryFile reads information from an on-disk filesystem directory.


Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

wrote in message news:xxxxx@ntdev…
> Hi Everyone,
>
> I am currently trying to list the directory entries using
NtQueryDirectoryFile() but I found out that there is another similar call
NtQUeryDirectoryObject() to NtQueryDirectoryFile().
>
> I tried to look at the internet to find the difference between these two
calls but I have not found much except for that fact that I would have to call
NtOpenDirectoryObject before I use NtQueryDirectoryObject and
NtQueryDirectoryObject reads information from a namespace directory. Here is an
example.
>
> http://www.koders.com/c/fid489FCB77E946C470566FFB9FF3C39785635BB64E.aspx
>
> Can anyone give me why there are such two functions? I know that this sounds
very silly but I will really appreciate if anyone can give me some insight.
> Thank you very much in advance.
>
> Ilho <><
>
>