Kenwood HP 9000 Personal Computer User Manual


 
228 Chapter 6
Shared Library Management Routines
The shl_load Shared Library Management Routines
dend The end address (unsigned long) of
the shared library bss segment. The
data and bss segments together form
a contiguous memory block starting
at dstart and ending at dend.
handle The shared library's handle (type
shl_t).
filename A character array containing the
library's path name as specified at
link time or at explicit load time.
initializer A pointer to the shared library's
initializer routine (see “Initializers
for Shared Libraries”. It is NULL if
there is no initializer. This field is
useful for calling the initializer if it
was disabled by the BIND_NOSTART
flag to shl_load.
If the shared library has multiple
initializers, this field will also be set
to NULL. Multiple initializers can be
found with shl_getsymbols,
described later in this chapter.
This buffer is statically allocated. Therefore, if a
program intends to use any of the members of the
structure, the program should make a copy of the
structure before the next call to shl_get. Otherwise,
shl_get will overwrite the static buffer when called
again.
Return Value
If successful, shl_get returns an integer value 0. If the index value
exceeds the number of currently loaded libraries, shl_get returns 1
and sets errno to EINVAL.