From cfa977d9da3401df9ca9ff46819e7cbdd0dbcf3a Mon Sep 17 00:00:00 2001 From: Ulrich Weigand Date: Mon, 12 Jul 1999 13:39:10 +0000 Subject: [PATCH] Fixed bugs introduced by 'register' and 'return' function changes. --- if1632/kernel.spec | 4 ++-- loader/task.c | 18 +++++++++++------- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/if1632/kernel.spec b/if1632/kernel.spec index d77d7e702d2..b1f6ec9b531 100644 --- a/if1632/kernel.spec +++ b/if1632/kernel.spec @@ -136,7 +136,7 @@ file krnl386.exe 130 pascal FileCDR(ptr) FileCDR16 131 pascal GetDOSEnvironment() GetDOSEnvironment16 132 pascal GetWinFlags() GetWinFlags16 -133 pascal16 GetExePtr(word) GetExePtr +133 pascal16 GetExePtr(word) WIN16_GetExePtr 134 pascal16 GetWindowsDirectory(ptr word) GetWindowsDirectory16 135 pascal16 GetSystemDirectory(ptr word) GetSystemDirectory16 136 pascal16 GetDriveType(word) GetDriveType16 @@ -480,7 +480,7 @@ file krnl386.exe 608 pascal AllocSLThunkletSysthunk(long segptr long) AllocSLThunkletSysthunk16 609 pascal FindLSThunkletCallback(segptr long) FindLSThunkletCallback 610 pascal FindSLThunkletCallback(long long) FindSLThunkletCallback -611 pascal16 FreeThunklet() FreeThunklet16 +611 pascal16 FreeThunklet(long long) FreeThunklet16 612 pascal16 IsSLThunklet(ptr) IsSLThunklet16 613 stub HugeMapLS 614 stub HugeUnMapLS diff --git a/loader/task.c b/loader/task.c index ba37d615571..c3e8dcde8e7 100644 --- a/loader/task.c +++ b/loader/task.c @@ -1506,19 +1506,23 @@ static inline HMODULE16 GetExePtrHelper( HANDLE16 handle, HTASK16 *hTask ) return 0; } -HMODULE16 WINAPI GetExePtr( HANDLE16 handle ) +HMODULE16 WINAPI WIN16_GetExePtr( HANDLE16 handle ) { - STACK16FRAME *frame; HTASK16 hTask = 0; HMODULE16 hModule = GetExePtrHelper( handle, &hTask ); - if ((frame = CURRENT_STACK16) != NULL) - { - frame->ecx = hModule; - if (hTask) frame->es = hTask; - } + STACK16FRAME *frame = CURRENT_STACK16; + frame->ecx = hModule; + if (hTask) frame->es = hTask; return hModule; } +HMODULE16 WINAPI GetExePtr( HANDLE16 handle ) +{ + HTASK16 hTask = 0; + return GetExePtrHelper( handle, &hTask ); +} + + /*********************************************************************** * TaskFirst (TOOLHELP.63) */