File: Generated\361d1da7f942c932\Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataStackWalk.cs
Project: 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 struct InterfaceImplementationVtable
{
    public unsafe delegate* unmanaged[MemberFunction]<void*, global::System.Guid*, void**, int> QueryInterface_0;
    public unsafe delegate* unmanaged[MemberFunction]<void*, uint> AddRef_1;
    public unsafe delegate* unmanaged[MemberFunction]<void*, uint> Release_2;
    public unsafe delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, uint, uint, uint*, byte*, int> GetContext_3;
    public unsafe delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, uint, byte*, int> SetContext_4;
    public unsafe delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, int> Next_5;
    public unsafe delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, ulong*, int> GetStackSizeSkipped_6;
    public unsafe delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, global::Microsoft.Diagnostics.DataContractReader.Legacy.CLRDataSimpleFrameType*, global::Microsoft.Diagnostics.DataContractReader.Legacy.CLRDataDetailedFrameType*, int> GetFrameType_7;
    public unsafe delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, void**, int> GetFrame_8;
    public unsafe delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, uint, uint, byte*, uint, byte*, int> Request_9;
    public unsafe delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, uint, uint, byte*, int> SetContext2_10;
}
 
file 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 unsafe void** ManagedVirtualMethodTable
    {
        get
        {
            unsafe
            {
                return (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()
    {
        unsafe
        {
            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", "12.0.14.48102")]
    [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
    int global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataStackWalk.GetContext(uint contextFlags, uint contextBufSize, uint* contextSize, byte[] contextBuf)
    {
        unsafe
        {
            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 unsafe int ABI_GetContext(global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native, uint contextFlags, uint contextBufSize, uint* contextSize, byte* __contextBuf_native)
    {
        unsafe
        {
            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", "12.0.14.48102")]
    [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
    int global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataStackWalk.SetContext(uint contextSize, byte[] context)
    {
        unsafe
        {
            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 unsafe int ABI_SetContext(global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native, uint contextSize, byte* __context_native)
    {
        unsafe
        {
            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", "12.0.14.48102")]
    [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
    int global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataStackWalk.Next()
    {
        unsafe
        {
            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 unsafe int ABI_Next(global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native)
    {
        unsafe
        {
            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", "12.0.14.48102")]
    [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
    int global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataStackWalk.GetStackSizeSkipped(ulong* stackSizeSkipped)
    {
        unsafe
        {
            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 unsafe int ABI_GetStackSizeSkipped(global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native, ulong* stackSizeSkipped)
    {
        unsafe
        {
            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", "12.0.14.48102")]
    [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
    int global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataStackWalk.GetFrameType(global::Microsoft.Diagnostics.DataContractReader.Legacy.CLRDataSimpleFrameType* simpleType, global::Microsoft.Diagnostics.DataContractReader.Legacy.CLRDataDetailedFrameType* detailedType)
    {
        unsafe
        {
            var (__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataStackWalk));
            var __target = ((delegate* unmanaged[MemberFunction]<void*, global::Microsoft.Diagnostics.DataContractReader.Legacy.CLRDataSimpleFrameType*, global::Microsoft.Diagnostics.DataContractReader.Legacy.CLRDataDetailedFrameType*, 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 unsafe int ABI_GetFrameType(global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native, global::Microsoft.Diagnostics.DataContractReader.Legacy.CLRDataSimpleFrameType* simpleType, global::Microsoft.Diagnostics.DataContractReader.Legacy.CLRDataDetailedFrameType* detailedType)
    {
        unsafe
        {
            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", "12.0.14.48102")]
    [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)
    {
        unsafe
        {
            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 unsafe int ABI_GetFrame(global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native, void** __frame_native)
    {
        unsafe
        {
            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", "12.0.14.48102")]
    [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
    int global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataStackWalk.Request(uint reqCode, uint inBufferSize, byte* inBuffer, uint outBufferSize, byte* outBuffer)
    {
        unsafe
        {
            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 unsafe int ABI_Request(global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native, uint reqCode, uint inBufferSize, byte* inBuffer, uint outBufferSize, byte* outBuffer)
    {
        unsafe
        {
            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", "12.0.14.48102")]
    [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
    int global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataStackWalk.SetContext2(uint flags, uint contextSize, byte[] context)
    {
        unsafe
        {
            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 unsafe int ABI_SetContext2(global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native, uint flags, uint contextSize, byte* __context_native)
    {
        unsafe
        {
            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
    {
    }
}