- static inline void *wxDllGetSymbol(shl_t handle, const wxString& name)
- {
- void *sym;
- if ( shl_findsym(&handle, name.mb_str(), TYPE_UNDEFINED, &sym) == 0 )
- return sym;
- else
- return (void *)0;
- }
-#elif defined(__WINDOWS__)
-# include <windows.h>
-
- // using LoadLibraryEx under Win32 to avoid name clash with LoadLibrary
-# ifdef __WIN32__
-# define wxDllOpen(lib) ::LoadLibraryEx(lib, 0, 0)
-# else // Win16
-# define wxDllOpen(lib) ::LoadLibrary(lib)
-# endif // Win32/16
-# define wxDllGetSymbol(handle, name) ::GetProcAddress(handle, name)
-# define wxDllClose ::FreeLibrary
-
-#elif defined(__OS2__)
-
-# define INCL_DOS
-# include <os2.h>
-# define wxDllOpen(error, lib, handle) DosLoadModule(error, sizeof(error), lib, &handle)
-# define wxDllGetSymbol(handle, modaddr) DosQueryProcAddr(handle, 1L, NULL, (PFN*)modaddr)
-# define wxDllClose(handle) DosFreeModule(handle)
-#else
-# error "Don't know how to load shared libraries on this platform."
-#endif // OS
-
-// ---------------------------------------------------------------------------
-// Global variables
-// ---------------------------------------------------------------------------
-
-wxLibraries wxTheLibraries;
-
-// ----------------------------------------------------------------------------
-// private functions
-// ----------------------------------------------------------------------------
-
-// construct the full name from the base shared object name: adds a .dll
-// suffix under Windows or .so under Unix
-static wxString ConstructLibraryName(const wxString& basename)
-{
- wxString fullname(basename);
-
-#if defined(__UNIX__)
-# if defined(__HPUX__)
- fullname << ".sl";
-# else //__HPUX__
- fullname << ".so";
-# endif //__HPUX__
-#elif defined(__WINDOWS__) || defined(__OS2__)
- fullname << ".dll";