25typedef void* (*ApiInitFunction) ();
28 const OUString& moduleName,
29 const OUString& initFunction,
35 , m_strModuleName(moduleName)
36 , m_strInitFunction(initFunction)
37 , ppSetToZeroInDestructor( ppSetToZeroInDestructor_ )
42 const OUString& moduleName,
43 const OUString& initFunction)
45#ifdef DISABLE_DYNLOADING
53 oslModule pModule = osl_loadModule(moduleName.pData, SAL_LOADMODULE_DEFAULT);
61 pModule, initFunction.pData));
65 osl_unloadModule(pModule);
84#ifndef DISABLE_DYNLOADING
The ORealDynamicLoader is an implementation helper class for the template loader ODynamicLoader.
sal_uInt32 SAL_CALL release()
decrease the reference count and delete the last instance.
static ORealDynamicLoader *SAL_CALL newInstance(ORealDynamicLoader **ppSetToZeroInDestructor, const ::rtl::OUString &strModuleName, const ::rtl::OUString &strInitFunction)
initializes the loader, loads the library and call the initialization function.
virtual ~ORealDynamicLoader()
Destructor, try to unload the library.
oslModule m_pModule
stores the library handle.
void * m_pApi
points to the structure with the initialized API function pointers.
sal_uInt32 m_refCount
stores the reference count.
void *SAL_CALL getApi() const
returns a pointer to the initialized API function structure.
ORealDynamicLoader(ORealDynamicLoader **ppSetToZeroInDestructor, const ::rtl::OUString &strModuleName, const ::rtl::OUString &strInitFunction, void *pApi, oslModule pModule)
Constructor.
sal_uInt32 SAL_CALL acquire()
increase the reference count.
ORealDynamicLoader ** ppSetToZeroInDestructor
stores a pointer to itself, which must be reset in the destructor to signal that the loader is invali...
void *(* ApiInitFunction)()