From 5f4d30b2f9ec3cdd47e5a8e2bf6c8586081f4ab9 Mon Sep 17 00:00:00 2001 From: Tom Yu Date: Mon, 12 Dec 2011 20:46:27 +0000 Subject: [PATCH] kfw: use _WIN64 names where appropriate Signed-off-by: Kevin Wasserman ticket: 7050 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25571 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/os/init_os_ctx.c | 4 ++++ src/util/wshelper/res_init.c | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/lib/krb5/os/init_os_ctx.c b/src/lib/krb5/os/init_os_ctx.c index bba1883fa..f7dc42994 100644 --- a/src/lib/krb5/os/init_os_ctx.c +++ b/src/lib/krb5/os/init_os_ctx.c @@ -72,7 +72,11 @@ get_from_module_dir( if (!name) return ENOMEM; +#ifdef _WIN64 + if (!GetModuleFileName(GetModuleHandle("krb5_64"), name, size)) +#else if (!GetModuleFileName(GetModuleHandle("krb5_32"), name, size)) +#endif goto cleanup; p = name + strlen(name); diff --git a/src/util/wshelper/res_init.c b/src/util/wshelper/res_init.c index bf3d97b50..743b0c792 100644 --- a/src/util/wshelper/res_init.c +++ b/src/util/wshelper/res_init.c @@ -759,10 +759,10 @@ this_module() if (!hModWSHelp) { // Note: these must match the DEF file entries -#if defined (_WIN32) - hModWSHelp = GetModuleHandle("WSHELP32"); +#if defined(_WIN64) + hModWSHelp = GetModuleHandle( "WSHELP64" ); #else - hModWSHelp = GetModuleHandle("WSHELPER"); + hModWSHelp = GetModuleHandle( "WSHELP32" ); #endif } return hModWSHelp; -- 2.26.2