34#if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
35# define DYNLIB_HANDLE hInstance
36# define DYNLIB_LOAD( a ) LoadLibraryEx( a, NULL, 0 )
37# define DYNLIB_GETSYM( a, b ) GetProcAddress( a, b )
38# define DYNLIB_UNLOAD( a ) !FreeLibrary( a )
41typedef struct HINSTANCE__* hInstance;
43#elif OGRE_PLATFORM == OGRE_PLATFORM_WINRT
44# define DYNLIB_HANDLE hInstance
45# define DYNLIB_LOAD( a ) LoadPackagedLibrary( UTFString(a).asWStr_c_str(), 0 )
46# define DYNLIB_GETSYM( a, b ) GetProcAddress( a, b )
47# define DYNLIB_UNLOAD( a ) !FreeLibrary( a )
50typedef struct HINSTANCE__* hInstance;
52#elif OGRE_PLATFORM == OGRE_PLATFORM_LINUX || OGRE_PLATFORM == OGRE_PLATFORM_ANDROID || OGRE_PLATFORM == OGRE_PLATFORM_NACL || OGRE_PLATFORM == OGRE_PLATFORM_FLASHCC
53# define DYNLIB_HANDLE void*
54# define DYNLIB_LOAD( a ) dlopen( a, RTLD_LAZY | RTLD_GLOBAL)
55# define DYNLIB_GETSYM( a, b ) dlsym( a, b )
56# define DYNLIB_UNLOAD( a ) dlclose( a )
58#elif OGRE_PLATFORM == OGRE_PLATFORM_APPLE || OGRE_PLATFORM == OGRE_PLATFORM_APPLE_IOS
59# define DYNLIB_HANDLE void*
60# define DYNLIB_LOAD( a ) mac_loadDylib( a )
61# define FRAMEWORK_LOAD( a ) mac_loadFramework( a )
62# define DYNLIB_GETSYM( a, b ) dlsym( a, b )
63# define DYNLIB_UNLOAD( a ) dlclose( a )
void load()
Load the library.
void * getSymbol(const String &strName) const
Returns the address of the given symbol from the loaded library.
void unload()
Unload the library.
DYNLIB_HANDLE mInst
Handle to the loaded library.
DynLib(const String &name)
Default constructor - used by DynLibManager.
String dynlibError(void)
Gets the last loading error.
~DynLib()
Default destructor.
const String & getName(void) const
Get the name of the library.
GeneralAllocatedObject DynLibAlloc