title: Asynchronous NtQueryDirectoryFile?
body: <p>Has anyone managed to figure out how asynchronous calls to <a href="http://msdn.microsoft.com/en-us/library/ff567047.aspx" rel="nofollow">NtQueryDirectoryFile</a> work?</p>
  
  <p>By an asynchronous call, I mean calling <code>NtQueryDirectoryFile</code> on directories <em>not</em> opened with <a href="http://msdn.microsoft.com/en-us/library/ff566424.aspx" rel="nofollow">FILE_SYNCHRONOUS_IO_ALERT</a> or with <a href="http://msdn.microsoft.com/en-us/library/ff566424.aspx" rel="nofollow">FILE_SYNCHRONOUS_IO_NONALERT</a>.</p>
  
  <p>For me, it seems to return <code>STATUS_PENDING</code> just like a normal <a href="http://msdn.microsoft.com/en-us/library/ff567072.aspx" rel="nofollow">NtReadFile</a> request does on a normal file, but when I tried using <a href="http://msdn.microsoft.com/en-us/library/ff567120%28VS.85%29.aspx" rel="nofollow">NtWaitForSingleObject</a> on the directory, it didn't end properly, and I still don't get all the data... why does this happen?</p>