InspIRCd  3.0
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
DLLManager Class Reference

#include <dynamic.h>

Inheritance diagram for DLLManager:

Public Member Functions

 DLLManager (const char *fname)
const std::string & LastError ()
ModuleCallInit ()
void * GetSymbol (const char *name)
std::string GetVersion ()
- Public Member Functions inherited from classbase
virtual CullResult cull ()

Public Attributes

void * h

Protected Member Functions

void RetrieveLastError ()

Protected Attributes

std::string err

Detailed Description

The DLLManager class is able to load a module file by filename, and locate its init_module symbol.

Constructor & Destructor Documentation

◆ DLLManager()

DLLManager::DLLManager ( const char *  fname)

This constructor loads the module using dlopen()

fnameThe filename to load. This should be within the modules dir.

Member Function Documentation

◆ CallInit()

Module * DLLManager::CallInit ( )

Return a module by calling the init function

◆ GetSymbol()

void * DLLManager::GetSymbol ( const char *  name)

Retrieves the value of the specified symbol.

nameThe name of the symbol to retrieve.
Either the value of the specified symbol or or NULL if it does not exist.

◆ GetVersion()

std::string DLLManager::GetVersion ( )

Get detailed version information from the module file

◆ LastError()

const std::string& DLLManager::LastError ( )

Get the last error from dlopen() or dlsym().

◆ RetrieveLastError()

void DLLManager::RetrieveLastError ( )

Sets the last error string

Member Data Documentation

◆ err

std::string DLLManager::err

The last error string

◆ h

void* DLLManager::h

The module library handle.

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