Get the value of the last error that occured.
UINT GetLastError( )
Return the value of the last error that occured.
FileError::none = No error occurred.
FileError::generic = An unspecified error occurred.
FileError::fileNotFound = The file could not be located.
FileError::badPath = All or part of the path is invalid.
FileError::tooManyOpenFiles = The permitted number of open files was exceeded.
FileError::accessDenied = The file could not be accessed.
FileError::invalidFile = There was an attempt to use an invalid file handle.
FileError::removeCurrentDir = The current working directory cannot be removed.
FileError::directoryFull = There are no more directory entries.
FileError::badSeek = There was an error trying to set the file pointer.
FileError::hardIO = There was a hardware error.
FileError::sharingViolation = SHARE.EXE was not loaded, or a shared region was locked.
FileError::lockViolation = There was an attempt to lock a region that was already locked.
FileError::diskFull = The disk is full.
FileError::endOfFile = The end of file was reached.
//This function open the file c:\test.txt and get the value of the last error
//if open file fails.
string strFile = "C:\\test.txt";
bOK = ff.Open(strFile, file::modeWrite); //open the file, but the file does not exist.
nFileErr = ff.GetLastError();
printf("failed to open the file: %d", nFileErr); //the nFileErr should not be output
header to Include