[ros-diffs] [ion] 54680: [NDK/RTL]: Implement, define, fix, and comment RtlSetUnhandledExceptionFilter.

ion at svn.reactos.org ion at svn.reactos.org
Sun Dec 18 01:50:12 UTC 2011


Author: ion
Date: Sun Dec 18 01:50:11 2011
New Revision: 54680

URL: http://svn.reactos.org/svn/reactos?rev=54680&view=rev
Log:
[NDK/RTL]: Implement, define, fix, and comment RtlSetUnhandledExceptionFilter.

Modified:
    trunk/reactos/include/ndk/rtlfuncs.h
    trunk/reactos/include/ndk/rtltypes.h
    trunk/reactos/lib/rtl/exception.c

Modified: trunk/reactos/include/ndk/rtlfuncs.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/rtlfuncs.h?rev=54680&r1=54679&r2=54680&view=diff
==============================================================================
--- trunk/reactos/include/ndk/rtlfuncs.h [iso-8859-1] (original)
+++ trunk/reactos/include/ndk/rtlfuncs.h [iso-8859-1] Sun Dec 18 01:50:11 2011
@@ -604,10 +604,10 @@
 );
 
 NTSYSAPI
-PVOID
+VOID
 NTAPI
 RtlSetUnhandledExceptionFilter(
-    IN PVOID TopLevelExceptionFilter
+    IN PRTLP_UNHANDLED_EXCEPTION_FILTER TopLevelExceptionFilter
 );
 
 NTSYSAPI

Modified: trunk/reactos/include/ndk/rtltypes.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/rtltypes.h?rev=54680&r1=54679&r2=54680&view=diff
==============================================================================
--- trunk/reactos/include/ndk/rtltypes.h [iso-8859-1] (original)
+++ trunk/reactos/include/ndk/rtltypes.h [iso-8859-1] Sun Dec 18 01:50:11 2011
@@ -471,6 +471,15 @@
 extern const PRTL_REALLOCATE_STRING_ROUTINE RtlReallocateStringRoutine;
 
 #endif /* NTOS_MODE_USER */
+
+//
+// Unhandled Exception Filter
+//
+typedef ULONG
+(NTAPI *RTLP_UNHANDLED_EXCEPTION_FILTER)(
+    IN struct _EXCEPTION_POINTERS *ExceptionInfo
+);
+typedef RTLP_UNHANDLED_EXCEPTION_FILTER *PRTLP_UNHANDLED_EXCEPTION_FILTER;
 
 //
 // Callback for RTL Heap Enumeration

Modified: trunk/reactos/lib/rtl/exception.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/exception.c?rev=54680&r1=54679&r2=54680&view=diff
==============================================================================
--- trunk/reactos/lib/rtl/exception.c [iso-8859-1] (original)
+++ trunk/reactos/lib/rtl/exception.c [iso-8859-1] Sun Dec 18 01:50:11 2011
@@ -14,6 +14,10 @@
 
 #define NDEBUG
 #include <debug.h>
+
+/* GLOBALS *****************************************************************/
+
+PRTLP_UNHANDLED_EXCEPTION_FILTER RtlpUnhandledExceptionFilter;
 
 /* FUNCTIONS ***************************************************************/
 
@@ -172,17 +176,18 @@
 NTAPI
 RtlUnhandledExceptionFilter(IN struct _EXCEPTION_POINTERS* ExceptionInfo)
 {
+    /* This is used by the security cookie checks, and calso called externally */
     UNIMPLEMENTED;
     return ERROR_CALL_NOT_IMPLEMENTED;
 }
 
 /*
- * @unimplemented
+ * @implemented
  */
-PVOID
+VOID
 NTAPI
-RtlSetUnhandledExceptionFilter(IN PVOID TopLevelExceptionFilter)
+RtlSetUnhandledExceptionFilter(IN PRTLP_UNHANDLED_EXCEPTION_FILTER TopLevelExceptionFilter)
 {
-    UNIMPLEMENTED;
-    return NULL;
+    /* Set the filter which is used by the CriticalSection package */
+    RtlpUnhandledExceptionFilter = RtlEncodePointer(TopLevelExceptionFilter);
 }




More information about the Ros-diffs mailing list