34 #if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
35 # define DYNLIB_HANDLE hInstance
36 # define DYNLIB_LOAD( a ) LoadLibraryEx( a, NULL, 0 ) // we can not use LOAD_WITH_ALTERED_SEARCH_PATH with relative paths
37 # define DYNLIB_GETSYM( a, b ) GetProcAddress( a, b )
38 # define DYNLIB_UNLOAD( a ) !FreeLibrary( a )
41 typedef 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 )
50 typedef 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 )
121 void* getSymbol(
const String& strName )
const throw();
Resource holding data about a dynamic library.
Superclass for all objects that wish to use custom memory allocators when their new / delete operator...
const String & getName(void) const
Get the name of the library.
DYNLIB_HANDLE mInst
Handle to the loaded library.