16 std::unique_lock<std::mutex> lock(
_mutex);
18 _handle = LoadLibrary(path.c_str());
21 throw RuntimeError(
"Could not load library: " + path);
28 std::unique_lock<std::mutex> lock(
_mutex);
45 std::unique_lock<std::mutex> lock(
_mutex);
49 #if defined(_WIN32_WCE) 51 UnicodeConverter::toUTF16(name, uname);
52 return (
void*)GetProcAddressW((HMODULE)
_handle, uname.c_str());
54 return (
void*)GetProcAddress((HMODULE)_handle, name.c_str());
static std::string prefix()
static std::string suffix()
const std::string & getPath() const
Simple class for manipulating paths on Linux/Windows/Mac OS.
void load(const std::string &path, int flags=0)
bool isLoaded() const
Unloads a shared library.
void * findSymbol(const std::string &name)