Class to help with load of shared library functions.
More...
#include <DllHelper.h>
Class to help with load of shared library functions.
You can add them as parent to your class and to help with load of shared library functions.
- Note
- To use on Windows must you also include p8-platform on your addon!
Example:
...
{
public:
bool Start();
...
int (*Init)();
};
: CInstanceAudioDecoder(instance)
{
}
bool CMyInstance::Start()
{
if (!LoadDll(lib)) return false;
Init();
return true;
}
...
§ CDllHelper()
CDllHelper::CDllHelper |
( |
| ) |
|
|
inline |
§ ~CDllHelper()
virtual CDllHelper::~CDllHelper |
( |
| ) |
|
|
inlinevirtual |
§ LoadDll()
bool CDllHelper::LoadDll |
( |
const std::string & |
path | ) |
|
|
inline |
Function to load requested library.
- Parameters
-
[in] | path | The path with filename of shared library to load |
- Returns
- true if load was successful done
§ RegisterSymbol()
template<typename T >
bool CDllHelper::RegisterSymbol |
( |
T & |
functionPtr, |
|
|
const char * |
strFunctionPtr |
|
) |
| |
|
inline |
Function to register requested library symbol.
- Note
- This function should not be used, use instead the macro REGISTER_DLL_SYMBOL to register the symbol pointer.
The documentation for this class was generated from the following file: