/ 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.
                Windows, non-dot.net, with or without MFC.
                            
                                Expand |
                                Embed | Plain Text
                            
                        
                        Copy this code and paste it in your HTML
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;
}
Comments
 Subscribe to comments
                    Subscribe to comments
                
                