void HostLib_FreeErrorStr(
char * error );
Release error description string.
In some dynamic library loaders (like in Windows) error strings
are allocated dynamically. They need to be explicitly freed
when not used any more.
error - Pointer to a string ro free.
For portability sake, it is recommended to call this function on any
error string returned by hostlib.resource. However you can omit this
if you exactly know that your code runs only on UNIX-alike operating
system (it's UNIX-specific library or driver).
APTR * HostLib_GetInterface(
void * handle,
const char ** symtable,
ULONG * unresolved );
Resolve array of symbols in the host operating system library.
The result is a pointer to a dynamically allocated array of
symbol values.
handle - An opaque library handle provided by HostLib_Open()
symbable - A pointer to a NULL-terminated array of symbol names
unresolved - An optional location where count of unresolved symbols
will be placed. Can be set to NULL to ignore it.
A pointer to a dynamically allocated array of symbol values or NULL if
empty symbol table was given.
Note that the resulting array will always have as many entries as there
are in symbol names array. It some symbols (or even all of them) fail
to resolve, corresponding entries will be set to NULL. You may supply
a valid unresolved pointer if you want to get unresolved symbols count.
Even incomplete interface needs to be freed using HostLib_DropInterface().
Resulting values are valid as long as the library is open. For portability
sake it's advised to free interfaces before closing corresponding libraries.
This function appeared in v2 of hostlib.resource.