Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
MSDN Library
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.


Windows Mobile 6.5
A version of this page is also available for

This function continues a file search from a previous call to the FindFirstFile or the FindFirstFileEx function.

A RAPI version of this function exists called CeFindNextFile (RAPI).

BOOL FindNextFile( 
  HANDLE hFindFile, 
  LPWIN32_FIND_DATA lpFindFileData 


[in] Search handle returned by a previous call to the FindFirstFile or the FindFirstFileEx function.


[out] Pointer to the WIN32_FIND_DATA structure that receives information about the found file or subdirectory. The structure can be used in subsequent calls to this function to refer to the found file or directory.

Nonzero indicates success. Zero indicates failure. To get extended error information, call GetLastError. If no matching files can be found, GetLastError returns ERROR_NO_MORE_FILES.

When the search handle is no longer needed, close it by using the FindClose function.

This function searches for files by name only. It cannot be used for attribute-based searches.

Windows Embedded CEWindows CE 1.0 and later
Windows MobileWindows Mobile Version 5.0 and later

Community Additions

© 2015 Microsoft