Programming Tips - Win32: Check if a file exists

Date: 2022nov2 Language: C/C++ Platform: win32 Keywords: IsExists Q. Win32: Check if a file exists A.
BOOL IsFileExists(LPCSTR szFilename) { return GetFileAttributes(szFilename) != INVALID_FILE_ATTRIBUTES; }
This will return TRUE if the file is actually a directory. Bonus: in C# you can use File.Exists()