INtime SDK Help
strerror, strerror_s, strerrorlen_s, _wcserror, _wcserror_s, _wcserrorlen_s

Gets a system error message corresponding to a value of errno.

#include <string.h>
#include <errno.h> char *strerror(int errnum); char *_strerror(int errnum); errno_t strerror_s(char *dest, rsize_t destsize, errno_t errnum); size_t strerrorlen_s(int errnum);

#include <wchar.h>

wchar_t *_wcserror(int errnum);
int _wcserror_s(wchar_t *dest, rsize_t destsize, errno_t errnum);
size_t _wcserrorlen_s(errno_t errnum);

Parameters

errnum
Error number to map to an error-message string.
dest
A pointer to the buffer where the description string will be stored.
destSize
The length of the buffer where the description string will be stored.

Remarks

The function itself does not actually print the message. To send or print the message, use an output function such as perror.  _strerror is an alternate name for strerror.

strerror_s is a security-enhanced version of strerror.

strerrorlen_s returns the length of the string which would be returned by strerror_s for the given errnum value.

_wcserror, _wcserror_s and _wcserrorlen_s are wide-character versions of strerror, strerror_s and strerrorlen_s.

Return Values

strerror and _wcserror return a pointer to the error-message string.

strerror_s and _wcserror_t return 0 on success or the errno value in the case of an error.

Generic Text Routines

tchar.h routine _UNICODE not defined _UNICODE defined
_tcserror strerror _wcserror
_tcserror_s strerror_s _wcserror_s
_tcserrorlen_s strerrorlen_s _wcserrorlen_s

Requirements

Versions Defined in Include Link to
INtime 3.0
INtime 6.0 (for wide-character and generic text versions)
intime/rt/include/string.h
intime/rt/include/wchar.h
intime/rt/include/tchar.h
string.h
errno.h
wchar.h
tchar.h
clib.lib

See Also

clearerr, ferror, perror

See Also