From b398c16d5730cf09ebbb8f031dd8253966020ed4 Mon Sep 17 00:00:00 2001 From: "Yi Zhang (CLR)" Date: Fri, 21 Apr 2017 02:01:40 -0700 Subject: [PATCH] Add Marshal.GetExceptionPointers (dotnet/coreclr#11125) * Add Marshal.GetExceptionPointers * Remove SecurityCritical Commit migrated from https://github.com/dotnet/coreclr/commit/de27abba871bc74aa226426bc53696ddf09c9aee --- src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/Marshal.cs | 3 +++ src/coreclr/src/vm/ecalllist.h | 1 + 2 files changed, 4 insertions(+) diff --git a/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/Marshal.cs b/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/Marshal.cs index 248e0d5..6fb6311 100644 --- a/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/Marshal.cs +++ b/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/Marshal.cs @@ -824,6 +824,9 @@ namespace System.Runtime.InteropServices } [MethodImplAttribute(MethodImplOptions.InternalCall)] + public static extern /* struct _EXCEPTION_POINTERS* */ IntPtr GetExceptionPointers(); + + [MethodImplAttribute(MethodImplOptions.InternalCall)] public static extern int GetExceptionCode(); diff --git a/src/coreclr/src/vm/ecalllist.h b/src/coreclr/src/vm/ecalllist.h index 6ed29b8..5c3e5f8 100644 --- a/src/coreclr/src/vm/ecalllist.h +++ b/src/coreclr/src/vm/ecalllist.h @@ -946,6 +946,7 @@ FCFuncStart(gInteropMarshalFuncs) FCFuncElement("DestroyStructure", MarshalNative::DestroyStructure) FCFuncElement("UnsafeAddrOfPinnedArrayElement", MarshalNative::FCUnsafeAddrOfPinnedArrayElement) FCFuncElement("GetExceptionCode", ExceptionNative::GetExceptionCode) + FCFuncElement("GetExceptionPointers", ExceptionNative::GetExceptionPointers) QCFuncElement("GetHINSTANCE", COMModule::GetHINSTANCE) FCFuncElement("OffsetOfHelper", MarshalNative::OffsetOfHelper) -- 2.7.4