Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Turbo C - <b>_close() close a file handle</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
_close()                 Close a File Handle

 #include   <io.h>

 int        _close(handle);
 int        handle;                      Handle associated with file

    _close() will close a file associated with 'handle'.  'handle' is a
    file handle obtained from a _creat(), creat(), creatnew(),
    creattemp(), dup(), dup2(), _open() or open() call.  _close() differs
    from close() in that _close() does not cause a 'Ctrl-Z' character to
    be written at the end of a text file when it is closed.

    Returns:    0 is returned, if successful.  On error, a -1 is
                returned. If 'handle' is not a valid open file handle,
                'errno' (defined in <stdlib.h>) is set to EBADF (bad file
                number).

See Also: close() creat() fclose()

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