From 2abbb4ca13ba8de44d06e40eddad1b4c1c3f8a49 Mon Sep 17 00:00:00 2001 From: Ivan Zhakov Date: Thu, 16 May 2019 19:03:58 +0000 Subject: win32: Use LoadLibraryW() instead of LoadLibraryA() to late load libraries. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1859405 13f79535-47bb-0310-9956-ffa450edef68 --- misc/win32/misc.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/misc/win32/misc.c b/misc/win32/misc.c index 88d9ab381..ff9c076ab 100644 --- a/misc/win32/misc.c +++ b/misc/win32/misc.c @@ -139,24 +139,24 @@ apr_status_t apr_get_oslevel(apr_oslevel_e *level) */ typedef struct win32_late_dll_t { - const char *dll_name; + const apr_wchar_t *dll_name; HMODULE dll_handle; } win32_late_dll_t; static win32_late_dll_t late_dll[DLL_defined] = { - {"kernel32", NULL}, - {"advapi32", NULL}, - {"mswsock", NULL}, - {"ws2_32", NULL}, - {"shell32", NULL}, - {"ntdll.dll", NULL}, - {"Iphplapi", NULL} + {L"kernel32", NULL}, + {L"advapi32", NULL}, + {L"mswsock", NULL}, + {L"ws2_32", NULL}, + {L"shell32", NULL}, + {L"ntdll.dll", NULL}, + {L"Iphplapi", NULL} }; FARPROC apr_load_dll_func(apr_dlltoken_e fnLib, char* fnName, int ordinal) { if (!late_dll[fnLib].dll_handle) { - late_dll[fnLib].dll_handle = LoadLibraryA(late_dll[fnLib].dll_name); + late_dll[fnLib].dll_handle = LoadLibraryW(late_dll[fnLib].dll_name); if (!late_dll[fnLib].dll_handle) return NULL; } -- cgit v1.2.1