Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- CA-Clipper 5.2 . Technical Reference - <b>_fserror()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 _fsError()
 Return the number of the last DOS error
------------------------------------------------------------------------------
 C Prototype

     #include "filesys.api"
     USHORT _fsError(void)

 Returns

     _fsError() returns the DOS error code (summarized in the table below)
     for the last Filesys function.  If there is no error, _fsError() returns
     zero.

     _fsError() Return Values
     ------------------------------------------------------------------------
     Error   Meaning
     ------------------------------------------------------------------------
     0       Successful
     2       File not found
     3       Path not found
     4       Too many files open
     5       Access denied
     6       Invalid handle
     8       Insufficient memory
     15      Invalid drive specified
     19      Attempted to write to a write-protected disk
     21      Drive not ready
     23      Data CRC error
     29      Write fault
     30      Read fault
     32      Sharing violation
     33      Lock Violation
     ------------------------------------------------------------------------

 Description

     This function returns the last DOS error that occurred.  Each of the
     Filesys functions saves its error status to a static variable that is
     retrieved by this function.  This function is equivalent to the
     CA-Clipper function FERROR().

 Examples

     .  The following code fragment illustrates the use of _fsError()
        to determine if the last operation resulted in an error:

        #include "filesys.api"

        FHANDLE hFile;

        hFile = _fsCreate( "Foo", FC_NORMAL );

        // Check for an open error before using the file
        if (! _fsError() )
        {
           .
           .
           .
           _fsClose( hFile );
        }

 Files:  Library is CLIPPER.LIB, header file is Filesys.api.


See Also: _fsClose() _fsCreate() _fsDelete() _fsOpen()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson