Scopira  20080306
scopira::tool::dll Class Reference

#include <dll.h>

Inheritance diagram for scopira::tool::dll:
scopira::tool::object

Public Types

typedef void(* voidfunc_t) (void)
 

Public Member Functions

 dll (void)
 default constructor
 
virtual ~dll ()
 destrutor
 
bool load_dll (std::string _name)
 
void * get_sym (const std::string &_name) const
 
const char * get_error (void) const
 
- Public Member Functions inherited from scopira::tool::object
virtual ~object ()
 
int add_ref (void) const
 
bool sub_ref (void) const
 
void auto_ref (void) const
 
int current_ref (void) const
 
virtual scopira::tool::oflow_iprint (scopira::tool::oflow_i &o) const
 
virtual bool load (scopira::tool::iobjflow_i &in)
 
virtual void save (scopira::tool::oobjflow_i &out) const
 
bool is_alive_object (void) const
 
bool is_dead_object (void) const
 

Protected Types

typedef void * LIB_HANDLE
 

Protected Member Functions

virtual bool dll_init (const std::string &_name)
 calls when its time to construct a dll, true on success
 
virtual void dll_close (void)
 calls when a dll is being removed
 
void check_error (void)
 fills dm_lasterror
 
- Protected Member Functions inherited from scopira::tool::object
 object (void)
 
 object (bool neverusecounter)
 

Protected Attributes

LIB_HANDLE dm_handle
 
bool dm_open
 
const char * dm_lasterror
 

Detailed Description

a Dynamic Link Library

Author
Aleksander Demko

Member Function Documentation

◆ get_error()

const char* scopira::tool::dll::get_error ( void  ) const
inline

gets the last error, if any (null for none)

Author
Aleksander Demko

References check_error(), dll_close(), and dll_init().

◆ get_sym()

void* scopira::tool::dll::get_sym ( const std::string &  _name) const

gets a symbol from the dll

Parameters
_namethe name of the symbol
Returns
the symbol's address
Author
Aleksander Demko

◆ load_dll()

bool scopira::tool::dll::load_dll ( std::string  _name)

loads a dll, unloading any current one

Parameters
_namethe filename of the dll
Returns
true on success
Author
Aleksander Demko

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