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; |
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 |
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 |