From: Jeffrey Altman Date: Mon, 3 Jul 2006 05:23:16 +0000 (+0000) Subject: GetModuleHandle needs extension on Win64 X-Git-Tag: krb5-1.6-alpha1~217 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=37fc70e7b38782f709b5c223aa0b4c86efd3f9c7;p=krb5.git GetModuleHandle needs extension on Win64 cc_mslsa.c: some versions of Win64 require the extension to be specified as part of the parameter to GetModuleHandle() in order to find a match. ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18320 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/krb5/ccache/cc_mslsa.c b/src/lib/krb5/ccache/cc_mslsa.c index 46fa507b3..4bb6d752b 100644 --- a/src/lib/krb5/ccache/cc_mslsa.c +++ b/src/lib/krb5/ccache/cc_mslsa.c @@ -148,9 +148,12 @@ is_broken_wow64(void) { BOOL isWow64 = FALSE; OSVERSIONINFO Version; - LPFN_ISWOW64PROCESS fnIsWow64Process = - (LPFN_ISWOW64PROCESS)GetProcAddress(GetModuleHandle("kernel32"), - "IsWow64Process"); + HANDLE h1 = NULL; + LPFN_ISWOW64PROCESS fnIsWow64Process = NULL; + + h1 = GetModuleHandle(L"kernel32.dll"); + fnIsWow64Process = + (LPFN_ISWOW64PROCESS)GetProcAddress(h1, "IsWow64Process"); /* If we don't find the fnIsWow64Process function then we * are not running in a broken Wow64