Author: cwittich
Date: Wed Nov 28 16:27:42 2007
New Revision: 30838
URL:
http://svn.reactos.org/svn/reactos?rev=30838&view=rev
Log:
fix exception filters
Modified:
trunk/reactos/dll/win32/kernel32/except/except.c
Modified: trunk/reactos/dll/win32/kernel32/except/except.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/except/…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/except/except.c (original)
+++ trunk/reactos/dll/win32/kernel32/except/except.c Wed Nov 28 16:27:42 2007
@@ -215,14 +215,22 @@
NTSTATUS ErrCode;
if (ExceptionInfo->ExceptionRecord->ExceptionCode == STATUS_ACCESS_VIOLATION
&&
- ExceptionInfo->ExceptionRecord->ExceptionInformation[0])
- {
- /* Change the protection on some write attempts, some InstallShield setups
- have this bug */
- RetValue = BasepCheckForReadOnlyResource(
- (PVOID)ExceptionInfo->ExceptionRecord->ExceptionInformation[1]);
- if (RetValue == EXCEPTION_CONTINUE_EXECUTION)
- return EXCEPTION_CONTINUE_EXECUTION;
+ ExceptionInfo->ExceptionRecord->NumberParameters >= 2)
+ {
+ switch(ExceptionInfo->ExceptionRecord->ExceptionInformation[0])
+ {
+ case EXCEPTION_WRITE_FAULT:
+ /* Change the protection on some write attempts, some InstallShield setups
+ have this bug */
+ RetValue = BasepCheckForReadOnlyResource(
+ (PVOID)ExceptionInfo->ExceptionRecord->ExceptionInformation[1]);
+ if (RetValue == EXCEPTION_CONTINUE_EXECUTION)
+ return EXCEPTION_CONTINUE_EXECUTION;
+ break;
+ case EXCEPTION_EXECUTE_FAULT:
+ /* FIXME */
+ break;
+ }
}
/* Is there a debugger running ? */
@@ -241,6 +249,13 @@
return EXCEPTION_CONTINUE_SEARCH;
}
+ if (GlobalTopLevelExceptionFilter)
+ {
+ LONG ret = GlobalTopLevelExceptionFilter( ExceptionInfo );
+ if (ret != EXCEPTION_CONTINUE_SEARCH)
+ return ret;
+ }
+
if ((GetErrorMode() & SEM_NOGPFAULTERRORBOX) == 0)
{
#ifdef _X86_