Guardian Native C Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)
Guardian Native C Library Calls (a - e) dlresultcode(3)
NAME
dlresultcode - Returns the error code for the most recent call to dlopen(), dlclose(),ordlsym()
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>
extern int dlresultcode(
void);
DESCRIPTION
The dlresultcode() function retrieves the last error code generated by a call to any of the func-
tions dlopen( ), dlclose(),ordlsym(). Ths function can be used instead of the dlerror() func-
tion when a number is needed instead of a text string error message.
NOTES
The call to dlresultcode() should immediately follow the call to the function for which you want
to check the returned error value. Intervening calls to other functions can affect the validity of
the returned value. 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 of the call, dlresultcode() returns either a 0 (zero) if no previous
error has occurred, or returns the nonzero value for the error detected. Warnings are not con-
sidered errors and cause return of a zero value.
A nonzero value contains two 16-bit fields; the high-order field contains an error code and the
low-order field contains an error-detail code. Most of these codes are a subset of the process
creation errors described in the Guardian Procedure Errors and Messages Manual. Error code
100 is unique to this function and has the following error-detail values:
1 An invalid dlopen_handle value was passed to the dlclose() or dlsym() func-
tion.
2 The target symbol was not found by dlsym().
3 An unrecognized or inconsistent mode value was passed to the dlopen( ) func-
tion.
4 The object_pathname value to dlopen() pointed out-of-bounds.
5 The dlopen( ) or dlclose() function was called while the process was not in a
running phase (that is, while the process was being terminated).
6 The process was not in a suitable state for running initialization or termination
functions, or constructors or destructors for global instances of classes; an area
near the origin of the main process stack might be corrupted. This error-detail
can be generated only by a call to dlopen() or dlclose().
527192-018 Hewlett-Packard Company 1−169