File: _generated\44\Microsoft.Diagnostics.DataContractReader.Legacy.ISOSMethodEnum.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> Skip_3;
    public delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, int> Reset_4;
    public delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, uint*, int> GetCount_5;
    public delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, uint, global::Microsoft.Diagnostics.DataContractReader.Legacy.SOSMethodData*, uint*, int> Next_6;
}

file unsafe sealed class InterfaceInformation : global::System.Runtime.InteropServices.Marshalling.IIUnknownInterfaceType
{
    public static global::System.Guid Iid { get; } = new([37, 231, 15, 60, 36, 195, 79, 74, 129, 0, 211, 153, 88, 138, 102, 46]);
    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.ISOSMethodEnum
{
    [global::System.Runtime.CompilerServices.FixedAddressValueTypeAttribute]
    public static readonly InterfaceImplementationVtable Vtable;

    static InterfaceImplementation()
    {
        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", "11.0.14.22804")]
    [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
    int global::Microsoft.Diagnostics.DataContractReader.Legacy.ISOSMethodEnum.Next(uint count, global::Microsoft.Diagnostics.DataContractReader.Legacy.SOSMethodData[] values, uint* pNeeded)
    {
        var(__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::Microsoft.Diagnostics.DataContractReader.Legacy.ISOSMethodEnum));
        var __target = ((delegate* unmanaged[MemberFunction]<void*, uint, global::Microsoft.Diagnostics.DataContractReader.Legacy.SOSMethodData*, uint*, int> )__vtable[6]);
        {
            int __retVal;
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (void* __values_native = &global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Microsoft.Diagnostics.DataContractReader.Legacy.SOSMethodData, global::Microsoft.Diagnostics.DataContractReader.Legacy.SOSMethodData>.ManagedToUnmanagedIn.GetPinnableReference(values))
            {
                __retVal = __target(__this, count, (global::Microsoft.Diagnostics.DataContractReader.Legacy.SOSMethodData*)__values_native, pNeeded);
            }
    
            // 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, uint count, global::Microsoft.Diagnostics.DataContractReader.Legacy.SOSMethodData* __values_native, uint* pNeeded)
    {
        global::Microsoft.Diagnostics.DataContractReader.Legacy.ISOSMethodEnum @this = default;
        global::Microsoft.Diagnostics.DataContractReader.Legacy.SOSMethodData[] values = default;
        int __retVal = default;
        // Setup - Perform required setup.
        int __values_native__numElements;
        __values_native__numElements = default;
        try
        {
            // Unmarshal - Convert native data to managed data.
            __values_native__numElements = checked((int)(count));
            values = global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Microsoft.Diagnostics.DataContractReader.Legacy.SOSMethodData, global::Microsoft.Diagnostics.DataContractReader.Legacy.SOSMethodData>.AllocateContainerForManagedElements(__values_native, __values_native__numElements);
            global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Microsoft.Diagnostics.DataContractReader.Legacy.SOSMethodData, global::Microsoft.Diagnostics.DataContractReader.Legacy.SOSMethodData>.GetUnmanagedValuesSource(__values_native, __values_native__numElements).CopyTo(global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Microsoft.Diagnostics.DataContractReader.Legacy.SOSMethodData, global::Microsoft.Diagnostics.DataContractReader.Legacy.SOSMethodData>.GetManagedValuesDestination(values));
            @this = global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch.GetInstance<global::Microsoft.Diagnostics.DataContractReader.Legacy.ISOSMethodEnum>(__this_native);
            __retVal = @this.Next(count, values, pNeeded);
            // Marshal - Convert managed data to native data.
            global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Microsoft.Diagnostics.DataContractReader.Legacy.SOSMethodData, global::Microsoft.Diagnostics.DataContractReader.Legacy.SOSMethodData>.GetManagedValuesDestination(values).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.SOSMethodData, global::Microsoft.Diagnostics.DataContractReader.Legacy.SOSMethodData>.GetUnmanagedValuesSource(__values_native, __values_native__numElements)), global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Microsoft.Diagnostics.DataContractReader.Legacy.SOSMethodData, global::Microsoft.Diagnostics.DataContractReader.Legacy.SOSMethodData>.GetUnmanagedValuesSource(__values_native, __values_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.ISOSMethodEnum.Skip(uint count)
    {
        var(__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::Microsoft.Diagnostics.DataContractReader.Legacy.ISOSMethodEnum));
        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", "11.0.14.22804")]
    [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
    int global::Microsoft.Diagnostics.DataContractReader.Legacy.ISOSMethodEnum.Reset()
    {
        var(__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::Microsoft.Diagnostics.DataContractReader.Legacy.ISOSMethodEnum));
        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", "11.0.14.22804")]
    [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
    int global::Microsoft.Diagnostics.DataContractReader.Legacy.ISOSMethodEnum.GetCount(uint* pCount)
    {
        var(__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::Microsoft.Diagnostics.DataContractReader.Legacy.ISOSMethodEnum));
        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 ISOSMethodEnum
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.ComInterfaceGenerator", "11.0.14.22804")]
        [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", "11.0.14.22804")]
        [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", "11.0.14.22804")]
        [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
        [global::System.Runtime.InteropServices.PreserveSigAttribute()]
        new int GetCount(uint* pCount) => ((global::Microsoft.Diagnostics.DataContractReader.Legacy.ISOSEnum)this).GetCount(pCount);
    }
}