From: Andy Polyakov Date: Tue, 2 Aug 2005 11:03:42 +0000 (+0000) Subject: Implement complementary LoadLibraryA shim under WCE. [from HEAD] X-Git-Tag: OpenSSL_0_9_8a~64 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=67865069eb9ee84269d12475ba88034b32732a79;p=openssl Implement complementary LoadLibraryA shim under WCE. [from HEAD] --- 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