File: _generated\29\Microsoft.Diagnostics.DataContractReader.Legacy.ISOSMemoryEnum.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.SOSMemoryRegion*, uint*, int> Next_6;
}

file unsafe sealed class InterfaceInformation : global::System.Runtime.InteropServices.Marshalling.IIUnknownInterfaceType
{
    public static global::System.Guid Iid { get; } = new([236, 96, 184, 228, 122, 51, 192, 64, 165, 145, 240, 154, 150, 128, 105, 15]);
    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.ISOSMemoryEnum
{
    [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.ISOSMemoryEnum.Next(uint count, global::Microsoft.Diagnostics.DataContractReader.Legacy.SOSMemoryRegion[] memRegions, uint* pNeeded)
    {
        var(__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::Microsoft.Diagnostics.DataContractReader.Legacy.ISOSMemoryEnum));
        var __target = ((delegate* unmanaged[MemberFunction]<void*, uint, global::Microsoft.Diagnostics.DataContractReader.Legacy.SOSMemoryRegion*, uint*, int> )__vtable[6]);
        {
            int __retVal;
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (void* __memRegions_native = &global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Microsoft.Diagnostics.DataContractReader.Legacy.SOSMemoryRegion, global::Microsoft.Diagnostics.DataContractReader.Legacy.SOSMemoryRegion>.ManagedToUnmanagedIn.GetPinnableReference(memRegions))
            {
                __retVal = __target(__this, count, (global::Microsoft.Diagnostics.DataContractReader.Legacy.SOSMemoryRegion*)__memRegions_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.SOSMemoryRegion* __memRegions_native, uint* pNeeded)
    {
        global::Microsoft.Diagnostics.DataContractReader.Legacy.ISOSMemoryEnum @this = default;
        global::Microsoft.Diagnostics.DataContractReader.Legacy.SOSMemoryRegion[] memRegions = default;
        int __retVal = default;
        // Setup - Perform required setup.
        int __memRegions_native__numElements;
        __memRegions_native__numElements = default;
        try
        {
            // Unmarshal - Convert native data to managed data.
            __memRegions_native__numElements = checked((int)(count));
            memRegions = global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Microsoft.Diagnostics.DataContractReader.Legacy.SOSMemoryRegion, global::Microsoft.Diagnostics.DataContractReader.Legacy.SOSMemoryRegion>.AllocateContainerForManagedElements(__memRegions_native, __memRegions_native__numElements);
            global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Microsoft.Diagnostics.DataContractReader.Legacy.SOSMemoryRegion, global::Microsoft.Diagnostics.DataContractReader.Legacy.SOSMemoryRegion>.GetUnmanagedValuesSource(__memRegions_native, __memRegions_native__numElements).CopyTo(global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Microsoft.Diagnostics.DataContractReader.Legacy.SOSMemoryRegion, global::Microsoft.Diagnostics.DataContractReader.Legacy.SOSMemoryRegion>.GetManagedValuesDestination(memRegions));
            @this = global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch.GetInstance<global::Microsoft.Diagnostics.DataContractReader.Legacy.ISOSMemoryEnum>(__this_native);
            __retVal = @this.Next(count, memRegions, pNeeded);
            // Marshal - Convert managed data to native data.
            global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Microsoft.Diagnostics.DataContractReader.Legacy.SOSMemoryRegion, global::Microsoft.Diagnostics.DataContractReader.Legacy.SOSMemoryRegion>.GetManagedValuesDestination(memRegions).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.SOSMemoryRegion, global::Microsoft.Diagnostics.DataContractReader.Legacy.SOSMemoryRegion>.GetUnmanagedValuesSource(__memRegions_native, __memRegions_native__numElements)), global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Microsoft.Diagnostics.DataContractReader.Legacy.SOSMemoryRegion, global::Microsoft.Diagnostics.DataContractReader.Legacy.SOSMemoryRegion>.GetUnmanagedValuesSource(__memRegions_native, __memRegions_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.ISOSMemoryEnum.Skip(uint count)
    {
        var(__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::Microsoft.Diagnostics.DataContractReader.Legacy.ISOSMemoryEnum));
        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.ISOSMemoryEnum.Reset()
    {
        var(__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::Microsoft.Diagnostics.DataContractReader.Legacy.ISOSMemoryEnum));
        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.ISOSMemoryEnum.GetCount(uint* pCount)
    {
        var(__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::Microsoft.Diagnostics.DataContractReader.Legacy.ISOSMemoryEnum));
        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 ISOSMemoryEnum
    {
        [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);
    }
}