Zu FindFirstFile sagt das
MSDN:
Zitat:
If the function fails or fails to locate files from the search string in the lpFileName parameter, the return value is INVALID_HANDLE_VALUE and the contents of lpFindFileData are indeterminate. To get extended error information, call the GetLastError function.
If the function fails because no matching files can be found, the GetLastError function returns ERROR_FILE_NOT_FOUND.
Vermutlich reicht die Abfage auf INVALID_HANDLE_VALUE nicht aus.