File: Generated\361d1da7f942c932\Microsoft.Diagnostics.DataContractReader.Legacy.ISOSStackRefErrorEnum.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, int> Skip_3;
    public unsafe delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, int> Reset_4;
    public unsafe delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, uint*, int> GetCount_5;
    public unsafe delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, uint, global::Microsoft.Diagnostics.DataContractReader.Legacy.SOSStackRefError*, uint*, int> Next_6;
}
 
file sealed class InterfaceInformation : global::System.Runtime.InteropServices.Marshalling.IIUnknownInterfaceType
{
    public static global::System.Guid Iid { get; } = new([27, 78, 79, 119, 123, 251, 27, 73, 151, 109, 168, 19, 15, 227, 85, 233]);
    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.ISOSStackRefErrorEnum
{
    [global::System.Runtime.CompilerServices.FixedAddressValueTypeAttribute]
    public static readonly InterfaceImplementationVtable Vtable;
 
    static InterfaceImplementation()
    {
        unsafe
        {
            global::System.Runtime.InteropServices.NativeMemory.Copy(
                global::System.Runtime.InteropServices.Marshalling.StrategyBasedComWrappers.DefaultIUnknownInterfaceDetailsStrategy.GetIUnknownDerivedDetails(typeof(global::Microsoft.Diagnostics.DataContractReader.Legacy.ISOSEnum).TypeHandle).ManagedVirtualMethodTable,
                global::System.Runtime.CompilerServices.Unsafe.AsPointer(ref Vtable),
                (nuint)(sizeof(void*) * 6));
 
            Vtable.Next_6 = &ABI_Next;
        }
    }
 
    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.ComInterfaceGenerator", "12.0.14.48102")]
    [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
    int global::Microsoft.Diagnostics.DataContractReader.Legacy.ISOSStackRefErrorEnum.Next(uint count, global::Microsoft.Diagnostics.DataContractReader.Legacy.SOSStackRefError[] refs, uint* pFetched)
    {
        unsafe
        {
            var (__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::Microsoft.Diagnostics.DataContractReader.Legacy.ISOSStackRefErrorEnum));
            var __target = ((delegate* unmanaged[MemberFunction]<void*, uint, global::Microsoft.Diagnostics.DataContractReader.Legacy.SOSStackRefError*, uint*, int>)__vtable[6]);
            {
                int __retVal;
                // Pin - Pin data in preparation for calling the P/Invoke.
                fixed (void* __refs_native = &global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Microsoft.Diagnostics.DataContractReader.Legacy.SOSStackRefError, global::Microsoft.Diagnostics.DataContractReader.Legacy.SOSStackRefError>.ManagedToUnmanagedIn.GetPinnableReference(refs))
                {
                    __retVal = __target(__this, count, (global::Microsoft.Diagnostics.DataContractReader.Legacy.SOSStackRefError*)__refs_native, pFetched);
                }
                // 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, uint count, global::Microsoft.Diagnostics.DataContractReader.Legacy.SOSStackRefError* __refs_native, uint* pFetched)
    {
        unsafe
        {
            global::Microsoft.Diagnostics.DataContractReader.Legacy.ISOSStackRefErrorEnum @this = default;
            global::Microsoft.Diagnostics.DataContractReader.Legacy.SOSStackRefError[] refs = default;
            int __retVal = default;
            // Setup - Perform required setup.
            int __refs_native__numElements;
            __refs_native__numElements = default;
            try
            {
                // Unmarshal - Convert native data to managed data.
                __refs_native__numElements = checked((int)(count));
                refs = global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Microsoft.Diagnostics.DataContractReader.Legacy.SOSStackRefError, global::Microsoft.Diagnostics.DataContractReader.Legacy.SOSStackRefError>.AllocateContainerForManagedElements(__refs_native, __refs_native__numElements);
                global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Microsoft.Diagnostics.DataContractReader.Legacy.SOSStackRefError, global::Microsoft.Diagnostics.DataContractReader.Legacy.SOSStackRefError>.GetUnmanagedValuesSource(__refs_native, __refs_native__numElements).CopyTo(global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Microsoft.Diagnostics.DataContractReader.Legacy.SOSStackRefError, global::Microsoft.Diagnostics.DataContractReader.Legacy.SOSStackRefError>.GetManagedValuesDestination(refs));
                @this = global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch.GetInstance<global::Microsoft.Diagnostics.DataContractReader.Legacy.ISOSStackRefErrorEnum>(__this_native);
                __retVal = @this.Next(count, refs, pFetched);
                // Marshal - Convert managed data to native data.
                global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Microsoft.Diagnostics.DataContractReader.Legacy.SOSStackRefError, global::Microsoft.Diagnostics.DataContractReader.Legacy.SOSStackRefError>.GetManagedValuesDestination(refs).CopyTo(global::System.Runtime.InteropServices.MemoryMarshal.CreateSpan(ref global::System.Runtime.InteropServices.MemoryMarshal.GetReference(global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Microsoft.Diagnostics.DataContractReader.Legacy.SOSStackRefError, global::Microsoft.Diagnostics.DataContractReader.Legacy.SOSStackRefError>.GetUnmanagedValuesSource(__refs_native, __refs_native__numElements)), global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Microsoft.Diagnostics.DataContractReader.Legacy.SOSStackRefError, global::Microsoft.Diagnostics.DataContractReader.Legacy.SOSStackRefError>.GetUnmanagedValuesSource(__refs_native, __refs_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.ISOSStackRefErrorEnum.Skip(uint count)
    {
        unsafe
        {
            var (__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::Microsoft.Diagnostics.DataContractReader.Legacy.ISOSStackRefErrorEnum));
            var __target = ((delegate* unmanaged[MemberFunction]<void*, uint, int>)__vtable[3]);
            {
                int __retVal;
                {
                    __retVal = __target(__this, count);
                }
                // NotifyForSuccessfulInvoke - Keep alive any managed objects that need to stay alive across the call.
                global::System.GC.KeepAlive(this);
                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.ISOSStackRefErrorEnum.Reset()
    {
        unsafe
        {
            var (__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::Microsoft.Diagnostics.DataContractReader.Legacy.ISOSStackRefErrorEnum));
            var __target = ((delegate* unmanaged[MemberFunction]<void*, int>)__vtable[4]);
            {
                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.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.ComInterfaceGenerator", "12.0.14.48102")]
    [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
    int global::Microsoft.Diagnostics.DataContractReader.Legacy.ISOSStackRefErrorEnum.GetCount(uint* pCount)
    {
        unsafe
        {
            var (__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::Microsoft.Diagnostics.DataContractReader.Legacy.ISOSStackRefErrorEnum));
            var __target = ((delegate* unmanaged[MemberFunction]<void*, uint*, int>)__vtable[5]);
            {
                int __retVal;
                {
                    __retVal = __target(__this, pCount);
                }
                // NotifyForSuccessfulInvoke - Keep alive any managed objects that need to stay alive across the call.
                global::System.GC.KeepAlive(this);
                return __retVal;
            }
        }
    }
 
    int global::Microsoft.Diagnostics.DataContractReader.Legacy.ISOSEnum.Skip(uint count) => throw new global::System.Diagnostics.UnreachableException();
 
    int global::Microsoft.Diagnostics.DataContractReader.Legacy.ISOSEnum.Reset() => throw new global::System.Diagnostics.UnreachableException();
 
    int global::Microsoft.Diagnostics.DataContractReader.Legacy.ISOSEnum.GetCount(uint* pCount) => throw new global::System.Diagnostics.UnreachableException();
}
 
namespace Microsoft.Diagnostics.DataContractReader.Legacy
{
    [global::System.Runtime.InteropServices.Marshalling.IUnknownDerivedAttribute<InterfaceInformation, InterfaceImplementation>]
    public unsafe partial interface ISOSStackRefErrorEnum
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.ComInterfaceGenerator", "12.0.14.48102")]
        [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
        [global::System.Runtime.InteropServices.PreserveSigAttribute()]
        new int Skip(uint count) => ((global::Microsoft.Diagnostics.DataContractReader.Legacy.ISOSEnum)this).Skip(count);
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.ComInterfaceGenerator", "12.0.14.48102")]
        [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
        [global::System.Runtime.InteropServices.PreserveSigAttribute()]
        new int Reset() => ((global::Microsoft.Diagnostics.DataContractReader.Legacy.ISOSEnum)this).Reset();
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.ComInterfaceGenerator", "12.0.14.48102")]
        [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
        [global::System.Runtime.InteropServices.PreserveSigAttribute()]
        new int GetCount(uint* pCount) => ((global::Microsoft.Diagnostics.DataContractReader.Legacy.ISOSEnum)this).GetCount(pCount);
    }
}