Guardian Native C Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)

Guardian Native C Library Calls (a - e) dlopen(3)
NAME
dlopen - Opens a dynamic-link library loadfile from a running process
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>
dlHandle dlopen (
const char *object_pathname,
int mode
);
PARAMETERS
object_pathname
Points to the null-terminated filename of the dynamic-link library (DLL) to be
opened. If object_pathname is NULL, the dlopen() function returns a library
handle that can be used with the dlsym() function to look for symbols in the pro-
gram and in other libraries that were loaded with it.
A nonNULL value must be consistent with the execution environment (Guar-
dian or OSS). If the file is an OSS file, the value specified must be an OSS path-
name; if the file is a Guardian file, the value specified must be a Guardian
lename.
mode Any valid combination of the following mode options:
RTLD_NOW Performs all linking on the newly loaded library immediately.
This is a default value.
RTLD_LAZY Treated the same as RTLD_NOW. If either value is used,
dlopen( ) uses RTLD_NOW. This option is accepted to provide
compatibility with UNIX platforms.
RTLD_GLOBAL
The newly loaded DLLs should be added to the cumulative
loadList; that is, new libraries are added to the global set, which
consists of the program and libraries loaded initially by rld.
This is a default value.
RTLD_LOCAL
Treated the same as RTLD_GLOBAL. If either value is used,
dlopen( ) uses RTLD_GLOBAL. This option is accepted to
provide compatibility with UNIX platforms.
RTLD_NOLOAD
Species that dlopen() should not load the target library, but
should provide a unique library handle for it if the library is
already loaded. This option causes dlopen() to return a 0 (zero)
if the library is not already loaded.
When RTLD_NOLOAD is specified, you cannot specify
RTLD_NOW or RTLD_LAZY.
527192-018 Hewlett-Packard Company 1163