I am failing to see where i am going wrong. This current code skips straight to closefile. NOt processing any files, i may just be missing something obvious and it has been
Your condition is incorrect, you should compare to to INVALID_HANDLE_VALUE
if ( hFile != INVALID_HANDLE_VALUE)
Besides you skip the first matching file returned by FindFirstFile
, is that what you want?
Also I believe you need a wildcard c:\\*
otherwise it will only match c:\\
itself
hFile = FindFirstFile("C:\\*", &file);