Microsoft Foundation Classes (mfc.hlp) (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
CFileException::m_cause
CFileException                              Up Contents Index Back
──Microsoft Foundation Classes──────────────────────────────────────────────
 
  Syntax
 
  int m_cause;
 
  Remarks
 
  Contains values defined by a CFileException enumerated type. The
  enumerators are:
 
  Value                              Meaning
 
  CFileException::none               No error occurred.
 
  CFileException::generic            An unspecified error occurred.
 
  CFileException::fileNotFound       The file could not be located.
 
  CFileException::badPath            All or part of the path is invalid.
 
  CFileException::tooManyOpenFiles   The permitted number of open files
                                     was exceeded.
 
  CFileException::accessDenied       The file could not be accessed.
 
  CFileException::invalidFile        There was an attempt to use an
                                     invalid file handle.
 
  CFileException::removeCurrentDir   Current working directory cannot be
                                     removed.
 
  CFileException::directoryFull      There are no more directory entries.
 
  CFileException::badSeek            There was an error trying to set the
                                     file pointer.
 
  CFileException::hardIO             There was a hardware error.
 
  CFileException::sharingViolation   SHARE.EXE was not loaded, or shared
                                     region was locked.
 
  CFileException::lockViolation      There was an attempt to lock a region
                                     that was already locked.
 
  CFileException::diskFull           The disk is full.
 
  CFileException::endOfFile          The end of file was reached.
 
  NOTE: These CFileException cause enumerators are distinct from the
        CArchiveException cause enumerators.
 
  Example
 
  extern char* pFileName;
  TRY
  {
     CFile f( pFileName, CFile::modeCreate | CFile::modeWrite );
  }
  CATCH( CFileException, e)
  {
      if( e->m_cause == CFileException::fileNotFound )
          printf( "ERROR: File not found\n");
  }
  END_CATCH
 
 
 
                                     -♦-