Article ID: 166505
Article Last Modified on 11/21/2006
Return Value Nonzero if successful; otherwise 0. To get extended error information, call the Win32 function GetLastError.The documentation should read:
Return Value Nonzero if there are more files; zero if the file found is the last one in the directory or if an error occurred. To get extended error information, call the Win32 function GetLastError. If the file found is the last file in the directory, or if no matching files can be found, the GetLastError function returns ERROR_NO_MORE_FILES.
CFileFind finder;
BOOL bWorking = finder.FindFile("*.*");
while (bWorking)
{
bWorking = finder.FindNextFile();
// Do processing here
}
Additional query words: FindNextFile FileFind CfileFind CftpFileFind CGopherFileFind
Keywords: kbbug kbdocerr kbdocfix kbfileio kbnoupdate kbpending kbusage KB166505