7 DLLManager::DLLManager(const char *fname)
9 // Try to open the library now and get any error message.
11 h=dlopen( fname, RTLD_NOW );
15 DLLManager::~DLLManager()
17 // close the library if it isn't null
23 bool DLLManager::GetSymbol(void **v, const char *sym_name)
25 // try extract a symbol from the library
26 // get any error message is there is any
30 *v = dlsym( h, sym_name );
45 DLLFactoryBase::DLLFactoryBase(const char *fname, const char *factory) : DLLManager(fname)
47 // try get the factory function if there is no error yet
53 GetSymbol( (void **)&factory_func, factory ? factory : "init_module" );
59 DLLFactoryBase::~DLLFactoryBase()