file.cpp: directory_t::count

Mike McCormack wine.msi@hidden
Tue Jan 13 09:29:46 CET 2009


Hilko Bengen wrote:
> While trying to understand file.cpp, I noticed that directory_t::count
> is not incremented for the special `.' and `..' entries. Is that
> intentional?

Hi Hilko,

Directory entries are added in directory_t::add_entry().  There's two 
cases in which the entry won't be appended or counted.  One is if it 
can't be stat'ed, and one is if it doesn't match the mask that was 
specified when NtQueryDirectoryFile was first called.

The mask is specified by the 10th parameter of NtQueryDirectoryFile.  I 
wrote a small interactive test program (tools/qdf.c) that can be used to 
try out different masks on Windows, and added a short bit of 
documentation on masks there.

Hope that helps,

Mike


More information about the ring3k mailing list