30 #ifndef PTLIB_DYNALINK_H
31 #define PTLIB_DYNALINK_H
126 bool compulsory =
false
137 bool compulsory =
false
149 template <
typename FuncPtr>
157 bool compulsory =
true
170 #define P_DYNALINK_ENTRY_POINT(name) P_DISABLE_MSVC_WARNINGS(4355, name(*this, #name))
171 #define P_DYNALINK_OPTIONAL_ENTRY_POINT(name) P_DISABLE_MSVC_WARNINGS(4355, name(*this, #name, false))
179 #include "msos/ptlib/dynalink.h"
181 #include "unix/ptlib/dynalink.h"
185 #endif // !defined(P_RTEMS)
188 #endif //PTLIB_DYNALINK_H
PBoolean GetFunction(PINDEX index, Function &func, bool compulsory=false)
Get a pointer to the function in the dynamically loadable module.
void(* Function)()
Primitive pointer to a function for a dynamic link module.
Definition: dynalink.h:115
static PString GetExtension()
Get the extension used by this platform for dynamic link libraries.
virtual PBoolean IsLoaded() const
Dyna-link module is loaded and may be accessed.
const PString & GetLastError() const
Definition: dynalink.h:141
FuncPtr m_function
Definition: dynalink.h:152
virtual PBoolean Open(const PString &names)
PString m_lastError
Definition: dynalink.h:175
bool IsPresent() const
Definition: dynalink.h:166
EntryPoint(PDynaLink &dll, const char *name, bool compulsory=true)
Definition: dynalink.h:154
PDynaLink()
Create a new dyna-link, loading the specified module.
~PDynaLink()
Destroy the dyna-link, freeing the module.
#define PAssertNULL(ptr)
This macro is used to assert that a pointer must be non-null.
Definition: object.h:428
bool PBoolean
Definition: object.h:174
The character string class.
Definition: pstring.h:108
A dynamic link library.
Definition: dynalink.h:47
virtual PString GetName(PBoolean full=false) const
Get the name of the loaded library.
virtual void Close()
Close the dyna-link library.
Ultimate parent class for all objects in the class library.
Definition: object.h:2204
Helper class for creating members to functions in the DLL.
Definition: dynalink.h:150