Skip to content

Commit

Permalink
Allow compilation on UWP (#293)
Browse files Browse the repository at this point in the history
  • Loading branch information
SvenPStarFinanz committed Jun 17, 2020
1 parent 3e24ac3 commit 3ecf7d2
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/dl.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,18 @@ 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 wcLibFilename = xmlSecWin32ConvertUtf8ToTstr((char*)lib->filename);
if(wcLibFilename == NULL) {
xmlSecIOError("xmlSecWin32ConvertUtf8ToTstr", lib->filename, NULL);
xmlSecCryptoDLLibraryDestroy(lib);
return(NULL);
}
lib->handle = LoadPackagedLibrary(wcLibFilename, 0);
xmlFree(wcLibFilename);
#endif
if(lib->handle == NULL) {
xmlSecIOError("LoadLibraryA", lib->filename, NULL);
xmlSecCryptoDLLibraryDestroy(lib);
Expand Down

0 comments on commit 3ecf7d2

Please sign in to comment.