Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5847821
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T12:46:23+00:00 2026-05-22T12:46:23+00:00

I get to know from msdn documentations about ZWQueryDirectoryFile APIs usage. I am puzzled

  • 0

I get to know from msdn documentations about ZWQueryDirectoryFile APIs usage.
I am puzzled with one particular functionality in it.

Case: My application only involves NT level APIs. I have to fetch the files and directories in a specified parent directory with ZwQueryDirectoryFile. I have to allocate buffer with a length which is unknown. So I would like to do it by allocating 4096 and get the entities fit for the size and have to allocate further to get the remaining till ERROR_NO_MORE_FILES.
FindNextFile uses the same concept by calling ZWQueryDirectoryFIle phase by Phase with buffer length 4096. So I assumed, the requirement is definitely feasible through querydirectoryfile api.
My problem is When I call Query directory file for the second time, I dont know how to inform the ZwQueryDirectoryFile api to resume from the previous fetching state.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T12:46:24+00:00Added an answer on May 22, 2026 at 12:46 pm

    You need to pass FALSE in the RestartScan argument. From the documentation:

    RestartScan [in]

    Set to TRUE if the scan is to start at the first entry in the
    directory. Set to FALSE if resuming
    the scan from a previous call.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know you can get metadata and schema info from relational stores in Microsoft
Does anybody know how to get thumbnail (still image) from 3gb video file? First
I get a URL from a user. I need to know: a) is the
How to get to know DNS name of the server where ASP.NET application is
I know I can get the public static members of a class by doing
I know I'll get a thousand Depends on what you're trying to do answers,
Anybody know how to get gmail's OpenID working? All I find is this http://openid-provider.appspot.com/
Anyone know how to get the position of a node using XPath? Say I
I know there are some ways to get notified when the page body has
I know I'm gonna get down votes, but I have to make sure if

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.