ferror
Tests for an error on a stream.
int ferror( FILE *stream );
Parameters
- stream
-
Pointer to FILE structure.
If no error has occurred on stream, ferror returns 0. Otherwise, it returns a nonzero value. If stream is NULL, ferror invokes the invalid parameter handler, as described in Parameter Validation. If execution is allowed to continue, this function sets errno to EINVAL and returns 0.
See _doserrno, errno, _sys_errlist, and _sys_nerr for more information on these, and other, error codes.
| Function | Required header | Compatibility |
|---|---|---|
| ferror | <stdio.h> | ANSI, Windows 95, Windows 98, Windows 98 Second Edition, Windows Millennium Edition, Windows NT 4.0, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 |
For additional compatibility information, see Compatibility in the Introduction.
Not applicable. To call the standard C function, use PInvoke. For more information, see Platform Invoke Examples.