mirror of
https://github.com/geode-sdk/geode.git
synced 2025-03-25 04:11:42 -04:00
use AddDllDirectory instead
This commit is contained in:
parent
acd9bd7884
commit
5bb386417d
1 changed files with 6 additions and 2 deletions
|
@ -76,6 +76,10 @@ bool Loader::Impl::userTriedToLoadDLLs() const {
|
|||
}
|
||||
|
||||
void Loader::Impl::addNativeBinariesPath(ghc::filesystem::path const& path) {
|
||||
// adds a search directory for native dlls (the name is misleading)
|
||||
SetDllDirectoryW(path.wstring().c_str());
|
||||
// https://learn.microsoft.com/en-us/windows/win32/api/libloaderapi/nf-libloaderapi-adddlldirectory#remarks
|
||||
static auto runOnce = [] {
|
||||
SetDefaultDllDirectories(LOAD_LIBRARY_SEARCH_DEFAULT_DIRS);
|
||||
return 0;
|
||||
}();
|
||||
AddDllDirectory(path.wstring().c_str());
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue