40 #ifndef _DYNAMIC_LIBRARY_H
41 #define _DYNAMIC_LIBRARY_H
52 typedef void* ( *FunctionPointer )( ... );
69 typedef HMODULE LibHandle_t;
71 typedef void* LibHandle_t;
87 const char* lib_name_arg,
89 bool searchLibPath =
false,
90 bool tryStandardExtensions =
false,
91 bool matchVersion =
false );
102 virtual DISTI_EXPORT FunctionPointer
DynamicFunction(
const char* function_name );
105 static DISTI_EXPORT
bool Exists(
const char* libName,
bool tryStandardExtensions =
true );
108 static DISTI_EXPORT std::string
Find(
const std::string& name );
111 virtual DISTI_EXPORT
bool Loaded(
void )
const;
132 bool _tryStandardExtensions;
133 LibHandle_t _dlHandle;
138 DISTI_EXPORT
void SetErrorString(
const char* );
149 static bool FoundOnSystem(
const std::string& libname );
154 static LibHandle_t Open(
const std::string& libpath,
ErrorEnum& errorCode ,
bool searchLibPath =
true,
bool matchVersion =
false,
bool quiet =
false );
virtual FunctionPointer DynamicFunction(const char *function_name)
Load failed for unknown reason (see DynamicLibrary::ErrorString())
Definition: dynamic_library.h:65
static bool Exists(const char *libName, bool tryStandardExtensions=true)
const char * ErrorString() const
ErrorEnum LastError() const
static std::string Find(const std::string &name)
A file for all GL Studio files to include.
virtual bool Loaded(void) const
Load failed due to incompatible GL Studio or compiler versions.
Definition: dynamic_library.h:64
virtual ~DynamicLibrary()
Definition: dynamic_library.h:57
DynamicLibrary(const char *lib_name_arg, bool quiet=false, bool searchLibPath=false, bool tryStandardExtensions=false, bool matchVersion=false)
ErrorEnum
Definition: dynamic_library.h:61
Definition: bmpimage.h:46
static void RemoveExtension(std::string &libpath)