Eliminate dependency on UNICODE macro.

This commit is contained in:
Andy Polyakov 2005-06-27 21:14:15 +00:00
parent 84c881d0b5
commit 08f7417a98
2 changed files with 21 additions and 2 deletions

View file

@ -68,6 +68,25 @@ DSO_METHOD *DSO_METHOD_win32(void)
} }
#else #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" ... */ /* Part of the hack in "win32_load" ... */
#define DSO_MAX_TRANSLATED_SIZE 256 #define DSO_MAX_TRANSLATED_SIZE 256
@ -122,7 +141,7 @@ static int win32_load(DSO *dso)
DSOerr(DSO_F_WIN32_LOAD,DSO_R_NO_FILENAME); DSOerr(DSO_F_WIN32_LOAD,DSO_R_NO_FILENAME);
goto err; goto err;
} }
h = LoadLibrary(filename); h = LoadLibraryA(filename);
if(h == NULL) if(h == NULL)
{ {
DSOerr(DSO_F_WIN32_LOAD,DSO_R_LOAD_FAILED); DSOerr(DSO_F_WIN32_LOAD,DSO_R_LOAD_FAILED);

View file

@ -297,7 +297,7 @@ load_krb5_dll(void)
HANDLE hKRB5_32; HANDLE hKRB5_32;
krb5_loaded++; krb5_loaded++;
hKRB5_32 = LoadLibrary("KRB5_32"); hKRB5_32 = LoadLibrary(TEXT("KRB5_32"));
if (!hKRB5_32) if (!hKRB5_32)
return; return;