40#ifndef _DYNAMIC_LIBRARY_H 
   41#define _DYNAMIC_LIBRARY_H 
   53typedef void* ( *FunctionPointer )( ... ); 
 
   81    DISTI_EXPORT 
DynamicLibrary( 
const char* lib_name_arg, 
bool quiet = 
false, 
bool searchLibPath = 
false, 
bool tryStandardExtensions = 
false, 
bool matchVersion = 
false );
 
   95    static DISTI_EXPORT 
bool Exists( 
const char* libName, 
bool tryStandardExtensions = 
true );
 
   99    static DISTI_EXPORT std::string 
Find( 
const std::string& name );
 
  102    virtual DISTI_EXPORT 
bool Loaded() 
const;
 
  119    bool        _tryStandardExtensions;
 
  125    DISTI_EXPORT 
void SetErrorString( 
const char* );
 
  133    static bool FoundOnSystem( 
const std::string& libname );
 
  136    static LibHandle_t Open( 
const std::string& libpath, 
ErrorEnum& errorCode , 
bool searchLibPath = 
true, 
bool matchVersion = 
false, 
bool quiet = 
false );
 
The DynamicLibrary class. A cross-platform class for loading dynamic link libraries and shared object...
Definition: dynamic_library.h:57
virtual bool Loaded() const
const char * ErrorString() const
static void RemoveExtension(std::string &libpath)
DynamicLibrary(const char *lib_name_arg, bool quiet=false, bool searchLibPath=false, bool tryStandardExtensions=false, bool matchVersion=false)
void * LibHandle_t
Linux, macOS, and others use a pointer to the opened dynamic library.
Definition: dynamic_library.h:70
ErrorEnum
Definition: dynamic_library.h:61
@ ERROR_UNKNOWN
Load failed for unknown reason (see DynamicLibrary::ErrorString())
Definition: dynamic_library.h:64
@ ERROR_VERSION_MISMATCH
Load failed due to incompatible GL Studio or compiler versions.
Definition: dynamic_library.h:63
virtual ~DynamicLibrary()
Destructor for dynamic library object. Closes the library so the OS can cleanup.
static bool Exists(const char *libName, bool tryStandardExtensions=true)
virtual FunctionPointer DynamicFunction(const char *function_name)
ErrorEnum LastError() const
static std::string Find(const std::string &name)
A file for all GL Studio files to include.
Force inclusion of the DirectShow library.
Definition: bmpimage.h:47
void *(* FunctionPointer)(...)
Typedef for a function pointer taking variadic arguments.
Definition: dynamic_library.h:53