File: _generated\50\Microsoft.Diagnostics.DataContractReader.Legacy.ISOSStressLogMsgEnum.cs
Web Access
Project: 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.SOSStressMsgData*, uint*, int> Next_6;
    public delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, uint, uint, ulong*, uint*, int> GetArguments_7;
}

file unsafe sealed class InterfaceInformation : global::System.Runtime.InteropServices.Marshalling.IIUnknownInterfaceType
{
    public static global::System.Guid Iid { get; } = new([51, 176, 124, 67, 231, 175, 15, 76, 164, 167, 130, 200, 145, 188, 4, 158]);
    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.ISOSStressLogMsgEnum
{
    [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;
        Vtable.GetArguments_7 = &ABI_GetArguments;
    }

    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.ComInterfaceGenerator", "11.0.14.30315")]
    [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
    int global::Microsoft.Diagnostics.DataContractReader.Legacy.ISOSStressLogMsgEnum.Next(uint count, global::Microsoft.Diagnostics.DataContractReader.Legacy.SOSStressMsgData[] values, uint* pFetched)
    {
        var(__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::Microsoft.Diagnostics.DataContractReader.Legacy.ISOSStressLogMsgEnum));
        var __target = ((delegate* unmanaged[MemberFunction]<void*, uint, global::Microsoft.Diagnostics.DataContractReader.Legacy.SOSStressMsgData*, 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.SOSStressMsgData, global::Microsoft.Diagnostics.DataContractReader.Legacy.SOSStressMsgData>.ManagedToUnmanagedIn.GetPinnableReference(values))
            {
                __retVal = __target(__this, count, (global::Microsoft.Diagnostics.DataContractReader.Legacy.SOSStressMsgData*)__values_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 int ABI_Next(global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native, uint count, global::Microsoft.Diagnostics.DataContractReader.Legacy.SOSStressMsgData* __values_native, uint* pFetched)
    {
        global::Microsoft.Diagnostics.DataContractReader.Legacy.ISOSStressLogMsgEnum @this = default;
        global::Microsoft.Diagnostics.DataContractReader.Legacy.SOSStressMsgData[] 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.SOSStressMsgData, global::Microsoft.Diagnostics.DataContractReader.Legacy.SOSStressMsgData>.AllocateContainerForManagedElements(__values_native, __values_native__numElements);
            global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Microsoft.Diagnostics.DataContractReader.Legacy.SOSStressMsgData, global::Microsoft.Diagnostics.DataContractReader.Legacy.SOSStressMsgData>.GetUnmanagedValuesSource(__values_native, __values_native__numElements).CopyTo(global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Microsoft.Diagnostics.DataContractReader.Legacy.SOSStressMsgData, global::Microsoft.Diagnostics.DataContractReader.Legacy.SOSStressMsgData>.GetManagedValuesDestination(values));
            @this = global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch.GetInstance<global::Microsoft.Diagnostics.DataContractReader.Legacy.ISOSStressLogMsgEnum>(__this_native);
            __retVal = @this.Next(count, values, pFetched);
            // Marshal - Convert managed data to native data.
            global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Microsoft.Diagnostics.DataContractReader.Legacy.SOSStressMsgData, global::Microsoft.Diagnostics.DataContractReader.Legacy.SOSStressMsgData>.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.SOSStressMsgData, global::Microsoft.Diagnostics.DataContractReader.Legacy.SOSStressMsgData>.GetUnmanagedValuesSource(__values_native, __values_native__numElements)), global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Microsoft.Diagnostics.DataContractReader.Legacy.SOSStressMsgData, global::Microsoft.Diagnostics.DataContractReader.Legacy.SOSStressMsgData>.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.30315")]
    [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
    int global::Microsoft.Diagnostics.DataContractReader.Legacy.ISOSStressLogMsgEnum.GetArguments(uint messageIndex, uint argCount, global::Microsoft.Diagnostics.DataContractReader.Legacy.ClrDataAddress[] args, uint* pFetched)
    {
        var(__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::Microsoft.Diagnostics.DataContractReader.Legacy.ISOSStressLogMsgEnum));
        var __target = ((delegate* unmanaged[MemberFunction]<void*, uint, uint, ulong*, uint*, int> )__vtable[7]);
        {
            bool __invokeSucceeded = default;
            ulong* __args_native = default;
            int __retVal = default;
            // Setup - Perform required setup.
            scoped global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Microsoft.Diagnostics.DataContractReader.Legacy.ClrDataAddress, ulong>.ManagedToUnmanagedIn __args_native__marshaller = new();
            int __args_native__numElements;
            global::System.Runtime.CompilerServices.Unsafe.SkipInit(out __args_native__numElements);
            int __args_native__lastIndexMarshalled = 0;
            try
            {
                // Marshal - Convert managed data to native data.
                __args_native__marshaller.FromManaged(args, stackalloc ulong[global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Microsoft.Diagnostics.DataContractReader.Legacy.ClrDataAddress, ulong>.ManagedToUnmanagedIn.BufferSize]);
                {
                    global::System.ReadOnlySpan<global::Microsoft.Diagnostics.DataContractReader.Legacy.ClrDataAddress> __args_native__managedSpan = __args_native__marshaller.GetManagedValuesSource();
                    global::System.Span<ulong> __args_native__nativeSpan = __args_native__marshaller.GetUnmanagedValuesDestination();
                    for (int __i0 = 0; __i0 < __args_native__managedSpan.Length; ++__i0, ++__args_native__lastIndexMarshalled)
                    {
                        __args_native__nativeSpan[__i0] = global::Microsoft.Diagnostics.DataContractReader.Legacy.ClrDataAddressMarshaller.ConvertToUnmanaged(__args_native__managedSpan[__i0]);
                    }
                }
    
                // Pin - Pin data in preparation for calling the P/Invoke.
                fixed (void* __args_native__unused = __args_native__marshaller)
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __args_native = __args_native__marshaller.ToUnmanaged();
                    __retVal = __target(__this, messageIndex, argCount, __args_native, pFetched);
                }
    
                // NotifyForSuccessfulInvoke - Keep alive any managed objects that need to stay alive across the call.
                global::System.GC.KeepAlive(this);
                __invokeSucceeded = true;
                // Unmarshal - Convert native data to managed data.
                {
                    __args_native__numElements = __args_native__marshaller.GetManagedValuesSource().Length;
                    global::System.Span<global::Microsoft.Diagnostics.DataContractReader.Legacy.ClrDataAddress> __args_native__managedSpan = global::System.Runtime.InteropServices.MemoryMarshal.CreateSpan(ref global::System.Runtime.CompilerServices.Unsafe.AsRef(in __args_native__marshaller.GetManagedValuesSource().GetPinnableReference()), __args_native__numElements);
                    global::System.Span<ulong> __args_native__nativeSpan = __args_native__marshaller.GetUnmanagedValuesDestination();
                    for (int __i0 = 0; __i0 < __args_native__managedSpan.Length; ++__i0)
                    {
                        __args_native__managedSpan[__i0] = global::Microsoft.Diagnostics.DataContractReader.Legacy.ClrDataAddressMarshaller.ConvertToManaged(__args_native__nativeSpan[__i0]);
                    }
                }
            }
            finally
            {
                if (__invokeSucceeded)
                {
                    // CleanupCalleeAllocated - Perform cleanup of callee allocated resources.
                    _ = __args_native__lastIndexMarshalled;
                }
    
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                _ = __args_native__lastIndexMarshalled;
                __args_native__marshaller.Free();
            }
    
            return __retVal;
        }
    }

    [global::System.Runtime.InteropServices.UnmanagedCallersOnlyAttribute(CallConvs = new[] { typeof(global::System.Runtime.CompilerServices.CallConvMemberFunction) })]
    internal static int ABI_GetArguments(global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native, uint messageIndex, uint argCount, ulong* __args_native, uint* pFetched)
    {
        global::Microsoft.Diagnostics.DataContractReader.Legacy.ISOSStressLogMsgEnum @this = default;
        global::Microsoft.Diagnostics.DataContractReader.Legacy.ClrDataAddress[] args = default;
        int __retVal = default;
        // Setup - Perform required setup.
        int __args_native__numElements;
        __args_native__numElements = default;
        try
        {
            // Unmarshal - Convert native data to managed data.
            __args_native__numElements = checked((int)(argCount));
            args = global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Microsoft.Diagnostics.DataContractReader.Legacy.ClrDataAddress, ulong>.AllocateContainerForManagedElements(__args_native, __args_native__numElements);
            {
                global::System.ReadOnlySpan<ulong> __args_native__nativeSpan = global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Microsoft.Diagnostics.DataContractReader.Legacy.ClrDataAddress, ulong>.GetUnmanagedValuesSource(__args_native, __args_native__numElements);
                global::System.Span<global::Microsoft.Diagnostics.DataContractReader.Legacy.ClrDataAddress> __args_native__managedSpan = global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Microsoft.Diagnostics.DataContractReader.Legacy.ClrDataAddress, ulong>.GetManagedValuesDestination(args);
                for (int __i0 = 0; __i0 < __args_native__nativeSpan.Length; ++__i0)
                {
                    __args_native__managedSpan[__i0] = global::Microsoft.Diagnostics.DataContractReader.Legacy.ClrDataAddressMarshaller.ConvertToManaged(__args_native__nativeSpan[__i0]);
                }
            }
    
            @this = global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch.GetInstance<global::Microsoft.Diagnostics.DataContractReader.Legacy.ISOSStressLogMsgEnum>(__this_native);
            __retVal = @this.GetArguments(messageIndex, argCount, args, pFetched);
            // Marshal - Convert managed data to native data.
            {
                __args_native__numElements = global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Microsoft.Diagnostics.DataContractReader.Legacy.ClrDataAddress, ulong>.GetManagedValuesDestination(args).Length;
                global::System.Span<ulong> __args_native__nativeSpan = global::System.Runtime.InteropServices.MemoryMarshal.CreateSpan(ref global::System.Runtime.CompilerServices.Unsafe.AsRef(in global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Microsoft.Diagnostics.DataContractReader.Legacy.ClrDataAddress, ulong>.GetUnmanagedValuesSource(__args_native, __args_native__numElements).GetPinnableReference()), __args_native__numElements);
                global::System.Span<global::Microsoft.Diagnostics.DataContractReader.Legacy.ClrDataAddress> __args_native__managedSpan = global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Microsoft.Diagnostics.DataContractReader.Legacy.ClrDataAddress, ulong>.GetManagedValuesDestination(args);
                for (int __i0 = 0; __i0 < __args_native__nativeSpan.Length; ++__i0)
                {
                    ulong __args_native__nativeSpan____i0__original = __args_native__nativeSpan[__i0];
                    __args_native__nativeSpan[__i0] = global::Microsoft.Diagnostics.DataContractReader.Legacy.ClrDataAddressMarshaller.ConvertToUnmanaged(__args_native__managedSpan[__i0]);
                }
            }
        }
        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.30315")]
    [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
    int global::Microsoft.Diagnostics.DataContractReader.Legacy.ISOSStressLogMsgEnum.Skip(uint count)
    {
        var(__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::Microsoft.Diagnostics.DataContractReader.Legacy.ISOSStressLogMsgEnum));
        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.30315")]
    [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
    int global::Microsoft.Diagnostics.DataContractReader.Legacy.ISOSStressLogMsgEnum.Reset()
    {
        var(__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::Microsoft.Diagnostics.DataContractReader.Legacy.ISOSStressLogMsgEnum));
        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.30315")]
    [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
    int global::Microsoft.Diagnostics.DataContractReader.Legacy.ISOSStressLogMsgEnum.GetCount(uint* pCount)
    {
        var(__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::Microsoft.Diagnostics.DataContractReader.Legacy.ISOSStressLogMsgEnum));
        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 ISOSStressLogMsgEnum
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.ComInterfaceGenerator", "11.0.14.30315")]
        [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.30315")]
        [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.30315")]
        [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
        [global::System.Runtime.InteropServices.PreserveSigAttribute()]
        new int GetCount(uint* pCount) => ((global::Microsoft.Diagnostics.DataContractReader.Legacy.ISOSEnum)this).GetCount(pCount);
    }
}