From 67865069eb9ee84269d12475ba88034b32732a79 Mon Sep 17 00:00:00 2001 From: Andy Polyakov Date: Tue, 2 Aug 2005 11:03:42 +0000 Subject: [PATCH] Implement complementary LoadLibraryA shim under WCE. [from HEAD] --- crypto/dso/dso_win32.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/crypto/dso/dso_win32.c b/crypto/dso/dso_win32.c index f019376b0f..6f12d8c841 100644 --- a/crypto/dso/dso_win32.c +++ b/crypto/dso/dso_win32.c @@ -85,6 +85,26 @@ static FARPROC GetProcAddressA(HMODULE hModule,LPCSTR lpProcName) # endif # undef GetProcAddress # define GetProcAddress GetProcAddressA + +static HINSTANCE LoadLibraryA(LPCSTR *lpLibFileName) + { + WCHAR *fnamw; + size_t len_0=strlen(lpLibFileName)+1,i; + +#ifdef _MSC_VER + fname = (WCHAR *)_alloca (len_0*sizeof(WCHAR)); +#else + fnamw = (WCHAR *)alloca (len_0*sizeof(WCHAR)); +#endif + if (fnamw == NULL) return NULL; + +#if defined(_WIN32_WCE) && _WIN32_WCE>=101 + if (!MultiByteToWideChar(CP_ACP,0,lpLibFileName,len_0,fnamw,len_0)) +#endif + for (i=0;i