Open System Services Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)
dlerror(3) OSS Library Calls Reference Manual
NAME
dlerror - Returns an explanation of a previous dynamic-link library error
LIBRARY
G-series native Guardian processes: $SYSTEM.SYSnn.ZRLDSRL
G-series native OSS processes: /G/system/sysnn/zrldsrl
H-series and J-series native Guardian processes: $SYSTEM.ZDLLnnn.ZRLDDLL
H-series and J-series OSS processes: /G/system/zdllnnn/zrlddll
SYNOPSIS
#include <dlfcn.h>
char *dlerror(
void );
DESCRIPTION
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 should treat the string as a read-only value. A program that needs to preserve
or modify an error message should make a copy of the message.
NOTES
Calling dlerror( ) before any other dynamic-link library function is called returns a NULL
pointer. Calling dlerror() immediately after calling dlerror( ) also returns a NULL pointer,
regardless of the value returned by the previous call.
The numeric form of the error can be obtained by calling the dlresultcode( ) function instead.
dlresultcode( ) can be called immediately before or after calling dlerror(); neither affects the
information returned by the other.
The rld dynamic loader is an unprivileged interface; it cannot be invoked from a program or
DLL that is licensed or has callable functions, or from a program with a priv entry point. Process
creation fails if such a file refers to dlopen( ), dlsym( ), dlclose( ), dlerror( ),ordlresultcode( ).
Depending upon the circumstances, process-creation error/detail value combinations of 77,11 or
78,7 can result.
RETURN VALUES
Upon successful completion after a previous call to a dynamic-link library function that failed,
dlerror( ) returns a null-terminated character string. Otherwise, a NULL pointer is returned.
The return string has the following characteristics:
• Does not have a trailing newline character
• Does not contain nondisplayable characters
• Has a maximum length of DLERROR_MAX_LENGTH;
DLERROR_MAX_LENGTH is defined in the dlfcn.h and DLFCNH header files.
• Contains newline characters, inserted into the string to ensure that line segments within it
do not exceed 80 characters
Messages are not internationalized.
1−192 Hewlett-Packard Company 527187-017