/ Published in: C++

Simple non-dot.net function to determine if a file exists. Uses the WinBase API. Can be used with or without mfc.
Windows, non-dot.net, with or without MFC.
Expand |
Embed | Plain Text
static BOOL FileExists( LPCSTR arg ) { // Use FindFirstFile in WinBase.h to determine if a file exists. WIN32_FIND_DATA FindFileData; HANDLE hFind = FindFirstFile( arg, &FindFileData); return hFind != INVALID_HANDLE_VALUE; }
You need to login to post a comment.