rld Manual
Using the rld Loader Library
RLD Manual—528857-006
2-12
dlerror()
dlerror()
Summary
The dlerror() function returns an explanation of a previous DLL error.
Syntax for C/C++ Programmers
Parameters
None.
Return Values
Upon successful completion, following a previous call to a DLL function that failed,
dlerror() returns a null-terminated character string. Otherwise, dlerror() returns
a null pointer.
The returned string has these:
Does not have a trailing new-line character.
Does not contain nondisplayable characters.
Has a maximum length of DLERROR_MAX_LENGTH (defined in the dlfcn.h
and DLFCNH header files).
Contains new-line characters, inserted into the string, to ensure that line segments
within it do not exceed 80 characters.
Messages are not internationalized.
Considerations
The dlerror() function returns a pointer to a null-terminated character string that
describes the error status of an immediately preceding call to any of the functions
dlopen(), dlclose(),or dlsym().
The pointer returned designates a static buffer that is overwritten on each call to
dlerror().
Application code must treat the string as a read-only value. A program that must
preserve or modify an error message must make a copy of the message.
#include <dlfcn.h>
char *dlerror(void);