diff options
author | Andy Polyakov <appro@openssl.org> | 2005-06-27 21:21:12 +0000 |
---|---|---|
committer | Andy Polyakov <appro@openssl.org> | 2005-06-27 21:21:12 +0000 |
commit | beae6324e5ef9b62500f9ddf6eb34541f4027dd9 (patch) | |
tree | 54786163ae293291e9ee22553336637bf90eb63c /crypto/dso | |
parent | 71a61c573ed1597d127e94b5356ca4f6b81dc974 (diff) |
Eliminate dependency on UNICODE macro.
Diffstat (limited to 'crypto/dso')
-rw-r--r-- | crypto/dso/dso_win32.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/crypto/dso/dso_win32.c b/crypto/dso/dso_win32.c index e6eaa99005..f019376b0f 100644 --- a/crypto/dso/dso_win32.c +++ b/crypto/dso/dso_win32.c @@ -68,6 +68,25 @@ DSO_METHOD *DSO_METHOD_win32(void) } #else +#ifdef _WIN32_WCE +# if _WIN32_WCE < 300 +static FARPROC GetProcAddressA(HMODULE hModule,LPCSTR lpProcName) + { + WCHAR lpProcNameW[64]; + int i; + + for (i=0;lpProcName[i] && i<64;i++) + lpProcNameW[i] = (WCHAR)lpProcName[i]; + if (i==64) return NULL; + lpProcNameW[i] = 0; + + return GetProcAddressW(hModule,lpProcNameW); + } +# endif +# undef GetProcAddress +# define GetProcAddress GetProcAddressA +#endif + /* Part of the hack in "win32_load" ... */ #define DSO_MAX_TRANSLATED_SIZE 256 @@ -127,7 +146,7 @@ static int win32_load(DSO *dso) DSOerr(DSO_F_WIN32_LOAD,DSO_R_NO_FILENAME); goto err; } - h = LoadLibrary(filename); + h = LoadLibraryA(filename); if(h == NULL) { DSOerr(DSO_F_WIN32_LOAD,DSO_R_LOAD_FAILED); |