From: Andy Polyakov Date: Tue, 2 Aug 2005 10:55:43 +0000 (+0000) Subject: Implement complementary LoadLibraryA shim under WCE. X-Git-Tag: OpenSSL_0_9_8k^2~1880 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=b37fb16dcb004e3c5fbade80bc8b82e676235cad;p=oweals%2Fopenssl.git Implement complementary LoadLibraryA shim under WCE. --- diff --git a/crypto/dso/dso_win32.c b/crypto/dso/dso_win32.c index 59ff10a15d..9c94123105 100644 --- a/crypto/dso/dso_win32.c +++ b/crypto/dso/dso_win32.c @@ -85,6 +85,30 @@ 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) + { + SetLastError(ERROR_NOT_ENOUGH_MEMORY); + 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