diff --git a/dlls/kernel32/kernel16.c b/dlls/kernel32/kernel16.c index 094156dfbf8..c004a3d2027 100644 --- a/dlls/kernel32/kernel16.c +++ b/dlls/kernel32/kernel16.c @@ -106,6 +106,17 @@ LONG WINAPI KERNEL_nop(void) return 0; } +/*********************************************************************** + * ToolHelpHook (KERNEL.341) + * see "Undocumented Windows" + */ +FARPROC16 WINAPI ToolHelpHook16(FARPROC16 func) +{ + static FARPROC16 hook; + + FIXME("(%p), stub.\n", func); + return InterlockedExchangePointer( (void **)&hook, func ); +} /* thunk for 16-bit CreateThread */ struct thread_args diff --git a/dlls/kernel32/toolhelp16.c b/dlls/kernel32/toolhelp16.c index a98971ad420..4d67b733b7d 100644 --- a/dlls/kernel32/toolhelp16.c +++ b/dlls/kernel32/toolhelp16.c @@ -52,8 +52,6 @@ static struct notify static int nrofnotifys = 0; -static FARPROC16 HookNotify = NULL; - /*********************************************************************** * TaskFindHandle (TOOLHELP.65) @@ -226,19 +224,3 @@ BOOL16 WINAPI SystemHeapInfo16( SYSHEAPINFO *pHeapInfo ) FreeLibrary16( gdi ); return TRUE; } - - -/*********************************************************************** - * ToolHelpHook (KERNEL.341) - * see "Undocumented Windows" - */ -FARPROC16 WINAPI ToolHelpHook16(FARPROC16 lpfnNotifyHandler) -{ - FARPROC16 tmp; - - FIXME("(%p), stub.\n", lpfnNotifyHandler); - tmp = HookNotify; - HookNotify = lpfnNotifyHandler; - /* just return previously installed notification function */ - return tmp; -}