kernel32: In FindFirstFileExW(), call NtQueryDirectoryFile() again to determine if it read all files.

Ken Thomases ken at codeweavers.com
Fri Feb 7 14:33:40 CST 2014


On Feb 7, 2014, at 5:59 AM, Alexandre Julliard wrote:

> Ken Thomases <ken at codeweavers.com> writes:
> 
>> On Feb 4, 2014, at 4:37 AM, Alexandre Julliard wrote:
>> 
>>> Ken Thomases <ken at codeweavers.com> writes:
>>> 
>>>> I'm open to suggestions for other ways to fix it.  Can a directory
>>>> handle be made to carry additional state?
>>> 
>>> Not at this point, but we probably want to add a mechanism for that and
>>> get rid of the whole getdirentries mess.
>> 
>> Instead of getdirentries(), we'd use readdir()?  And the extra state would be an index of the next entry to return (so NtQueryDirectoryFile() would skip that many entries, unless told to restart)?
>> 
>> Or did you have something else in mind?
> 
> My plan is rather to move the caching of the whole directory from
> kernel32 to ntdll.

Hmm.  Isn't a file handle potentially shared among processes?  How would the cache, as well as the read position within it, be coordinated?

-Ken




More information about the wine-devel mailing list