diff --git a/src/Mods/LoadLibraryWin.cpp b/src/Mods/LoadLibraryWin.cpp index 9248c32..062fc23 100644 --- a/src/Mods/LoadLibraryWin.cpp +++ b/src/Mods/LoadLibraryWin.cpp @@ -4,7 +4,7 @@ #include #include #include - +#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0])) static int32_t __wtf8_decode1(const char** input) { uint32_t code_point; uint8_t b1; @@ -98,17 +98,17 @@ void* LoadLibrary(const std::string& path, bool isGlobal) return nullptr; if ((size_t) r > ARRAY_SIZE(filename_w)) return nullptr; - _wtf8_to_utf16(path.c_str(), filename_w, r); + wtf8_to_utf16(path.c_str(), filename_w, r); return LoadLibraryExW(filename_w, NULL, LOAD_WITH_ALTERED_SEARCH_PATH); } bool CloseLibrary(void* handle) { - return FreeLibrary(handle) != 0; + return FreeLibrary(static_cast(handle)) != 0; } void* LoadSymbol(void* handle, const std::string& name) { - return (void*)(uintptr_t) GetProcAddress(handle, name.c_str()); + return (void*)(uintptr_t) GetProcAddress(static_cast(handle), name.c_str()); } #endif \ No newline at end of file