Skip to content

Commit 1ec0bc2

Browse files
committed
Make stonesense loadable in a relocated installation
1 parent 5646222 commit 1ec0bc2

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

library/PlugLoad.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,11 @@
1515
#ifdef WIN32
1616
#define NOMINMAX
1717
#include <windows.h>
18+
#include <libloaderapi.h>
1819
#define global_search_handle() GetModuleHandle(nullptr)
1920
#define get_function_address(plugin, function) GetProcAddress((HMODULE)plugin, function)
2021
#define clear_error()
21-
#define load_library(fn) LoadLibraryW(fn.c_str())
22+
#define load_library(fn) LoadLibraryExW(fn.wstring().c_str(), NULL, LOAD_LIBRARY_SEARCH_DEFAULT_DIRS);
2223
#define close_library(handle) (!(FreeLibrary((HMODULE)handle)))
2324
#else
2425
#include <dlfcn.h>

plugins/stonesense

0 commit comments

Comments
 (0)