FindNextFile()

Purpose
The FindNextFile function continues a file search from a previous call to the FindFirstFile function.
 
Library Transcribed by Date of page Updated on
Kernel32.dll J.Paris 25.06.02  
 
Restrictions on use
none
 
Declare 32-bit

Declare Function FindNextFile Lib "kernel32" Alias "FindNextFileA"

    (

       ByVal hFindFile As Integer,

       lpFindFileData As WIN32_FIND_DATA

     ) As Integer

Required Type definition

WIN32_FIND_DATA

FileTime

 
Parameters

hFindFile

 

 

lpFindFileData

Identifies a search handle returned by a previous call to the FindFirstFile function

 

Points to the WIN32_FIND_DATA structure that receives information about the found file or subdirectory. The structure can be used in subsequent calls to the FindNextFile or FindClose function to refer to the file or subdirectory.

 
Return value
If the function succeeds, the return value is a search handle used in a subsequent call to FindNextFile or FindClose
If the function fails, the return value is zero. To get extended error information, call GetLastError. If no matching files can be found, the GetLastError function returns ERROR_NO_MORE_FILES. .
 
Example
George de Greef's "Array of files in a directory"
 
Comments
 
See also

FindFirstFile()

FindClose()