mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-20 01:11:03 +08:00
21 lines
705 B
Diff
21 lines
705 B
Diff
|
diff --git a/src/dl.c b/src/dl.c
|
||
|
index b13f9d4..4a1b0c1 100644
|
||
|
--- a/src/dl.c
|
||
|
+++ b/src/dl.c
|
||
|
@@ -148,7 +148,14 @@ xmlSecCryptoDLLibraryCreate(const xmlChar* name) {
|
||
|
#endif /* XMLSEC_DL_LIBLTDL */
|
||
|
|
||
|
#ifdef XMLSEC_DL_WIN32
|
||
|
- lib->handle = LoadLibraryA((char*)lib->filename);
|
||
|
+#if !defined(WINAPI_FAMILY) || WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP
|
||
|
+ lib->handle = LoadLibraryA((char*)lib->filename);
|
||
|
+#else
|
||
|
+ LPTSTR wcLib = NULL;
|
||
|
+ wcLib = xmlSecWin32ConvertUtf8ToTstr((char*)lib->filename);
|
||
|
+ if (wcLib)
|
||
|
+ lib->handle = LoadPackagedLibrary(wcLib, 0);
|
||
|
+#endif
|
||
|
if(lib->handle == NULL) {
|
||
|
xmlSecIOError("LoadLibraryA", lib->filename, NULL);
|
||
|
xmlSecCryptoDLLibraryDestroy(lib);
|