Doesn't CreateFileW return INVALID_HANDLE_VALUE on error instead of NULL? (which is -1, not zero)
Also I think you should check GetLastError to make sure the file was not found, instead of some other error, unless native find behaves as if all errors mean "file not found", of course. And display the error message appropriately.
Of course, you're right. I added a test and fixed that check, thank you.
Regards, Fabian Maurer