Guardian Native C Library Calls Reference Manual (G06.28+, H06.05+)

dlerror(3) Guardian Native C 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 native Guardian processes: $SYSTEM.ZDLLnnn.ZRLDDLL
H-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 le 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 dened in the dlfcn.h and DLFCNH header les.
Contains newline characters, inserted into the string to ensure that line segments within it
do not exceed 80 characters
Messages are not internationalized.
154 Hewlett-Packard Company 527192-007