BOOL FindNextFile(hFindFile, lpffd) | |||||
HANDLE hFindFile; | /* search handle returned by FindFirstFile | */ | |||
LPWIN32_FIND_DATA lpffd; | /* structure for data on found file | */ |
The FindNextFile function continues a file search from a previous call to the FindFirstFile function.
hFindFile
Specifies a search handle returned by a previous call to the FindFirstFile function.
lpffd
Points to the WIN32_FIND_DATA structure that receives information about the found file or subdirectory if the function is successful.
The WIN32_FIND_DATA structure has the following format:
typedef struct _WIN32_FIND_DATA { /* wfd */
DWORD dwFileAttributes;
FILETIME ftCreationTime;
FILETIME ftLastAccessTime;
FILETIME ftLastWriteTime;
DWORD nFileSizeHigh;
DWORD nFileSizeLow;
DWORD dwReserved0;
DWORD dwReserved1;
CHAR cFileName[ MAX_PATH ];
CHAR cAlternateFileName[ 14 ];
} WIN32_FIND_DATA, *PWI32_FIND_DATA, *LPWIN32_FIND_DATA;
The return value is TRUE if the function was successful, or FALSE if an error occurred. Use the GetLastError function to obtain extended error information. If no matching files can be found, the GetLastError function returns ERROR_NO_MORE_FILES.
This function searches for files by name only; it cannot be used for attribute based searches.
The FindNextFile function may be used as either a wide-character function (where text arguments must use Unicode) or an ANSI function (where text arguments must use characters from the Windows 3.x character set installed).
FindClose, FindFirstFile, GetFileAttributes, SetFileAttributes