40 #ifndef _DYNAMIC_LIBRARY_H
41 #define _DYNAMIC_LIBRARY_H
54 typedef void * (*FunctionPointer)(...);
71 typedef HMODULE LibHandle_t;
73 typedef void* LibHandle_t;
89 const char* lib_name_arg,
91 bool searchLibPath =
false,
92 bool tryStandardExtensions =
false,
93 bool matchVersion =
false);
104 virtual DISTI_EXPORT FunctionPointer
DynamicFunction(
const char *function_name);
107 static DISTI_EXPORT
bool Exists(
const char* libName,
bool tryStandardExtensions =
true);
109 static DISTI_EXPORT std::string Find(
const std::string& name);
112 virtual DISTI_EXPORT
bool Loaded(
void)
const;
134 bool _tryStandardExtensions;
135 LibHandle_t _dlHandle;
140 DISTI_EXPORT
void SetErrorString(
const char*);
151 static bool FoundOnSystem(
const std::string& libname);
157 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:67
static bool Exists(const char *libName, bool tryStandardExtensions=true)
const char * ErrorString() const
ErrorEnum LastError() const
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:66
virtual ~DynamicLibrary()
Definition: dynamic_library.h:59
DynamicLibrary(const char *lib_name_arg, bool quiet=false, bool searchLibPath=false, bool tryStandardExtensions=false, bool matchVersion=false)
ErrorEnum
Definition: dynamic_library.h:63
Definition: bmpimage.h:46
static void RemoveExtension(std::string &libpath)