Free Electron
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
fe::DL_Loader Class Reference

Raw access to a dynamic library. More...

#include <DL_Loader.h>

Public Member Functions

BWORD openDL (String a_filename, BWORD a_adaptname=TRUE)
 Open a dynamic library. More...
 
BWORD closeDL (void)
 Close a dynamic library. More...
 
void * findDLFunction (String a_symbol)
 Find the named symbol in the open library. More...
 
const Stringname (void) const
 Returns the name of the library as it was opened. More...
 

Static Public Member Functions

static Result addPath (String a_absPath)
 Add a path search for managed dynamic libraries. More...
 

Private Member Functions

String adaptName (String a_filename, String a_prefix, String a_format)
 

Private Attributes

HINSTANCE m_handle
 
String m_name
 

Detailed Description

Raw access to a dynamic library.

Member Function Documentation

◆ addPath()

Result fe::DL_Loader::addPath ( String  a_absPath)
static

Add a path search for managed dynamic libraries.

Currently, this only used on Windows.

Referenced by fe::Registry::addPath().

◆ closeDL()

BWORD fe::DL_Loader::closeDL ( void  )

Close a dynamic library.

◆ findDLFunction()

void * fe::DL_Loader::findDLFunction ( String  a_symbol)

Find the named symbol in the open library.

Returns a pointer to the named function, if it exists. This may only work for functions wrapped in extern "C" and explicitly exported.

References fe::String::c_str().

◆ name()

const String& fe::DL_Loader::name ( void  ) const
inline

Returns the name of the library as it was opened.

Referenced by fe::Library::setLoader().

◆ openDL()

BWORD fe::DL_Loader::openDL ( String  a_filename,
BWORD  a_adaptname = TRUE 
)

Open a dynamic library.

If adaptname is TRUE, the filename is adapted used using local convention (MyLib is interpreted as libMyLib.so or MyLib.lib).

References fe::String::c_str().


The documentation for this class was generated from the following files: