diff --git a/dlls/krnl386.exe16/krnl386.exe16.spec b/dlls/krnl386.exe16/krnl386.exe16.spec index da925692c9d..f20d69e065e 100644 --- a/dlls/krnl386.exe16/krnl386.exe16.spec +++ b/dlls/krnl386.exe16/krnl386.exe16.spec @@ -94,7 +94,7 @@ 90 pascal -ret16 lstrlen(str) lstrlen16 91 pascal -register InitTask() InitTask16 92 pascal GetTempDrive(word) GetTempDrive -93 pascal -ret16 GetCodeHandle(segptr) GetCodeHandle16 +93 pascal GetCodeHandle(segptr) GetCodeHandle16 94 pascal -ret16 DefineHandleTable(word) DefineHandleTable16 95 pascal -ret16 LoadLibrary(str) LoadLibrary16 96 pascal -ret16 FreeLibrary(word) FreeLibrary16 diff --git a/dlls/krnl386.exe16/task.c b/dlls/krnl386.exe16/task.c index 30aa8666e2c..84d4bf33a4c 100644 --- a/dlls/krnl386.exe16/task.c +++ b/dlls/krnl386.exe16/task.c @@ -984,14 +984,14 @@ static BOOL TASK_GetCodeSegment( FARPROC16 proc, NE_MODULE **ppModule, /********************************************************************** * GetCodeHandle (KERNEL.93) */ -HANDLE16 WINAPI GetCodeHandle16( FARPROC16 proc ) +DWORD WINAPI GetCodeHandle16( FARPROC16 proc ) { SEGTABLEENTRY *pSeg; if ( !TASK_GetCodeSegment( proc, NULL, &pSeg, NULL ) ) return 0; - return pSeg->hSeg; + return MAKELONG( pSeg->hSeg, GlobalHandleToSel16(pSeg->hSeg) ); } /********************************************************************** diff --git a/include/wine/winbase16.h b/include/wine/winbase16.h index f2f32a2ce02..16c63244aef 100644 --- a/include/wine/winbase16.h +++ b/include/wine/winbase16.h @@ -357,7 +357,7 @@ VOID WINAPI FarSetOwner16(HGLOBAL16,HANDLE16); FARPROC16 WINAPI FileCDR16(FARPROC16); WORD WINAPI FreeSelector16(WORD); HANDLE16 WINAPI GetAtomHandle16(ATOM); -HANDLE16 WINAPI GetCodeHandle16(FARPROC16); +DWORD WINAPI GetCodeHandle16(FARPROC16); BOOL16 WINAPI GetCodeInfo16(FARPROC16,SEGINFO*); DWORD WINAPI GetCurrentPDB16(void); HTASK16 WINAPI GetCurrentTask(void);