Skip to content
slaeshjag edited this page Mar 23, 2013 · 2 revisions

DARNIT_DYNLIB

DARNIT_DYNLIB is a handle for a dynamically linked and loaded library.

d_dynlib_open

DARNIT_DYNLIB *d_dynlib_open(const char *fname);

Opens a dynamically linked library with filename fname and returns a handle to it. Note: You can not load a library located in a LDI file. This is currently not implemented and might never be.

Arguments

  • fname - A relative path to the dynamically linked library to load

Return value Returns NULL on failure. Anything else is a valid handle for the library.

d_dynlib_get

void *d_dynlib_get(DARNIT_DYNLIB *lib, const char *symbol);

Gets the pointer to a symbol in the specified library.

Arguments

  • lib - The handle to the library to get the symbol from
  • symbol - Name of the symbol to look up

Return value Returns NULL on error. Anything else is a valid pointer to the requested symbol.

d_dynlib_close

DARNIT_DYNLIB *d_dynlib_close(DARNIT_DYNLIB *lib);

Unloads a library and invalidates all of its symbols.

Arguments

  • lib - The handle to the library to unload

Return value Returns NULL for compact pointer clearing.

Clone this wiki locally