Alexandre Julliard : ntoskrnl.exe: Correctly remove the vectored exception handler.
Alexandre Julliard
julliard at winehq.org
Tue Feb 3 09:13:01 CST 2009
Module: wine
Branch: master
Commit: 5dcdb4aba3090794639c8988842898de70308597
URL: http://source.winehq.org/git/wine.git/?a=commit;h=5dcdb4aba3090794639c8988842898de70308597
Author: Alexandre Julliard <julliard at winehq.org>
Date: Mon Feb 2 16:21:25 2009 +0100
ntoskrnl.exe: Correctly remove the vectored exception handler.
---
dlls/ntoskrnl.exe/ntoskrnl.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c
index a62f02a..0dc9aaf 100644
--- a/dlls/ntoskrnl.exe/ntoskrnl.c
+++ b/dlls/ntoskrnl.exe/ntoskrnl.c
@@ -1166,17 +1166,18 @@ PVOID WINAPI MmGetSystemRoutineAddress(PUNICODE_STRING SystemRoutineName)
*/
BOOL WINAPI DllMain( HINSTANCE inst, DWORD reason, LPVOID reserved )
{
+ static void *handler;
LARGE_INTEGER count;
switch(reason)
{
case DLL_PROCESS_ATTACH:
DisableThreadLibraryCalls( inst );
- RtlAddVectoredExceptionHandler( TRUE, vectored_handler );
+ handler = RtlAddVectoredExceptionHandler( TRUE, vectored_handler );
KeQueryTickCount( &count ); /* initialize the global KeTickCount */
break;
case DLL_PROCESS_DETACH:
- RtlRemoveVectoredExceptionHandler( vectored_handler );
+ RtlRemoveVectoredExceptionHandler( handler );
break;
}
return TRUE;
More information about the wine-cvs
mailing list