File: _generated\51\Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataStackWalk.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, uint, uint*, byte*, int> GetContext_3;
    public delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, uint, byte*, int> SetContext_4;
    public delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, int> Next_5;
    public delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, ulong*, int> GetStackSizeSkipped_6;
    public delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, uint*, uint*, int> GetFrameType_7;
    public delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, void**, int> GetFrame_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*, uint, uint, byte*, int> SetContext2_10;
}

file unsafe sealed class InterfaceInformation : global::System.Runtime.InteropServices.Marshalling.IIUnknownInterfaceType
{
    public static global::System.Guid Iid { get; } = new([34, 141, 157, 229, 167, 173, 162, 73, 137, 181, 164, 21, 175, 207, 201, 95]);
    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.IXCLRDataStackWalk
{
    [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.GetContext_3 = &ABI_GetContext;
        Vtable.SetContext_4 = &ABI_SetContext;
        Vtable.Next_5 = &ABI_Next;
        Vtable.GetStackSizeSkipped_6 = &ABI_GetStackSizeSkipped;
        Vtable.GetFrameType_7 = &ABI_GetFrameType;
        Vtable.GetFrame_8 = &ABI_GetFrame;
        Vtable.Request_9 = &ABI_Request;
        Vtable.SetContext2_10 = &ABI_SetContext2;
    }

    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.ComInterfaceGenerator", "11.0.14.22804")]
    [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
    int global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataStackWalk.GetContext(uint contextFlags, uint contextBufSize, uint* contextSize, byte[] contextBuf)
    {
        var(__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataStackWalk));
        var __target = ((delegate* unmanaged[MemberFunction]<void*, uint, uint, uint*, byte*, int> )__vtable[3]);
        {
            int __retVal;
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (void* __contextBuf_native = &global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<byte, byte>.ManagedToUnmanagedIn.GetPinnableReference(contextBuf))
            {
                __retVal = __target(__this, contextFlags, contextBufSize, contextSize, (byte*)__contextBuf_native);
            }
    
            // 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_GetContext(global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native, uint contextFlags, uint contextBufSize, uint* contextSize, byte* __contextBuf_native)
    {
        global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataStackWalk @this = default;
        byte[] contextBuf = default;
        int __retVal = default;
        // Setup - Perform required setup.
        int __contextBuf_native__numElements;
        __contextBuf_native__numElements = default;
        try
        {
            // Unmarshal - Convert native data to managed data.
            global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<byte, byte>.GetManagedValuesDestination(contextBuf).Clear();
            __contextBuf_native__numElements = checked((int)(contextBufSize));
            contextBuf = global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<byte, byte>.AllocateContainerForManagedElements(__contextBuf_native, __contextBuf_native__numElements);
            @this = global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch.GetInstance<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataStackWalk>(__this_native);
            __retVal = @this.GetContext(contextFlags, contextBufSize, contextSize, contextBuf);
            // Marshal - Convert managed data to native data.
            global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<byte, byte>.GetManagedValuesDestination(contextBuf).CopyTo(global::System.Runtime.InteropServices.MemoryMarshal.CreateSpan(ref global::System.Runtime.InteropServices.MemoryMarshal.GetReference(global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<byte, byte>.GetUnmanagedValuesSource(__contextBuf_native, __contextBuf_native__numElements)), global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<byte, byte>.GetUnmanagedValuesSource(__contextBuf_native, __contextBuf_native__numElements).Length));
        }
        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.IXCLRDataStackWalk.SetContext(uint contextSize, byte[] context)
    {
        var(__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataStackWalk));
        var __target = ((delegate* unmanaged[MemberFunction]<void*, uint, byte*, int> )__vtable[4]);
        {
            int __retVal;
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (void* __context_native = &global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<byte, byte>.ManagedToUnmanagedIn.GetPinnableReference(context))
            {
                __retVal = __target(__this, contextSize, (byte*)__context_native);
            }
    
            // 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_SetContext(global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native, uint contextSize, byte* __context_native)
    {
        global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataStackWalk @this = default;
        byte[] context = default;
        int __retVal = default;
        // Setup - Perform required setup.
        int __context_native__numElements;
        __context_native__numElements = default;
        try
        {
            // Unmarshal - Convert native data to managed data.
            __context_native__numElements = checked((int)(contextSize));
            context = global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<byte, byte>.AllocateContainerForManagedElements(__context_native, __context_native__numElements);
            global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<byte, byte>.GetUnmanagedValuesSource(__context_native, __context_native__numElements).CopyTo(global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<byte, byte>.GetManagedValuesDestination(context));
            @this = global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch.GetInstance<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataStackWalk>(__this_native);
            __retVal = @this.SetContext(contextSize, context);
        }
        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.IXCLRDataStackWalk.Next()
    {
        var(__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataStackWalk));
        var __target = ((delegate* unmanaged[MemberFunction]<void*, int> )__vtable[5]);
        {
            int __retVal;
            {
                __retVal = __target(__this);
            }
    
            // 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_Next(global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native)
    {
        global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataStackWalk @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.IXCLRDataStackWalk>(__this_native);
            __retVal = @this.Next();
        }
        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.IXCLRDataStackWalk.GetStackSizeSkipped(ulong* stackSizeSkipped)
    {
        var(__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataStackWalk));
        var __target = ((delegate* unmanaged[MemberFunction]<void*, ulong*, int> )__vtable[6]);
        {
            int __retVal;
            {
                __retVal = __target(__this, stackSizeSkipped);
            }
    
            // 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_GetStackSizeSkipped(global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native, ulong* stackSizeSkipped)
    {
        global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataStackWalk @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.IXCLRDataStackWalk>(__this_native);
            __retVal = @this.GetStackSizeSkipped(stackSizeSkipped);
        }
        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.IXCLRDataStackWalk.GetFrameType(uint* simpleType, uint* detailedType)
    {
        var(__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataStackWalk));
        var __target = ((delegate* unmanaged[MemberFunction]<void*, uint*, uint*, int> )__vtable[7]);
        {
            int __retVal;
            {
                __retVal = __target(__this, simpleType, detailedType);
            }
    
            // 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_GetFrameType(global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native, uint* simpleType, uint* detailedType)
    {
        global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataStackWalk @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.IXCLRDataStackWalk>(__this_native);
            __retVal = @this.GetFrameType(simpleType, detailedType);
        }
        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.IXCLRDataStackWalk.GetFrame(global::Microsoft.Diagnostics.DataContractReader.Legacy.DacComNullableByRef<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataFrame> frame)
    {
        var(__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataStackWalk));
        var __target = ((delegate* unmanaged[MemberFunction]<void*, void**, int> )__vtable[8]);
        {
            void** __frame_native = default;
            int __retVal = default;
            // Setup - Perform required setup.
            global::Microsoft.Diagnostics.DataContractReader.Legacy.DacComNullableByRefMarshaller<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataFrame>.ManagedToUnmanaged __frame_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __frame_native__marshaller.FromManaged(frame);
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __frame_native = __frame_native__marshaller.ToUnmanaged();
                    __retVal = __target(__this, __frame_native);
                }
    
                // NotifyForSuccessfulInvoke - Keep alive any managed objects that need to stay alive across the call.
                __frame_native__marshaller.OnInvoked();
                global::System.GC.KeepAlive(this);
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __frame_native__marshaller.Free();
            }
    
            return __retVal;
        }
    }

    [global::System.Runtime.InteropServices.UnmanagedCallersOnlyAttribute(CallConvs = new[] { typeof(global::System.Runtime.CompilerServices.CallConvMemberFunction) })]
    internal static int ABI_GetFrame(global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native, void** __frame_native)
    {
        global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataStackWalk @this = default;
        global::Microsoft.Diagnostics.DataContractReader.Legacy.DacComNullableByRef<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataFrame> frame = default;
        int __retVal = default;
        // Setup - Perform required setup.
        global::Microsoft.Diagnostics.DataContractReader.Legacy.DacComNullableByRefMarshaller<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataFrame>.UnmanagedToManaged __frame_native__marshaller = new();
        try
        {
            // UnmarshalCapture - Capture the native data into marshaller instances in case conversion to managed data throws an exception.
            __frame_native__marshaller.FromUnmanaged(__frame_native);
            // Unmarshal - Convert native data to managed data.
            frame = __frame_native__marshaller.ToManaged();
            @this = global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch.GetInstance<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataStackWalk>(__this_native);
            __retVal = @this.GetFrame(frame);
        }
        catch (global::System.Exception __exception)
        {
            __retVal = global::System.Runtime.InteropServices.Marshalling.ExceptionAsHResultMarshaller<int>.ConvertToUnmanaged(__exception);
        }
        finally
        {
            // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
            __frame_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.IXCLRDataStackWalk.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.IXCLRDataStackWalk));
        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.IXCLRDataStackWalk @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.IXCLRDataStackWalk>(__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.IXCLRDataStackWalk.SetContext2(uint flags, uint contextSize, byte[] context)
    {
        var(__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataStackWalk));
        var __target = ((delegate* unmanaged[MemberFunction]<void*, uint, uint, byte*, int> )__vtable[10]);
        {
            int __retVal;
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (void* __context_native = &global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<byte, byte>.ManagedToUnmanagedIn.GetPinnableReference(context))
            {
                __retVal = __target(__this, flags, contextSize, (byte*)__context_native);
            }
    
            // 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_SetContext2(global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native, uint flags, uint contextSize, byte* __context_native)
    {
        global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataStackWalk @this = default;
        byte[] context = default;
        int __retVal = default;
        // Setup - Perform required setup.
        int __context_native__numElements;
        __context_native__numElements = default;
        try
        {
            // Unmarshal - Convert native data to managed data.
            __context_native__numElements = checked((int)(contextSize));
            context = global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<byte, byte>.AllocateContainerForManagedElements(__context_native, __context_native__numElements);
            global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<byte, byte>.GetUnmanagedValuesSource(__context_native, __context_native__numElements).CopyTo(global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<byte, byte>.GetManagedValuesDestination(context));
            @this = global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch.GetInstance<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataStackWalk>(__this_native);
            __retVal = @this.SetContext2(flags, contextSize, context);
        }
        catch (global::System.Exception __exception)
        {
            __retVal = global::System.Runtime.InteropServices.Marshalling.ExceptionAsHResultMarshaller<int>.ConvertToUnmanaged(__exception);
        }
    
        return __retVal;
    }
}

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