Kenwood HP 9000 Personal Computer User Manual


 
Chapter 6 223
Shared Library Management Routines
The shl_load Shared Library Management Routines
Syntax
int shl_findsym( shl_t * handle,
const char * sym,
short type,
void * value )
Parameters
handle A pointer to a shared library handle of the library to
search for the symbol name sym. This handle could be
obtained from the shl_get routine (described in the
“The shl_get and shl_get_r Routines”). handle can also
point to:
NULL If a pointer to NULL is specified,
shl_findsym searches all loaded
libraries for sym. If sym is found,
shl_findsym sets handle to a
pointer to the handle of the shared
library containing sym. This is useful
for determining which library a
symbol resides in. For example, the
following code sets handle to a
pointer to the handle of the library
containing symbol _foo:
shl_t handle;
handle = NULL;
shl_findsym(&handle,"_foo",...);
PROG_HANDLE This constant, defined in dl.h, tells
shl_findsym to search for the
symbol in the program itself. This
way, any symbols exported from the
program can be accessed explicitly.
sym A null-terminated character string containing the
name of the symbol to search for.
type The type of symbol to look for. It must be one of the
following values, defined in <dl.h>:
TYPE_PROCEDURE
Look for a function or procedure.
TYPE_DATA