From 91049bd9cdbab9a4cb137938cbea58a5fbf61a85 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Tue, 27 Sep 2005 17:44:29 +0000 Subject: [PATCH] * init.cc (dll_entry): Call IsWow64Process with GetCurrentProcess as process handle since hMainProc isn't initialized here. --- winsup/cygwin/ChangeLog | 5 +++++ winsup/cygwin/init.cc | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index c29f841d9..59e1f023b 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2005-09-27 Corinna Vinschen + + * init.cc (dll_entry): Call IsWow64Process with GetCurrentProcess + as process handle since hMainProc isn't initialized here. + 2005-09-27 Corinna Vinschen * fhandler_floppy.cc (fhandler_dev_floppy::get_drive_info): Always diff --git a/winsup/cygwin/init.cc b/winsup/cygwin/init.cc index b00b7fed6..478d83105 100644 --- a/winsup/cygwin/init.cc +++ b/winsup/cygwin/init.cc @@ -157,7 +157,7 @@ dll_entry (HANDLE h, DWORD reason, void *static_load) spawned by a genuine 64 bit process. If so, respawn. */ if (&is_wow64_proc >= (PBOOL) 0x400000 && &is_wow64_proc <= (PBOOL) 0x10000000 - && IsWow64Process (hMainProc, &is_wow64_proc) + && IsWow64Process (GetCurrentProcess (), &is_wow64_proc) && is_wow64_proc) respawn_wow64_process ();