File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 1
1
#if defined(_WIN32)
2
2
#include < Windows.h>
3
3
#define PTModHandle HMODULE
4
- #define PTLoadModule ::LoadLibraryA
4
+ #define PTLoadModule ::LoadLibraryW
5
5
#define PTGetProcAddr ::GetProcAddress
6
6
#define PTFreeModule ::FreeLibrary
7
7
#else
12
12
#define PTFreeModule ::dlclose
13
13
#endif
14
14
15
+ #include < filesystem>
16
+
15
17
#include " PottoModuleEntryManager.h"
16
18
17
19
namespace Potto {
@@ -28,7 +30,8 @@ POTTO_ERROR Potto::PottoModuleEntryManager::LoadModule(const std::string& module
28
30
// Find or load the module
29
31
std::lock_guard<std::mutex> lock (m_mtxForLoadModule);
30
32
#if defined(_WIN32)
31
- hMod = PTLoadModule (moduleName.c_str ());
33
+ std::filesystem::path moduleNamePath = std::filesystem::u8path (moduleName);
34
+ hMod = PTLoadModule (moduleNamePath.wstring ().c_str ());
32
35
#else
33
36
hMod = PTLoadModule (moduleName.c_str (), RTLD_LAZY);
34
37
#endif
You can’t perform that action at this time.
0 commit comments