rld Manual
Using the rld Loader Library
RLD Manual—528857-006
2-10
dlresultcode()
dlresultcode()
Summary
The dlresultcode() function returns the error code for the most recent call to
dlopen(), dlclose(), or dlsym().
Syntax for C/C++ Programmers
Parameters
None.
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 considered 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 Reference
Manual. Error code 100 is unique to this function and has these error-detail values:
An invalid dlopen_handle value was passed to the dlclose or dlsym function.
The target symbol was not found by dlsym().
An unrecognized or inconsistent mode value was passed to the dlopen()
function.
The object_pathname value to dlopen() pointed out-of-bounds.
The dlopen() or dlclose() function was called while the process was not in a
running phase (that is, while the process was being terminated).
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().
The process phase changed unexpectedly while running initialization or
termination functions, or constructors or destructors for global instances of classes.
This error-detail can be generated only by a call to dlopen() or dlclose().
The RTLD_NOLOAD option was passed to dlopen(), but the library specified by
the object_pathname value of that function had not been loaded.
#include <dlfcn.h>
extern int dlresultcode(void);