trunk/branch integration: compile fix

This commit is contained in:
Marian Krivos
2011-08-23 13:07:44 +00:00
parent 5950201733
commit 8fc17fecfa
6 changed files with 224 additions and 216 deletions

View File

@@ -61,7 +61,10 @@ void SharedLibraryImpl::loadImpl(const std::string& path)
FastMutex::ScopedLock lock(_mutex);
if (_handle) throw LibraryAlreadyLoadedException(_path);
_handle = LoadLibraryA(path.c_str());
DWORD flags(0);
Path p(path);
if (p.isAbsolute()) flags |= LOAD_WITH_ALTERED_SEARCH_PATH;
_handle = LoadLibraryExA(path.c_str(), 0, flags);
if (!_handle) throw LibraryLoadException(path);
_path = path;
}