File: _generated\61\Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataExceptionState.cs
Web Access
Project: src\src\runtime\src\native\managed\cdac\Microsoft.Diagnostics.DataContractReader.Legacy\Microsoft.Diagnostics.DataContractReader.Legacy.csproj (Microsoft.Diagnostics.DataContractReader.Legacy)
// <auto-generated />
#pragma warning disable CS0612, CS0618, CS0649, CS1591

[global::System.Runtime.InteropServices.StructLayoutAttribute(global::System.Runtime.InteropServices.LayoutKind.Sequential)]
file unsafe struct InterfaceImplementationVtable
{
    public delegate* unmanaged[MemberFunction]<void*, global::System.Guid*, void**, int> QueryInterface_0;
    public delegate* unmanaged[MemberFunction]<void*, uint> AddRef_1;
    public delegate* unmanaged[MemberFunction]<void*, uint> Release_2;
    public delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, uint*, int> GetFlags_3;
    public delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, void**, int> GetPrevious_4;
    public delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, void**, int> GetManagedObject_5;
    public delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, uint*, int> GetBaseType_6;
    public delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, uint*, int> GetCode_7;
    public delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, uint, uint*, char*, int> GetString_8;
    public delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, uint, uint, byte*, uint, byte*, int> Request_9;
    public delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, global::Microsoft.Diagnostics.DataContractReader.Legacy.EXCEPTION_RECORD64*, uint, byte*, int> IsSameState_10;
    public delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, uint, global::Microsoft.Diagnostics.DataContractReader.Legacy.EXCEPTION_RECORD64*, uint, byte*, int> IsSameState2_11;
    public delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, void**, int> GetTask_12;
}

file unsafe sealed class InterfaceInformation : global::System.Runtime.InteropServices.Marshalling.IIUnknownInterfaceType
{
    public static global::System.Guid Iid { get; } = new([76, 158, 218, 117, 51, 189, 200, 67, 143, 92, 150, 232, 165, 36, 31, 87]);
    public static void** ManagedVirtualMethodTable => (void**)global::System.Runtime.CompilerServices.Unsafe.AsPointer(in InterfaceImplementation.Vtable);
}

[global::System.Runtime.InteropServices.DynamicInterfaceCastableImplementationAttribute]
file unsafe interface InterfaceImplementation : global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataExceptionState
{
    [global::System.Runtime.CompilerServices.FixedAddressValueTypeAttribute]
    public static readonly InterfaceImplementationVtable Vtable;

    static InterfaceImplementation()
    {
        global::System.Runtime.InteropServices.ComWrappers.GetIUnknownImpl(
            out *(nint*)&((InterfaceImplementationVtable*)global::System.Runtime.CompilerServices.Unsafe.AsPointer(ref Vtable))->QueryInterface_0,
            out *(nint*)&((InterfaceImplementationVtable*)global::System.Runtime.CompilerServices.Unsafe.AsPointer(ref Vtable))->AddRef_1,
            out *(nint*)&((InterfaceImplementationVtable*)global::System.Runtime.CompilerServices.Unsafe.AsPointer(ref Vtable))->Release_2);

        Vtable.GetFlags_3 = &ABI_GetFlags;
        Vtable.GetPrevious_4 = &ABI_GetPrevious;
        Vtable.GetManagedObject_5 = &ABI_GetManagedObject;
        Vtable.GetBaseType_6 = &ABI_GetBaseType;
        Vtable.GetCode_7 = &ABI_GetCode;
        Vtable.GetString_8 = &ABI_GetString;
        Vtable.Request_9 = &ABI_Request;
        Vtable.IsSameState_10 = &ABI_IsSameState;
        Vtable.IsSameState2_11 = &ABI_IsSameState2;
        Vtable.GetTask_12 = &ABI_GetTask;
    }

    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.ComInterfaceGenerator", "11.0.14.22804")]
    [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
    int global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataExceptionState.GetFlags(uint* flags)
    {
        var(__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataExceptionState));
        var __target = ((delegate* unmanaged[MemberFunction]<void*, uint*, int> )__vtable[3]);
        {
            int __retVal;
            {
                __retVal = __target(__this, flags);
            }
    
            // NotifyForSuccessfulInvoke - Keep alive any managed objects that need to stay alive across the call.
            global::System.GC.KeepAlive(this);
            return __retVal;
        }
    }

    [global::System.Runtime.InteropServices.UnmanagedCallersOnlyAttribute(CallConvs = new[] { typeof(global::System.Runtime.CompilerServices.CallConvMemberFunction) })]
    internal static int ABI_GetFlags(global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native, uint* flags)
    {
        global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataExceptionState @this = default;
        int __retVal = default;
        try
        {
            // Unmarshal - Convert native data to managed data.
            @this = global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch.GetInstance<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataExceptionState>(__this_native);
            __retVal = @this.GetFlags(flags);
        }
        catch (global::System.Exception __exception)
        {
            __retVal = global::System.Runtime.InteropServices.Marshalling.ExceptionAsHResultMarshaller<int>.ConvertToUnmanaged(__exception);
        }
    
        return __retVal;
    }

    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.ComInterfaceGenerator", "11.0.14.22804")]
    [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
    int global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataExceptionState.GetPrevious(global::Microsoft.Diagnostics.DataContractReader.Legacy.DacComNullableByRef<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataExceptionState> exState)
    {
        var(__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataExceptionState));
        var __target = ((delegate* unmanaged[MemberFunction]<void*, void**, int> )__vtable[4]);
        {
            void** __exState_native = default;
            int __retVal = default;
            // Setup - Perform required setup.
            global::Microsoft.Diagnostics.DataContractReader.Legacy.DacComNullableByRefMarshaller<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataExceptionState>.ManagedToUnmanaged __exState_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __exState_native__marshaller.FromManaged(exState);
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __exState_native = __exState_native__marshaller.ToUnmanaged();
                    __retVal = __target(__this, __exState_native);
                }
    
                // NotifyForSuccessfulInvoke - Keep alive any managed objects that need to stay alive across the call.
                __exState_native__marshaller.OnInvoked();
                global::System.GC.KeepAlive(this);
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __exState_native__marshaller.Free();
            }
    
            return __retVal;
        }
    }

    [global::System.Runtime.InteropServices.UnmanagedCallersOnlyAttribute(CallConvs = new[] { typeof(global::System.Runtime.CompilerServices.CallConvMemberFunction) })]
    internal static int ABI_GetPrevious(global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native, void** __exState_native)
    {
        global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataExceptionState @this = default;
        global::Microsoft.Diagnostics.DataContractReader.Legacy.DacComNullableByRef<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataExceptionState> exState = default;
        int __retVal = default;
        // Setup - Perform required setup.
        global::Microsoft.Diagnostics.DataContractReader.Legacy.DacComNullableByRefMarshaller<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataExceptionState>.UnmanagedToManaged __exState_native__marshaller = new();
        try
        {
            // UnmarshalCapture - Capture the native data into marshaller instances in case conversion to managed data throws an exception.
            __exState_native__marshaller.FromUnmanaged(__exState_native);
            // Unmarshal - Convert native data to managed data.
            exState = __exState_native__marshaller.ToManaged();
            @this = global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch.GetInstance<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataExceptionState>(__this_native);
            __retVal = @this.GetPrevious(exState);
        }
        catch (global::System.Exception __exception)
        {
            __retVal = global::System.Runtime.InteropServices.Marshalling.ExceptionAsHResultMarshaller<int>.ConvertToUnmanaged(__exception);
        }
        finally
        {
            // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
            __exState_native__marshaller.Free();
        }
    
        return __retVal;
    }

    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.ComInterfaceGenerator", "11.0.14.22804")]
    [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
    int global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataExceptionState.GetManagedObject(global::Microsoft.Diagnostics.DataContractReader.Legacy.DacComNullableByRef<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataValue> value)
    {
        var(__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataExceptionState));
        var __target = ((delegate* unmanaged[MemberFunction]<void*, void**, int> )__vtable[5]);
        {
            void** __value_native = default;
            int __retVal = default;
            // Setup - Perform required setup.
            global::Microsoft.Diagnostics.DataContractReader.Legacy.DacComNullableByRefMarshaller<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataValue>.ManagedToUnmanaged __value_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __value_native__marshaller.FromManaged(value);
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __value_native = __value_native__marshaller.ToUnmanaged();
                    __retVal = __target(__this, __value_native);
                }
    
                // NotifyForSuccessfulInvoke - Keep alive any managed objects that need to stay alive across the call.
                __value_native__marshaller.OnInvoked();
                global::System.GC.KeepAlive(this);
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __value_native__marshaller.Free();
            }
    
            return __retVal;
        }
    }

    [global::System.Runtime.InteropServices.UnmanagedCallersOnlyAttribute(CallConvs = new[] { typeof(global::System.Runtime.CompilerServices.CallConvMemberFunction) })]
    internal static int ABI_GetManagedObject(global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native, void** __value_native)
    {
        global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataExceptionState @this = default;
        global::Microsoft.Diagnostics.DataContractReader.Legacy.DacComNullableByRef<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataValue> value = default;
        int __retVal = default;
        // Setup - Perform required setup.
        global::Microsoft.Diagnostics.DataContractReader.Legacy.DacComNullableByRefMarshaller<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataValue>.UnmanagedToManaged __value_native__marshaller = new();
        try
        {
            // UnmarshalCapture - Capture the native data into marshaller instances in case conversion to managed data throws an exception.
            __value_native__marshaller.FromUnmanaged(__value_native);
            // Unmarshal - Convert native data to managed data.
            value = __value_native__marshaller.ToManaged();
            @this = global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch.GetInstance<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataExceptionState>(__this_native);
            __retVal = @this.GetManagedObject(value);
        }
        catch (global::System.Exception __exception)
        {
            __retVal = global::System.Runtime.InteropServices.Marshalling.ExceptionAsHResultMarshaller<int>.ConvertToUnmanaged(__exception);
        }
        finally
        {
            // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
            __value_native__marshaller.Free();
        }
    
        return __retVal;
    }

    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.ComInterfaceGenerator", "11.0.14.22804")]
    [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
    int global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataExceptionState.GetBaseType(uint* type)
    {
        var(__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataExceptionState));
        var __target = ((delegate* unmanaged[MemberFunction]<void*, uint*, int> )__vtable[6]);
        {
            int __retVal;
            {
                __retVal = __target(__this, type);
            }
    
            // NotifyForSuccessfulInvoke - Keep alive any managed objects that need to stay alive across the call.
            global::System.GC.KeepAlive(this);
            return __retVal;
        }
    }

    [global::System.Runtime.InteropServices.UnmanagedCallersOnlyAttribute(CallConvs = new[] { typeof(global::System.Runtime.CompilerServices.CallConvMemberFunction) })]
    internal static int ABI_GetBaseType(global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native, uint* type)
    {
        global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataExceptionState @this = default;
        int __retVal = default;
        try
        {
            // Unmarshal - Convert native data to managed data.
            @this = global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch.GetInstance<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataExceptionState>(__this_native);
            __retVal = @this.GetBaseType(type);
        }
        catch (global::System.Exception __exception)
        {
            __retVal = global::System.Runtime.InteropServices.Marshalling.ExceptionAsHResultMarshaller<int>.ConvertToUnmanaged(__exception);
        }
    
        return __retVal;
    }

    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.ComInterfaceGenerator", "11.0.14.22804")]
    [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
    int global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataExceptionState.GetCode(uint* code)
    {
        var(__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataExceptionState));
        var __target = ((delegate* unmanaged[MemberFunction]<void*, uint*, int> )__vtable[7]);
        {
            int __retVal;
            {
                __retVal = __target(__this, code);
            }
    
            // NotifyForSuccessfulInvoke - Keep alive any managed objects that need to stay alive across the call.
            global::System.GC.KeepAlive(this);
            return __retVal;
        }
    }

    [global::System.Runtime.InteropServices.UnmanagedCallersOnlyAttribute(CallConvs = new[] { typeof(global::System.Runtime.CompilerServices.CallConvMemberFunction) })]
    internal static int ABI_GetCode(global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native, uint* code)
    {
        global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataExceptionState @this = default;
        int __retVal = default;
        try
        {
            // Unmarshal - Convert native data to managed data.
            @this = global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch.GetInstance<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataExceptionState>(__this_native);
            __retVal = @this.GetCode(code);
        }
        catch (global::System.Exception __exception)
        {
            __retVal = global::System.Runtime.InteropServices.Marshalling.ExceptionAsHResultMarshaller<int>.ConvertToUnmanaged(__exception);
        }
    
        return __retVal;
    }

    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.ComInterfaceGenerator", "11.0.14.22804")]
    [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
    int global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataExceptionState.GetString(uint bufLen, uint* strLen, char* str)
    {
        var(__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataExceptionState));
        var __target = ((delegate* unmanaged[MemberFunction]<void*, uint, uint*, char*, int> )__vtable[8]);
        {
            int __retVal;
            {
                __retVal = __target(__this, bufLen, strLen, str);
            }
    
            // NotifyForSuccessfulInvoke - Keep alive any managed objects that need to stay alive across the call.
            global::System.GC.KeepAlive(this);
            return __retVal;
        }
    }

    [global::System.Runtime.InteropServices.UnmanagedCallersOnlyAttribute(CallConvs = new[] { typeof(global::System.Runtime.CompilerServices.CallConvMemberFunction) })]
    internal static int ABI_GetString(global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native, uint bufLen, uint* strLen, char* str)
    {
        global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataExceptionState @this = default;
        int __retVal = default;
        try
        {
            // Unmarshal - Convert native data to managed data.
            @this = global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch.GetInstance<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataExceptionState>(__this_native);
            __retVal = @this.GetString(bufLen, strLen, str);
        }
        catch (global::System.Exception __exception)
        {
            __retVal = global::System.Runtime.InteropServices.Marshalling.ExceptionAsHResultMarshaller<int>.ConvertToUnmanaged(__exception);
        }
    
        return __retVal;
    }

    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.ComInterfaceGenerator", "11.0.14.22804")]
    [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
    int global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataExceptionState.Request(uint reqCode, uint inBufferSize, byte* inBuffer, uint outBufferSize, byte* outBuffer)
    {
        var(__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataExceptionState));
        var __target = ((delegate* unmanaged[MemberFunction]<void*, uint, uint, byte*, uint, byte*, int> )__vtable[9]);
        {
            int __retVal;
            {
                __retVal = __target(__this, reqCode, inBufferSize, inBuffer, outBufferSize, outBuffer);
            }
    
            // NotifyForSuccessfulInvoke - Keep alive any managed objects that need to stay alive across the call.
            global::System.GC.KeepAlive(this);
            return __retVal;
        }
    }

    [global::System.Runtime.InteropServices.UnmanagedCallersOnlyAttribute(CallConvs = new[] { typeof(global::System.Runtime.CompilerServices.CallConvMemberFunction) })]
    internal static int ABI_Request(global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native, uint reqCode, uint inBufferSize, byte* inBuffer, uint outBufferSize, byte* outBuffer)
    {
        global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataExceptionState @this = default;
        int __retVal = default;
        try
        {
            // Unmarshal - Convert native data to managed data.
            @this = global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch.GetInstance<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataExceptionState>(__this_native);
            __retVal = @this.Request(reqCode, inBufferSize, inBuffer, outBufferSize, outBuffer);
        }
        catch (global::System.Exception __exception)
        {
            __retVal = global::System.Runtime.InteropServices.Marshalling.ExceptionAsHResultMarshaller<int>.ConvertToUnmanaged(__exception);
        }
    
        return __retVal;
    }

    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.ComInterfaceGenerator", "11.0.14.22804")]
    [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
    int global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataExceptionState.IsSameState(global::Microsoft.Diagnostics.DataContractReader.Legacy.EXCEPTION_RECORD64* exRecord, uint contextSize, byte* cxRecord)
    {
        var(__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataExceptionState));
        var __target = ((delegate* unmanaged[MemberFunction]<void*, global::Microsoft.Diagnostics.DataContractReader.Legacy.EXCEPTION_RECORD64*, uint, byte*, int> )__vtable[10]);
        {
            int __retVal;
            {
                __retVal = __target(__this, exRecord, contextSize, cxRecord);
            }
    
            // NotifyForSuccessfulInvoke - Keep alive any managed objects that need to stay alive across the call.
            global::System.GC.KeepAlive(this);
            return __retVal;
        }
    }

    [global::System.Runtime.InteropServices.UnmanagedCallersOnlyAttribute(CallConvs = new[] { typeof(global::System.Runtime.CompilerServices.CallConvMemberFunction) })]
    internal static int ABI_IsSameState(global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native, global::Microsoft.Diagnostics.DataContractReader.Legacy.EXCEPTION_RECORD64* exRecord, uint contextSize, byte* cxRecord)
    {
        global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataExceptionState @this = default;
        int __retVal = default;
        try
        {
            // Unmarshal - Convert native data to managed data.
            @this = global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch.GetInstance<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataExceptionState>(__this_native);
            __retVal = @this.IsSameState(exRecord, contextSize, cxRecord);
        }
        catch (global::System.Exception __exception)
        {
            __retVal = global::System.Runtime.InteropServices.Marshalling.ExceptionAsHResultMarshaller<int>.ConvertToUnmanaged(__exception);
        }
    
        return __retVal;
    }

    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.ComInterfaceGenerator", "11.0.14.22804")]
    [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
    int global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataExceptionState.IsSameState2(uint flags, global::Microsoft.Diagnostics.DataContractReader.Legacy.EXCEPTION_RECORD64* exRecord, uint contextSize, byte* cxRecord)
    {
        var(__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataExceptionState));
        var __target = ((delegate* unmanaged[MemberFunction]<void*, uint, global::Microsoft.Diagnostics.DataContractReader.Legacy.EXCEPTION_RECORD64*, uint, byte*, int> )__vtable[11]);
        {
            int __retVal;
            {
                __retVal = __target(__this, flags, exRecord, contextSize, cxRecord);
            }
    
            // NotifyForSuccessfulInvoke - Keep alive any managed objects that need to stay alive across the call.
            global::System.GC.KeepAlive(this);
            return __retVal;
        }
    }

    [global::System.Runtime.InteropServices.UnmanagedCallersOnlyAttribute(CallConvs = new[] { typeof(global::System.Runtime.CompilerServices.CallConvMemberFunction) })]
    internal static int ABI_IsSameState2(global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native, uint flags, global::Microsoft.Diagnostics.DataContractReader.Legacy.EXCEPTION_RECORD64* exRecord, uint contextSize, byte* cxRecord)
    {
        global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataExceptionState @this = default;
        int __retVal = default;
        try
        {
            // Unmarshal - Convert native data to managed data.
            @this = global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch.GetInstance<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataExceptionState>(__this_native);
            __retVal = @this.IsSameState2(flags, exRecord, contextSize, cxRecord);
        }
        catch (global::System.Exception __exception)
        {
            __retVal = global::System.Runtime.InteropServices.Marshalling.ExceptionAsHResultMarshaller<int>.ConvertToUnmanaged(__exception);
        }
    
        return __retVal;
    }

    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.ComInterfaceGenerator", "11.0.14.22804")]
    [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
    int global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataExceptionState.GetTask(global::Microsoft.Diagnostics.DataContractReader.Legacy.DacComNullableByRef<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTask> task)
    {
        var(__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataExceptionState));
        var __target = ((delegate* unmanaged[MemberFunction]<void*, void**, int> )__vtable[12]);
        {
            void** __task_native = default;
            int __retVal = default;
            // Setup - Perform required setup.
            global::Microsoft.Diagnostics.DataContractReader.Legacy.DacComNullableByRefMarshaller<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTask>.ManagedToUnmanaged __task_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __task_native__marshaller.FromManaged(task);
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __task_native = __task_native__marshaller.ToUnmanaged();
                    __retVal = __target(__this, __task_native);
                }
    
                // NotifyForSuccessfulInvoke - Keep alive any managed objects that need to stay alive across the call.
                __task_native__marshaller.OnInvoked();
                global::System.GC.KeepAlive(this);
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __task_native__marshaller.Free();
            }
    
            return __retVal;
        }
    }

    [global::System.Runtime.InteropServices.UnmanagedCallersOnlyAttribute(CallConvs = new[] { typeof(global::System.Runtime.CompilerServices.CallConvMemberFunction) })]
    internal static int ABI_GetTask(global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native, void** __task_native)
    {
        global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataExceptionState @this = default;
        global::Microsoft.Diagnostics.DataContractReader.Legacy.DacComNullableByRef<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTask> task = default;
        int __retVal = default;
        // Setup - Perform required setup.
        global::Microsoft.Diagnostics.DataContractReader.Legacy.DacComNullableByRefMarshaller<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTask>.UnmanagedToManaged __task_native__marshaller = new();
        try
        {
            // UnmarshalCapture - Capture the native data into marshaller instances in case conversion to managed data throws an exception.
            __task_native__marshaller.FromUnmanaged(__task_native);
            // Unmarshal - Convert native data to managed data.
            task = __task_native__marshaller.ToManaged();
            @this = global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch.GetInstance<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataExceptionState>(__this_native);
            __retVal = @this.GetTask(task);
        }
        catch (global::System.Exception __exception)
        {
            __retVal = global::System.Runtime.InteropServices.Marshalling.ExceptionAsHResultMarshaller<int>.ConvertToUnmanaged(__exception);
        }
        finally
        {
            // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
            __task_native__marshaller.Free();
        }
    
        return __retVal;
    }
}

namespace Microsoft.Diagnostics.DataContractReader.Legacy
{
    [global::System.Runtime.InteropServices.Marshalling.IUnknownDerivedAttribute<InterfaceInformation, InterfaceImplementation>]
    public unsafe partial interface IXCLRDataExceptionState
    {
    }
}