/[svn]/linuxsampler/trunk/src/common/DynamicLibraries.cpp
ViewVC logotype

Diff of /linuxsampler/trunk/src/common/DynamicLibraries.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2127 by schoenebeck, Sat Sep 18 09:24:41 2010 UTC revision 2128 by persson, Wed Sep 22 20:19:08 2010 UTC
# Line 56  int DynamicLibrariesSearch(String dir, S Line 56  int DynamicLibrariesSearch(String dir, S
56              continue;              continue;
57          }          }
58    
59          void* pFunct = GetProcAddress(hinstLib, funct.c_str());          void* pFunct = (void*)GetProcAddress(hinstLib, funct.c_str());
60          if (pFunct == NULL) {          if (pFunct == NULL) {
61              std::cerr << "ERROR: unable to find " << funct << "() in " << sPath              std::cerr << "ERROR: unable to find " << funct << "() in " << sPath
62                        << std::endl << std::flush;                        << std::endl << std::flush;
# Line 135  void* DynamicLibraryOpen(String filename Line 135  void* DynamicLibraryOpen(String filename
135    
136  void* DynamicLibraryGetSymbol(void* hDLL, String symbol) {  void* DynamicLibraryGetSymbol(void* hDLL, String symbol) {
137      #if defined(WIN32)      #if defined(WIN32)
138      return GetProcAddress(hDLL, symbol.c_str());      return (void*)GetProcAddress((HMODULE)hDLL, symbol.c_str());
139      #else      #else
140      return dlsym(hDLL, symbol.c_str());      return dlsym(hDLL, symbol.c_str());
141      #endif      #endif
# Line 143  void* DynamicLibraryGetSymbol(void* hDLL Line 143  void* DynamicLibraryGetSymbol(void* hDLL
143    
144  void DynamicLibraryClose(void* hDLL) {  void DynamicLibraryClose(void* hDLL) {
145      #if defined(WIN32)      #if defined(WIN32)
146      FreeLibrary(hDLL);      FreeLibrary((HMODULE)hDLL);
147      #else      #else
148      dlclose(hDLL);      dlclose(hDLL);
149      #endif      #endif

Legend:
Removed from v.2127  
changed lines
  Added in v.2128

  ViewVC Help
Powered by ViewVC