File: _generated\58\Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition.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*, void**, int> GetModule_3;
    public delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, ulong*, int> StartEnumMethodDefinitions_4;
    public delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, ulong*, void**, int> EnumMethodDefinition_5;
    public delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, ulong, int> EndEnumMethodDefinitions_6;
    public delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, char*, uint, ulong*, int> StartEnumMethodDefinitionsByName_7;
    public delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, ulong*, void**, int> EnumMethodDefinitionByName_8;
    public delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, ulong, int> EndEnumMethodDefinitionsByName_9;
    public delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, uint, void**, int> GetMethodDefinitionByToken_10;
    public delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, void*, ulong*, int> StartEnumInstances_11;
    public delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, ulong*, void**, int> EnumInstance_12;
    public delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, ulong, int> EndEnumInstances_13;
    public delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, uint, uint, uint*, char*, int> GetName_14;
    public delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, uint*, void**, int> GetTokenAndScope_15;
    public delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, uint*, int> GetCorElementType_16;
    public delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, uint*, int> GetFlags_17;
    public delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, void*, int> IsSameObject_18;
    public delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, uint, uint, byte*, uint, byte*, int> Request_19;
    public delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, uint*, int> GetArrayRank_20;
    public delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, void**, int> GetBase_21;
    public delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, uint, uint*, int> GetNumFields_22;
    public delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, uint, ulong*, int> StartEnumFields_23;
    public delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, ulong*, uint, uint*, char*, void**, uint*, uint*, int> EnumField_24;
    public delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, ulong, int> EndEnumFields_25;
    public delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, char*, uint, uint, ulong*, int> StartEnumFieldsByName_26;
    public delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, ulong*, void**, uint*, uint*, int> EnumFieldByName_27;
    public delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, ulong, int> EndEnumFieldsByName_28;
    public delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, uint, uint, uint*, char*, void**, uint*, int> GetFieldByToken_29;
    public delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, uint*, int> GetTypeNotification_30;
    public delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, uint, int> SetTypeNotification_31;
    public delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, ulong*, uint, uint*, char*, void**, uint*, void**, uint*, int> EnumField2_32;
    public delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, ulong*, void**, uint*, void**, uint*, int> EnumFieldByName2_33;
    public delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, void*, uint, uint, uint*, char*, void**, uint*, int> GetFieldByToken2_34;
}

file unsafe sealed class InterfaceInformation : global::System.Runtime.InteropServices.Marshalling.IIUnknownInterfaceType
{
    public static global::System.Guid Iid { get; } = new([108, 102, 117, 70, 117, 194, 184, 69, 159, 108, 171, 22, 93, 92, 30, 9]);
    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.IXCLRDataTypeDefinition
{
    [global::System.Runtime.CompilerServices.FixedAddressValueTypeAttribute]
    public static readonly InterfaceImplementationVtable Vtable;

    static InterfaceImplementation()
    {
        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.GetModule_3 = &ABI_GetModule;
        Vtable.StartEnumMethodDefinitions_4 = &ABI_StartEnumMethodDefinitions;
        Vtable.EnumMethodDefinition_5 = &ABI_EnumMethodDefinition;
        Vtable.EndEnumMethodDefinitions_6 = &ABI_EndEnumMethodDefinitions;
        Vtable.StartEnumMethodDefinitionsByName_7 = &ABI_StartEnumMethodDefinitionsByName;
        Vtable.EnumMethodDefinitionByName_8 = &ABI_EnumMethodDefinitionByName;
        Vtable.EndEnumMethodDefinitionsByName_9 = &ABI_EndEnumMethodDefinitionsByName;
        Vtable.GetMethodDefinitionByToken_10 = &ABI_GetMethodDefinitionByToken;
        Vtable.StartEnumInstances_11 = &ABI_StartEnumInstances;
        Vtable.EnumInstance_12 = &ABI_EnumInstance;
        Vtable.EndEnumInstances_13 = &ABI_EndEnumInstances;
        Vtable.GetName_14 = &ABI_GetName;
        Vtable.GetTokenAndScope_15 = &ABI_GetTokenAndScope;
        Vtable.GetCorElementType_16 = &ABI_GetCorElementType;
        Vtable.GetFlags_17 = &ABI_GetFlags;
        Vtable.IsSameObject_18 = &ABI_IsSameObject;
        Vtable.Request_19 = &ABI_Request;
        Vtable.GetArrayRank_20 = &ABI_GetArrayRank;
        Vtable.GetBase_21 = &ABI_GetBase;
        Vtable.GetNumFields_22 = &ABI_GetNumFields;
        Vtable.StartEnumFields_23 = &ABI_StartEnumFields;
        Vtable.EnumField_24 = &ABI_EnumField;
        Vtable.EndEnumFields_25 = &ABI_EndEnumFields;
        Vtable.StartEnumFieldsByName_26 = &ABI_StartEnumFieldsByName;
        Vtable.EnumFieldByName_27 = &ABI_EnumFieldByName;
        Vtable.EndEnumFieldsByName_28 = &ABI_EndEnumFieldsByName;
        Vtable.GetFieldByToken_29 = &ABI_GetFieldByToken;
        Vtable.GetTypeNotification_30 = &ABI_GetTypeNotification;
        Vtable.SetTypeNotification_31 = &ABI_SetTypeNotification;
        Vtable.EnumField2_32 = &ABI_EnumField2;
        Vtable.EnumFieldByName2_33 = &ABI_EnumFieldByName2;
        Vtable.GetFieldByToken2_34 = &ABI_GetFieldByToken2;
    }

    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.ComInterfaceGenerator", "11.0.14.22804")]
    [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
    int global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition.GetModule(global::Microsoft.Diagnostics.DataContractReader.Legacy.DacComNullableByRef<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataModule> mod)
    {
        var(__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition));
        var __target = ((delegate* unmanaged[MemberFunction]<void*, void**, int> )__vtable[3]);
        {
            void** __mod_native = default;
            int __retVal = default;
            // Setup - Perform required setup.
            global::Microsoft.Diagnostics.DataContractReader.Legacy.DacComNullableByRefMarshaller<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataModule>.ManagedToUnmanaged __mod_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __mod_native__marshaller.FromManaged(mod);
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __mod_native = __mod_native__marshaller.ToUnmanaged();
                    __retVal = __target(__this, __mod_native);
                }
    
                // NotifyForSuccessfulInvoke - Keep alive any managed objects that need to stay alive across the call.
                __mod_native__marshaller.OnInvoked();
                global::System.GC.KeepAlive(this);
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __mod_native__marshaller.Free();
            }
    
            return __retVal;
        }
    }

    [global::System.Runtime.InteropServices.UnmanagedCallersOnlyAttribute(CallConvs = new[] { typeof(global::System.Runtime.CompilerServices.CallConvMemberFunction) })]
    internal static int ABI_GetModule(global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native, void** __mod_native)
    {
        global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition @this = default;
        global::Microsoft.Diagnostics.DataContractReader.Legacy.DacComNullableByRef<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataModule> mod = default;
        int __retVal = default;
        // Setup - Perform required setup.
        global::Microsoft.Diagnostics.DataContractReader.Legacy.DacComNullableByRefMarshaller<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataModule>.UnmanagedToManaged __mod_native__marshaller = new();
        try
        {
            // UnmarshalCapture - Capture the native data into marshaller instances in case conversion to managed data throws an exception.
            __mod_native__marshaller.FromUnmanaged(__mod_native);
            // Unmarshal - Convert native data to managed data.
            mod = __mod_native__marshaller.ToManaged();
            @this = global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch.GetInstance<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition>(__this_native);
            __retVal = @this.GetModule(mod);
        }
        catch (global::System.Exception __exception)
        {
            __retVal = global::System.Runtime.InteropServices.Marshalling.ExceptionAsHResultMarshaller<int>.ConvertToUnmanaged(__exception);
        }
        finally
        {
            // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
            __mod_native__marshaller.Free();
        }
    
        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.IXCLRDataTypeDefinition.StartEnumMethodDefinitions(ulong* handle)
    {
        var(__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition));
        var __target = ((delegate* unmanaged[MemberFunction]<void*, ulong*, int> )__vtable[4]);
        {
            int __retVal;
            {
                __retVal = __target(__this, handle);
            }
    
            // 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_StartEnumMethodDefinitions(global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native, ulong* handle)
    {
        global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition @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.IXCLRDataTypeDefinition>(__this_native);
            __retVal = @this.StartEnumMethodDefinitions(handle);
        }
        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.IXCLRDataTypeDefinition.EnumMethodDefinition(ulong* handle, global::Microsoft.Diagnostics.DataContractReader.Legacy.DacComNullableByRef<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataMethodDefinition> methodDefinition)
    {
        var(__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition));
        var __target = ((delegate* unmanaged[MemberFunction]<void*, ulong*, void**, int> )__vtable[5]);
        {
            void** __methodDefinition_native = default;
            int __retVal = default;
            // Setup - Perform required setup.
            global::Microsoft.Diagnostics.DataContractReader.Legacy.DacComNullableByRefMarshaller<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataMethodDefinition>.ManagedToUnmanaged __methodDefinition_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __methodDefinition_native__marshaller.FromManaged(methodDefinition);
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __methodDefinition_native = __methodDefinition_native__marshaller.ToUnmanaged();
                    __retVal = __target(__this, handle, __methodDefinition_native);
                }
    
                // NotifyForSuccessfulInvoke - Keep alive any managed objects that need to stay alive across the call.
                __methodDefinition_native__marshaller.OnInvoked();
                global::System.GC.KeepAlive(this);
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __methodDefinition_native__marshaller.Free();
            }
    
            return __retVal;
        }
    }

    [global::System.Runtime.InteropServices.UnmanagedCallersOnlyAttribute(CallConvs = new[] { typeof(global::System.Runtime.CompilerServices.CallConvMemberFunction) })]
    internal static int ABI_EnumMethodDefinition(global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native, ulong* handle, void** __methodDefinition_native)
    {
        global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition @this = default;
        global::Microsoft.Diagnostics.DataContractReader.Legacy.DacComNullableByRef<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataMethodDefinition> methodDefinition = default;
        int __retVal = default;
        // Setup - Perform required setup.
        global::Microsoft.Diagnostics.DataContractReader.Legacy.DacComNullableByRefMarshaller<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataMethodDefinition>.UnmanagedToManaged __methodDefinition_native__marshaller = new();
        try
        {
            // UnmarshalCapture - Capture the native data into marshaller instances in case conversion to managed data throws an exception.
            __methodDefinition_native__marshaller.FromUnmanaged(__methodDefinition_native);
            // Unmarshal - Convert native data to managed data.
            methodDefinition = __methodDefinition_native__marshaller.ToManaged();
            @this = global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch.GetInstance<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition>(__this_native);
            __retVal = @this.EnumMethodDefinition(handle, methodDefinition);
        }
        catch (global::System.Exception __exception)
        {
            __retVal = global::System.Runtime.InteropServices.Marshalling.ExceptionAsHResultMarshaller<int>.ConvertToUnmanaged(__exception);
        }
        finally
        {
            // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
            __methodDefinition_native__marshaller.Free();
        }
    
        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.IXCLRDataTypeDefinition.EndEnumMethodDefinitions(ulong handle)
    {
        var(__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition));
        var __target = ((delegate* unmanaged[MemberFunction]<void*, ulong, int> )__vtable[6]);
        {
            int __retVal;
            {
                __retVal = __target(__this, handle);
            }
    
            // 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_EndEnumMethodDefinitions(global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native, ulong handle)
    {
        global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition @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.IXCLRDataTypeDefinition>(__this_native);
            __retVal = @this.EndEnumMethodDefinitions(handle);
        }
        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.IXCLRDataTypeDefinition.StartEnumMethodDefinitionsByName(char* name, uint flags, ulong* handle)
    {
        var(__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition));
        var __target = ((delegate* unmanaged[MemberFunction]<void*, char*, uint, ulong*, int> )__vtable[7]);
        {
            int __retVal;
            {
                __retVal = __target(__this, name, flags, handle);
            }
    
            // 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_StartEnumMethodDefinitionsByName(global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native, char* name, uint flags, ulong* handle)
    {
        global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition @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.IXCLRDataTypeDefinition>(__this_native);
            __retVal = @this.StartEnumMethodDefinitionsByName(name, flags, handle);
        }
        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.IXCLRDataTypeDefinition.EnumMethodDefinitionByName(ulong* handle, global::Microsoft.Diagnostics.DataContractReader.Legacy.DacComNullableByRef<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataMethodDefinition> method)
    {
        var(__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition));
        var __target = ((delegate* unmanaged[MemberFunction]<void*, ulong*, void**, int> )__vtable[8]);
        {
            void** __method_native = default;
            int __retVal = default;
            // Setup - Perform required setup.
            global::Microsoft.Diagnostics.DataContractReader.Legacy.DacComNullableByRefMarshaller<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataMethodDefinition>.ManagedToUnmanaged __method_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __method_native__marshaller.FromManaged(method);
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __method_native = __method_native__marshaller.ToUnmanaged();
                    __retVal = __target(__this, handle, __method_native);
                }
    
                // NotifyForSuccessfulInvoke - Keep alive any managed objects that need to stay alive across the call.
                __method_native__marshaller.OnInvoked();
                global::System.GC.KeepAlive(this);
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __method_native__marshaller.Free();
            }
    
            return __retVal;
        }
    }

    [global::System.Runtime.InteropServices.UnmanagedCallersOnlyAttribute(CallConvs = new[] { typeof(global::System.Runtime.CompilerServices.CallConvMemberFunction) })]
    internal static int ABI_EnumMethodDefinitionByName(global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native, ulong* handle, void** __method_native)
    {
        global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition @this = default;
        global::Microsoft.Diagnostics.DataContractReader.Legacy.DacComNullableByRef<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataMethodDefinition> method = default;
        int __retVal = default;
        // Setup - Perform required setup.
        global::Microsoft.Diagnostics.DataContractReader.Legacy.DacComNullableByRefMarshaller<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataMethodDefinition>.UnmanagedToManaged __method_native__marshaller = new();
        try
        {
            // UnmarshalCapture - Capture the native data into marshaller instances in case conversion to managed data throws an exception.
            __method_native__marshaller.FromUnmanaged(__method_native);
            // Unmarshal - Convert native data to managed data.
            method = __method_native__marshaller.ToManaged();
            @this = global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch.GetInstance<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition>(__this_native);
            __retVal = @this.EnumMethodDefinitionByName(handle, method);
        }
        catch (global::System.Exception __exception)
        {
            __retVal = global::System.Runtime.InteropServices.Marshalling.ExceptionAsHResultMarshaller<int>.ConvertToUnmanaged(__exception);
        }
        finally
        {
            // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
            __method_native__marshaller.Free();
        }
    
        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.IXCLRDataTypeDefinition.EndEnumMethodDefinitionsByName(ulong handle)
    {
        var(__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition));
        var __target = ((delegate* unmanaged[MemberFunction]<void*, ulong, int> )__vtable[9]);
        {
            int __retVal;
            {
                __retVal = __target(__this, handle);
            }
    
            // 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_EndEnumMethodDefinitionsByName(global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native, ulong handle)
    {
        global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition @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.IXCLRDataTypeDefinition>(__this_native);
            __retVal = @this.EndEnumMethodDefinitionsByName(handle);
        }
        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.IXCLRDataTypeDefinition.GetMethodDefinitionByToken(uint token, global::Microsoft.Diagnostics.DataContractReader.Legacy.DacComNullableByRef<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataMethodDefinition> methodDefinition)
    {
        var(__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition));
        var __target = ((delegate* unmanaged[MemberFunction]<void*, uint, void**, int> )__vtable[10]);
        {
            void** __methodDefinition_native = default;
            int __retVal = default;
            // Setup - Perform required setup.
            global::Microsoft.Diagnostics.DataContractReader.Legacy.DacComNullableByRefMarshaller<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataMethodDefinition>.ManagedToUnmanaged __methodDefinition_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __methodDefinition_native__marshaller.FromManaged(methodDefinition);
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __methodDefinition_native = __methodDefinition_native__marshaller.ToUnmanaged();
                    __retVal = __target(__this, token, __methodDefinition_native);
                }
    
                // NotifyForSuccessfulInvoke - Keep alive any managed objects that need to stay alive across the call.
                __methodDefinition_native__marshaller.OnInvoked();
                global::System.GC.KeepAlive(this);
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __methodDefinition_native__marshaller.Free();
            }
    
            return __retVal;
        }
    }

    [global::System.Runtime.InteropServices.UnmanagedCallersOnlyAttribute(CallConvs = new[] { typeof(global::System.Runtime.CompilerServices.CallConvMemberFunction) })]
    internal static int ABI_GetMethodDefinitionByToken(global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native, uint token, void** __methodDefinition_native)
    {
        global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition @this = default;
        global::Microsoft.Diagnostics.DataContractReader.Legacy.DacComNullableByRef<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataMethodDefinition> methodDefinition = default;
        int __retVal = default;
        // Setup - Perform required setup.
        global::Microsoft.Diagnostics.DataContractReader.Legacy.DacComNullableByRefMarshaller<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataMethodDefinition>.UnmanagedToManaged __methodDefinition_native__marshaller = new();
        try
        {
            // UnmarshalCapture - Capture the native data into marshaller instances in case conversion to managed data throws an exception.
            __methodDefinition_native__marshaller.FromUnmanaged(__methodDefinition_native);
            // Unmarshal - Convert native data to managed data.
            methodDefinition = __methodDefinition_native__marshaller.ToManaged();
            @this = global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch.GetInstance<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition>(__this_native);
            __retVal = @this.GetMethodDefinitionByToken(token, methodDefinition);
        }
        catch (global::System.Exception __exception)
        {
            __retVal = global::System.Runtime.InteropServices.Marshalling.ExceptionAsHResultMarshaller<int>.ConvertToUnmanaged(__exception);
        }
        finally
        {
            // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
            __methodDefinition_native__marshaller.Free();
        }
    
        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.IXCLRDataTypeDefinition.StartEnumInstances(global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataAppDomain appDomain, ulong* handle)
    {
        var(__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition));
        var __target = ((delegate* unmanaged[MemberFunction]<void*, void*, ulong*, int> )__vtable[11]);
        {
            void* __appDomain_native = default;
            int __retVal = default;
            try
            {
                // Marshal - Convert managed data to native data.
                __appDomain_native = (void*)global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataAppDomain>.ConvertToUnmanaged(appDomain);
                {
                    __retVal = __target(__this, __appDomain_native, handle);
                }
    
                // NotifyForSuccessfulInvoke - Keep alive any managed objects that need to stay alive across the call.
                global::System.GC.KeepAlive(this);
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataAppDomain>.Free(__appDomain_native);
            }
    
            return __retVal;
        }
    }

    [global::System.Runtime.InteropServices.UnmanagedCallersOnlyAttribute(CallConvs = new[] { typeof(global::System.Runtime.CompilerServices.CallConvMemberFunction) })]
    internal static int ABI_StartEnumInstances(global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native, void* __appDomain_native, ulong* handle)
    {
        global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition @this = default;
        global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataAppDomain appDomain = default;
        int __retVal = default;
        try
        {
            // Unmarshal - Convert native data to managed data.
            appDomain = global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataAppDomain>.ConvertToManaged(__appDomain_native);
            @this = global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch.GetInstance<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition>(__this_native);
            __retVal = @this.StartEnumInstances(appDomain, handle);
        }
        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.IXCLRDataTypeDefinition.EnumInstance(ulong* handle, global::Microsoft.Diagnostics.DataContractReader.Legacy.DacComNullableByRef<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeInstance> instance)
    {
        var(__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition));
        var __target = ((delegate* unmanaged[MemberFunction]<void*, ulong*, void**, int> )__vtable[12]);
        {
            void** __instance_native = default;
            int __retVal = default;
            // Setup - Perform required setup.
            global::Microsoft.Diagnostics.DataContractReader.Legacy.DacComNullableByRefMarshaller<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeInstance>.ManagedToUnmanaged __instance_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __instance_native__marshaller.FromManaged(instance);
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __instance_native = __instance_native__marshaller.ToUnmanaged();
                    __retVal = __target(__this, handle, __instance_native);
                }
    
                // NotifyForSuccessfulInvoke - Keep alive any managed objects that need to stay alive across the call.
                __instance_native__marshaller.OnInvoked();
                global::System.GC.KeepAlive(this);
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __instance_native__marshaller.Free();
            }
    
            return __retVal;
        }
    }

    [global::System.Runtime.InteropServices.UnmanagedCallersOnlyAttribute(CallConvs = new[] { typeof(global::System.Runtime.CompilerServices.CallConvMemberFunction) })]
    internal static int ABI_EnumInstance(global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native, ulong* handle, void** __instance_native)
    {
        global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition @this = default;
        global::Microsoft.Diagnostics.DataContractReader.Legacy.DacComNullableByRef<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeInstance> instance = default;
        int __retVal = default;
        // Setup - Perform required setup.
        global::Microsoft.Diagnostics.DataContractReader.Legacy.DacComNullableByRefMarshaller<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeInstance>.UnmanagedToManaged __instance_native__marshaller = new();
        try
        {
            // UnmarshalCapture - Capture the native data into marshaller instances in case conversion to managed data throws an exception.
            __instance_native__marshaller.FromUnmanaged(__instance_native);
            // Unmarshal - Convert native data to managed data.
            instance = __instance_native__marshaller.ToManaged();
            @this = global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch.GetInstance<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition>(__this_native);
            __retVal = @this.EnumInstance(handle, instance);
        }
        catch (global::System.Exception __exception)
        {
            __retVal = global::System.Runtime.InteropServices.Marshalling.ExceptionAsHResultMarshaller<int>.ConvertToUnmanaged(__exception);
        }
        finally
        {
            // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
            __instance_native__marshaller.Free();
        }
    
        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.IXCLRDataTypeDefinition.EndEnumInstances(ulong handle)
    {
        var(__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition));
        var __target = ((delegate* unmanaged[MemberFunction]<void*, ulong, int> )__vtable[13]);
        {
            int __retVal;
            {
                __retVal = __target(__this, handle);
            }
    
            // 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_EndEnumInstances(global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native, ulong handle)
    {
        global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition @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.IXCLRDataTypeDefinition>(__this_native);
            __retVal = @this.EndEnumInstances(handle);
        }
        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.IXCLRDataTypeDefinition.GetName(uint flags, uint bufLen, uint* nameLen, char* nameBuf)
    {
        var(__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition));
        var __target = ((delegate* unmanaged[MemberFunction]<void*, uint, uint, uint*, char*, int> )__vtable[14]);
        {
            int __retVal;
            {
                __retVal = __target(__this, flags, bufLen, nameLen, nameBuf);
            }
    
            // 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_GetName(global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native, uint flags, uint bufLen, uint* nameLen, char* nameBuf)
    {
        global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition @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.IXCLRDataTypeDefinition>(__this_native);
            __retVal = @this.GetName(flags, bufLen, nameLen, nameBuf);
        }
        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.IXCLRDataTypeDefinition.GetTokenAndScope(uint* token, global::Microsoft.Diagnostics.DataContractReader.Legacy.DacComNullableByRef<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataModule> mod)
    {
        var(__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition));
        var __target = ((delegate* unmanaged[MemberFunction]<void*, uint*, void**, int> )__vtable[15]);
        {
            void** __mod_native = default;
            int __retVal = default;
            // Setup - Perform required setup.
            global::Microsoft.Diagnostics.DataContractReader.Legacy.DacComNullableByRefMarshaller<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataModule>.ManagedToUnmanaged __mod_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __mod_native__marshaller.FromManaged(mod);
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __mod_native = __mod_native__marshaller.ToUnmanaged();
                    __retVal = __target(__this, token, __mod_native);
                }
    
                // NotifyForSuccessfulInvoke - Keep alive any managed objects that need to stay alive across the call.
                __mod_native__marshaller.OnInvoked();
                global::System.GC.KeepAlive(this);
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __mod_native__marshaller.Free();
            }
    
            return __retVal;
        }
    }

    [global::System.Runtime.InteropServices.UnmanagedCallersOnlyAttribute(CallConvs = new[] { typeof(global::System.Runtime.CompilerServices.CallConvMemberFunction) })]
    internal static int ABI_GetTokenAndScope(global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native, uint* token, void** __mod_native)
    {
        global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition @this = default;
        global::Microsoft.Diagnostics.DataContractReader.Legacy.DacComNullableByRef<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataModule> mod = default;
        int __retVal = default;
        // Setup - Perform required setup.
        global::Microsoft.Diagnostics.DataContractReader.Legacy.DacComNullableByRefMarshaller<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataModule>.UnmanagedToManaged __mod_native__marshaller = new();
        try
        {
            // UnmarshalCapture - Capture the native data into marshaller instances in case conversion to managed data throws an exception.
            __mod_native__marshaller.FromUnmanaged(__mod_native);
            // Unmarshal - Convert native data to managed data.
            mod = __mod_native__marshaller.ToManaged();
            @this = global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch.GetInstance<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition>(__this_native);
            __retVal = @this.GetTokenAndScope(token, mod);
        }
        catch (global::System.Exception __exception)
        {
            __retVal = global::System.Runtime.InteropServices.Marshalling.ExceptionAsHResultMarshaller<int>.ConvertToUnmanaged(__exception);
        }
        finally
        {
            // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
            __mod_native__marshaller.Free();
        }
    
        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.IXCLRDataTypeDefinition.GetCorElementType(uint* type)
    {
        var(__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition));
        var __target = ((delegate* unmanaged[MemberFunction]<void*, uint*, int> )__vtable[16]);
        {
            int __retVal;
            {
                __retVal = __target(__this, type);
            }
    
            // 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_GetCorElementType(global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native, uint* type)
    {
        global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition @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.IXCLRDataTypeDefinition>(__this_native);
            __retVal = @this.GetCorElementType(type);
        }
        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.IXCLRDataTypeDefinition.GetFlags(uint* flags)
    {
        var(__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition));
        var __target = ((delegate* unmanaged[MemberFunction]<void*, uint*, int> )__vtable[17]);
        {
            int __retVal;
            {
                __retVal = __target(__this, flags);
            }
    
            // 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_GetFlags(global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native, uint* flags)
    {
        global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition @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.IXCLRDataTypeDefinition>(__this_native);
            __retVal = @this.GetFlags(flags);
        }
        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.IXCLRDataTypeDefinition.IsSameObject(global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition type)
    {
        var(__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition));
        var __target = ((delegate* unmanaged[MemberFunction]<void*, void*, int> )__vtable[18]);
        {
            void* __type_native = default;
            int __retVal = default;
            try
            {
                // Marshal - Convert managed data to native data.
                __type_native = (void*)global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition>.ConvertToUnmanaged(type);
                {
                    __retVal = __target(__this, __type_native);
                }
    
                // NotifyForSuccessfulInvoke - Keep alive any managed objects that need to stay alive across the call.
                global::System.GC.KeepAlive(this);
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition>.Free(__type_native);
            }
    
            return __retVal;
        }
    }

    [global::System.Runtime.InteropServices.UnmanagedCallersOnlyAttribute(CallConvs = new[] { typeof(global::System.Runtime.CompilerServices.CallConvMemberFunction) })]
    internal static int ABI_IsSameObject(global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native, void* __type_native)
    {
        global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition @this = default;
        global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition type = default;
        int __retVal = default;
        try
        {
            // Unmarshal - Convert native data to managed data.
            type = global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition>.ConvertToManaged(__type_native);
            @this = global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch.GetInstance<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition>(__this_native);
            __retVal = @this.IsSameObject(type);
        }
        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.IXCLRDataTypeDefinition.Request(uint reqCode, uint inBufferSize, byte* inBuffer, uint outBufferSize, byte* outBuffer)
    {
        var(__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition));
        var __target = ((delegate* unmanaged[MemberFunction]<void*, uint, uint, byte*, uint, byte*, int> )__vtable[19]);
        {
            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 int ABI_Request(global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native, uint reqCode, uint inBufferSize, byte* inBuffer, uint outBufferSize, byte* outBuffer)
    {
        global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition @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.IXCLRDataTypeDefinition>(__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", "11.0.14.22804")]
    [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
    int global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition.GetArrayRank(uint* rank)
    {
        var(__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition));
        var __target = ((delegate* unmanaged[MemberFunction]<void*, uint*, int> )__vtable[20]);
        {
            int __retVal;
            {
                __retVal = __target(__this, rank);
            }
    
            // 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_GetArrayRank(global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native, uint* rank)
    {
        global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition @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.IXCLRDataTypeDefinition>(__this_native);
            __retVal = @this.GetArrayRank(rank);
        }
        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.IXCLRDataTypeDefinition.GetBase(global::Microsoft.Diagnostics.DataContractReader.Legacy.DacComNullableByRef<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition> @base)
    {
        var(__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition));
        var __target = ((delegate* unmanaged[MemberFunction]<void*, void**, int> )__vtable[21]);
        {
            void** __base_native = default;
            int __retVal = default;
            // Setup - Perform required setup.
            global::Microsoft.Diagnostics.DataContractReader.Legacy.DacComNullableByRefMarshaller<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition>.ManagedToUnmanaged __base_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __base_native__marshaller.FromManaged(@base);
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __base_native = __base_native__marshaller.ToUnmanaged();
                    __retVal = __target(__this, __base_native);
                }
    
                // NotifyForSuccessfulInvoke - Keep alive any managed objects that need to stay alive across the call.
                __base_native__marshaller.OnInvoked();
                global::System.GC.KeepAlive(this);
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __base_native__marshaller.Free();
            }
    
            return __retVal;
        }
    }

    [global::System.Runtime.InteropServices.UnmanagedCallersOnlyAttribute(CallConvs = new[] { typeof(global::System.Runtime.CompilerServices.CallConvMemberFunction) })]
    internal static int ABI_GetBase(global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native, void** __base_native)
    {
        global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition @this = default;
        global::Microsoft.Diagnostics.DataContractReader.Legacy.DacComNullableByRef<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition> @base = default;
        int __retVal = default;
        // Setup - Perform required setup.
        global::Microsoft.Diagnostics.DataContractReader.Legacy.DacComNullableByRefMarshaller<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition>.UnmanagedToManaged __base_native__marshaller = new();
        try
        {
            // UnmarshalCapture - Capture the native data into marshaller instances in case conversion to managed data throws an exception.
            __base_native__marshaller.FromUnmanaged(__base_native);
            // Unmarshal - Convert native data to managed data.
            @base = __base_native__marshaller.ToManaged();
            @this = global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch.GetInstance<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition>(__this_native);
            __retVal = @this.GetBase(@base);
        }
        catch (global::System.Exception __exception)
        {
            __retVal = global::System.Runtime.InteropServices.Marshalling.ExceptionAsHResultMarshaller<int>.ConvertToUnmanaged(__exception);
        }
        finally
        {
            // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
            __base_native__marshaller.Free();
        }
    
        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.IXCLRDataTypeDefinition.GetNumFields(uint flags, uint* numFields)
    {
        var(__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition));
        var __target = ((delegate* unmanaged[MemberFunction]<void*, uint, uint*, int> )__vtable[22]);
        {
            int __retVal;
            {
                __retVal = __target(__this, flags, numFields);
            }
    
            // 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_GetNumFields(global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native, uint flags, uint* numFields)
    {
        global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition @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.IXCLRDataTypeDefinition>(__this_native);
            __retVal = @this.GetNumFields(flags, numFields);
        }
        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.IXCLRDataTypeDefinition.StartEnumFields(uint flags, ulong* handle)
    {
        var(__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition));
        var __target = ((delegate* unmanaged[MemberFunction]<void*, uint, ulong*, int> )__vtable[23]);
        {
            int __retVal;
            {
                __retVal = __target(__this, flags, handle);
            }
    
            // 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_StartEnumFields(global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native, uint flags, ulong* handle)
    {
        global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition @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.IXCLRDataTypeDefinition>(__this_native);
            __retVal = @this.StartEnumFields(flags, handle);
        }
        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.IXCLRDataTypeDefinition.EnumField(ulong* handle, uint nameBufLen, uint* nameLen, char* nameBuf, global::Microsoft.Diagnostics.DataContractReader.Legacy.DacComNullableByRef<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition> type, uint* flags, uint* token)
    {
        var(__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition));
        var __target = ((delegate* unmanaged[MemberFunction]<void*, ulong*, uint, uint*, char*, void**, uint*, uint*, int> )__vtable[24]);
        {
            void** __type_native = default;
            int __retVal = default;
            // Setup - Perform required setup.
            global::Microsoft.Diagnostics.DataContractReader.Legacy.DacComNullableByRefMarshaller<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition>.ManagedToUnmanaged __type_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __type_native__marshaller.FromManaged(type);
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __type_native = __type_native__marshaller.ToUnmanaged();
                    __retVal = __target(__this, handle, nameBufLen, nameLen, nameBuf, __type_native, flags, token);
                }
    
                // NotifyForSuccessfulInvoke - Keep alive any managed objects that need to stay alive across the call.
                __type_native__marshaller.OnInvoked();
                global::System.GC.KeepAlive(this);
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __type_native__marshaller.Free();
            }
    
            return __retVal;
        }
    }

    [global::System.Runtime.InteropServices.UnmanagedCallersOnlyAttribute(CallConvs = new[] { typeof(global::System.Runtime.CompilerServices.CallConvMemberFunction) })]
    internal static int ABI_EnumField(global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native, ulong* handle, uint nameBufLen, uint* nameLen, char* nameBuf, void** __type_native, uint* flags, uint* token)
    {
        global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition @this = default;
        global::Microsoft.Diagnostics.DataContractReader.Legacy.DacComNullableByRef<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition> type = default;
        int __retVal = default;
        // Setup - Perform required setup.
        global::Microsoft.Diagnostics.DataContractReader.Legacy.DacComNullableByRefMarshaller<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition>.UnmanagedToManaged __type_native__marshaller = new();
        try
        {
            // UnmarshalCapture - Capture the native data into marshaller instances in case conversion to managed data throws an exception.
            __type_native__marshaller.FromUnmanaged(__type_native);
            // Unmarshal - Convert native data to managed data.
            type = __type_native__marshaller.ToManaged();
            @this = global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch.GetInstance<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition>(__this_native);
            __retVal = @this.EnumField(handle, nameBufLen, nameLen, nameBuf, type, flags, token);
        }
        catch (global::System.Exception __exception)
        {
            __retVal = global::System.Runtime.InteropServices.Marshalling.ExceptionAsHResultMarshaller<int>.ConvertToUnmanaged(__exception);
        }
        finally
        {
            // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
            __type_native__marshaller.Free();
        }
    
        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.IXCLRDataTypeDefinition.EndEnumFields(ulong handle)
    {
        var(__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition));
        var __target = ((delegate* unmanaged[MemberFunction]<void*, ulong, int> )__vtable[25]);
        {
            int __retVal;
            {
                __retVal = __target(__this, handle);
            }
    
            // 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_EndEnumFields(global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native, ulong handle)
    {
        global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition @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.IXCLRDataTypeDefinition>(__this_native);
            __retVal = @this.EndEnumFields(handle);
        }
        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.IXCLRDataTypeDefinition.StartEnumFieldsByName(char* name, uint nameFlags, uint fieldFlags, ulong* handle)
    {
        var(__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition));
        var __target = ((delegate* unmanaged[MemberFunction]<void*, char*, uint, uint, ulong*, int> )__vtable[26]);
        {
            int __retVal;
            {
                __retVal = __target(__this, name, nameFlags, fieldFlags, handle);
            }
    
            // 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_StartEnumFieldsByName(global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native, char* name, uint nameFlags, uint fieldFlags, ulong* handle)
    {
        global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition @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.IXCLRDataTypeDefinition>(__this_native);
            __retVal = @this.StartEnumFieldsByName(name, nameFlags, fieldFlags, handle);
        }
        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.IXCLRDataTypeDefinition.EnumFieldByName(ulong* handle, global::Microsoft.Diagnostics.DataContractReader.Legacy.DacComNullableByRef<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition> type, uint* flags, uint* token)
    {
        var(__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition));
        var __target = ((delegate* unmanaged[MemberFunction]<void*, ulong*, void**, uint*, uint*, int> )__vtable[27]);
        {
            void** __type_native = default;
            int __retVal = default;
            // Setup - Perform required setup.
            global::Microsoft.Diagnostics.DataContractReader.Legacy.DacComNullableByRefMarshaller<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition>.ManagedToUnmanaged __type_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __type_native__marshaller.FromManaged(type);
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __type_native = __type_native__marshaller.ToUnmanaged();
                    __retVal = __target(__this, handle, __type_native, flags, token);
                }
    
                // NotifyForSuccessfulInvoke - Keep alive any managed objects that need to stay alive across the call.
                __type_native__marshaller.OnInvoked();
                global::System.GC.KeepAlive(this);
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __type_native__marshaller.Free();
            }
    
            return __retVal;
        }
    }

    [global::System.Runtime.InteropServices.UnmanagedCallersOnlyAttribute(CallConvs = new[] { typeof(global::System.Runtime.CompilerServices.CallConvMemberFunction) })]
    internal static int ABI_EnumFieldByName(global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native, ulong* handle, void** __type_native, uint* flags, uint* token)
    {
        global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition @this = default;
        global::Microsoft.Diagnostics.DataContractReader.Legacy.DacComNullableByRef<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition> type = default;
        int __retVal = default;
        // Setup - Perform required setup.
        global::Microsoft.Diagnostics.DataContractReader.Legacy.DacComNullableByRefMarshaller<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition>.UnmanagedToManaged __type_native__marshaller = new();
        try
        {
            // UnmarshalCapture - Capture the native data into marshaller instances in case conversion to managed data throws an exception.
            __type_native__marshaller.FromUnmanaged(__type_native);
            // Unmarshal - Convert native data to managed data.
            type = __type_native__marshaller.ToManaged();
            @this = global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch.GetInstance<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition>(__this_native);
            __retVal = @this.EnumFieldByName(handle, type, flags, token);
        }
        catch (global::System.Exception __exception)
        {
            __retVal = global::System.Runtime.InteropServices.Marshalling.ExceptionAsHResultMarshaller<int>.ConvertToUnmanaged(__exception);
        }
        finally
        {
            // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
            __type_native__marshaller.Free();
        }
    
        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.IXCLRDataTypeDefinition.EndEnumFieldsByName(ulong handle)
    {
        var(__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition));
        var __target = ((delegate* unmanaged[MemberFunction]<void*, ulong, int> )__vtable[28]);
        {
            int __retVal;
            {
                __retVal = __target(__this, handle);
            }
    
            // 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_EndEnumFieldsByName(global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native, ulong handle)
    {
        global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition @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.IXCLRDataTypeDefinition>(__this_native);
            __retVal = @this.EndEnumFieldsByName(handle);
        }
        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.IXCLRDataTypeDefinition.GetFieldByToken(uint token, uint nameBufLen, uint* nameLen, char* nameBuf, global::Microsoft.Diagnostics.DataContractReader.Legacy.DacComNullableByRef<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition> type, uint* flags)
    {
        var(__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition));
        var __target = ((delegate* unmanaged[MemberFunction]<void*, uint, uint, uint*, char*, void**, uint*, int> )__vtable[29]);
        {
            void** __type_native = default;
            int __retVal = default;
            // Setup - Perform required setup.
            global::Microsoft.Diagnostics.DataContractReader.Legacy.DacComNullableByRefMarshaller<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition>.ManagedToUnmanaged __type_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __type_native__marshaller.FromManaged(type);
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __type_native = __type_native__marshaller.ToUnmanaged();
                    __retVal = __target(__this, token, nameBufLen, nameLen, nameBuf, __type_native, flags);
                }
    
                // NotifyForSuccessfulInvoke - Keep alive any managed objects that need to stay alive across the call.
                __type_native__marshaller.OnInvoked();
                global::System.GC.KeepAlive(this);
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __type_native__marshaller.Free();
            }
    
            return __retVal;
        }
    }

    [global::System.Runtime.InteropServices.UnmanagedCallersOnlyAttribute(CallConvs = new[] { typeof(global::System.Runtime.CompilerServices.CallConvMemberFunction) })]
    internal static int ABI_GetFieldByToken(global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native, uint token, uint nameBufLen, uint* nameLen, char* nameBuf, void** __type_native, uint* flags)
    {
        global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition @this = default;
        global::Microsoft.Diagnostics.DataContractReader.Legacy.DacComNullableByRef<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition> type = default;
        int __retVal = default;
        // Setup - Perform required setup.
        global::Microsoft.Diagnostics.DataContractReader.Legacy.DacComNullableByRefMarshaller<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition>.UnmanagedToManaged __type_native__marshaller = new();
        try
        {
            // UnmarshalCapture - Capture the native data into marshaller instances in case conversion to managed data throws an exception.
            __type_native__marshaller.FromUnmanaged(__type_native);
            // Unmarshal - Convert native data to managed data.
            type = __type_native__marshaller.ToManaged();
            @this = global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch.GetInstance<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition>(__this_native);
            __retVal = @this.GetFieldByToken(token, nameBufLen, nameLen, nameBuf, type, flags);
        }
        catch (global::System.Exception __exception)
        {
            __retVal = global::System.Runtime.InteropServices.Marshalling.ExceptionAsHResultMarshaller<int>.ConvertToUnmanaged(__exception);
        }
        finally
        {
            // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
            __type_native__marshaller.Free();
        }
    
        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.IXCLRDataTypeDefinition.GetTypeNotification(uint* flags)
    {
        var(__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition));
        var __target = ((delegate* unmanaged[MemberFunction]<void*, uint*, int> )__vtable[30]);
        {
            int __retVal;
            {
                __retVal = __target(__this, flags);
            }
    
            // 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_GetTypeNotification(global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native, uint* flags)
    {
        global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition @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.IXCLRDataTypeDefinition>(__this_native);
            __retVal = @this.GetTypeNotification(flags);
        }
        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.IXCLRDataTypeDefinition.SetTypeNotification(uint flags)
    {
        var(__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition));
        var __target = ((delegate* unmanaged[MemberFunction]<void*, uint, int> )__vtable[31]);
        {
            int __retVal;
            {
                __retVal = __target(__this, flags);
            }
    
            // 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_SetTypeNotification(global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native, uint flags)
    {
        global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition @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.IXCLRDataTypeDefinition>(__this_native);
            __retVal = @this.SetTypeNotification(flags);
        }
        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.IXCLRDataTypeDefinition.EnumField2(ulong* handle, uint nameBufLen, uint* nameLen, char* nameBuf, global::Microsoft.Diagnostics.DataContractReader.Legacy.DacComNullableByRef<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition> type, uint* flags, global::Microsoft.Diagnostics.DataContractReader.Legacy.DacComNullableByRef<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataModule> tokenScope, uint* token)
    {
        var(__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition));
        var __target = ((delegate* unmanaged[MemberFunction]<void*, ulong*, uint, uint*, char*, void**, uint*, void**, uint*, int> )__vtable[32]);
        {
            void** __type_native = default;
            void** __tokenScope_native = default;
            int __retVal = default;
            // Setup - Perform required setup.
            global::Microsoft.Diagnostics.DataContractReader.Legacy.DacComNullableByRefMarshaller<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataModule>.ManagedToUnmanaged __tokenScope_native__marshaller = new();
            global::Microsoft.Diagnostics.DataContractReader.Legacy.DacComNullableByRefMarshaller<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition>.ManagedToUnmanaged __type_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __tokenScope_native__marshaller.FromManaged(tokenScope);
                __type_native__marshaller.FromManaged(type);
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __tokenScope_native = __tokenScope_native__marshaller.ToUnmanaged();
                    __type_native = __type_native__marshaller.ToUnmanaged();
                    __retVal = __target(__this, handle, nameBufLen, nameLen, nameBuf, __type_native, flags, __tokenScope_native, token);
                }
    
                // NotifyForSuccessfulInvoke - Keep alive any managed objects that need to stay alive across the call.
                __tokenScope_native__marshaller.OnInvoked();
                __type_native__marshaller.OnInvoked();
                global::System.GC.KeepAlive(this);
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __tokenScope_native__marshaller.Free();
                __type_native__marshaller.Free();
            }
    
            return __retVal;
        }
    }

    [global::System.Runtime.InteropServices.UnmanagedCallersOnlyAttribute(CallConvs = new[] { typeof(global::System.Runtime.CompilerServices.CallConvMemberFunction) })]
    internal static int ABI_EnumField2(global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native, ulong* handle, uint nameBufLen, uint* nameLen, char* nameBuf, void** __type_native, uint* flags, void** __tokenScope_native, uint* token)
    {
        global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition @this = default;
        global::Microsoft.Diagnostics.DataContractReader.Legacy.DacComNullableByRef<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition> type = default;
        global::Microsoft.Diagnostics.DataContractReader.Legacy.DacComNullableByRef<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataModule> tokenScope = default;
        int __retVal = default;
        // Setup - Perform required setup.
        global::Microsoft.Diagnostics.DataContractReader.Legacy.DacComNullableByRefMarshaller<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataModule>.UnmanagedToManaged __tokenScope_native__marshaller = new();
        global::Microsoft.Diagnostics.DataContractReader.Legacy.DacComNullableByRefMarshaller<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition>.UnmanagedToManaged __type_native__marshaller = new();
        try
        {
            // UnmarshalCapture - Capture the native data into marshaller instances in case conversion to managed data throws an exception.
            __tokenScope_native__marshaller.FromUnmanaged(__tokenScope_native);
            __type_native__marshaller.FromUnmanaged(__type_native);
            // Unmarshal - Convert native data to managed data.
            tokenScope = __tokenScope_native__marshaller.ToManaged();
            type = __type_native__marshaller.ToManaged();
            @this = global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch.GetInstance<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition>(__this_native);
            __retVal = @this.EnumField2(handle, nameBufLen, nameLen, nameBuf, type, flags, tokenScope, token);
        }
        catch (global::System.Exception __exception)
        {
            __retVal = global::System.Runtime.InteropServices.Marshalling.ExceptionAsHResultMarshaller<int>.ConvertToUnmanaged(__exception);
        }
        finally
        {
            // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
            __tokenScope_native__marshaller.Free();
            __type_native__marshaller.Free();
        }
    
        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.IXCLRDataTypeDefinition.EnumFieldByName2(ulong* handle, global::Microsoft.Diagnostics.DataContractReader.Legacy.DacComNullableByRef<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition> type, uint* flags, global::Microsoft.Diagnostics.DataContractReader.Legacy.DacComNullableByRef<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataModule> tokenScope, uint* token)
    {
        var(__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition));
        var __target = ((delegate* unmanaged[MemberFunction]<void*, ulong*, void**, uint*, void**, uint*, int> )__vtable[33]);
        {
            void** __type_native = default;
            void** __tokenScope_native = default;
            int __retVal = default;
            // Setup - Perform required setup.
            global::Microsoft.Diagnostics.DataContractReader.Legacy.DacComNullableByRefMarshaller<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataModule>.ManagedToUnmanaged __tokenScope_native__marshaller = new();
            global::Microsoft.Diagnostics.DataContractReader.Legacy.DacComNullableByRefMarshaller<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition>.ManagedToUnmanaged __type_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __tokenScope_native__marshaller.FromManaged(tokenScope);
                __type_native__marshaller.FromManaged(type);
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __tokenScope_native = __tokenScope_native__marshaller.ToUnmanaged();
                    __type_native = __type_native__marshaller.ToUnmanaged();
                    __retVal = __target(__this, handle, __type_native, flags, __tokenScope_native, token);
                }
    
                // NotifyForSuccessfulInvoke - Keep alive any managed objects that need to stay alive across the call.
                __tokenScope_native__marshaller.OnInvoked();
                __type_native__marshaller.OnInvoked();
                global::System.GC.KeepAlive(this);
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __tokenScope_native__marshaller.Free();
                __type_native__marshaller.Free();
            }
    
            return __retVal;
        }
    }

    [global::System.Runtime.InteropServices.UnmanagedCallersOnlyAttribute(CallConvs = new[] { typeof(global::System.Runtime.CompilerServices.CallConvMemberFunction) })]
    internal static int ABI_EnumFieldByName2(global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native, ulong* handle, void** __type_native, uint* flags, void** __tokenScope_native, uint* token)
    {
        global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition @this = default;
        global::Microsoft.Diagnostics.DataContractReader.Legacy.DacComNullableByRef<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition> type = default;
        global::Microsoft.Diagnostics.DataContractReader.Legacy.DacComNullableByRef<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataModule> tokenScope = default;
        int __retVal = default;
        // Setup - Perform required setup.
        global::Microsoft.Diagnostics.DataContractReader.Legacy.DacComNullableByRefMarshaller<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataModule>.UnmanagedToManaged __tokenScope_native__marshaller = new();
        global::Microsoft.Diagnostics.DataContractReader.Legacy.DacComNullableByRefMarshaller<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition>.UnmanagedToManaged __type_native__marshaller = new();
        try
        {
            // UnmarshalCapture - Capture the native data into marshaller instances in case conversion to managed data throws an exception.
            __tokenScope_native__marshaller.FromUnmanaged(__tokenScope_native);
            __type_native__marshaller.FromUnmanaged(__type_native);
            // Unmarshal - Convert native data to managed data.
            tokenScope = __tokenScope_native__marshaller.ToManaged();
            type = __type_native__marshaller.ToManaged();
            @this = global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch.GetInstance<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition>(__this_native);
            __retVal = @this.EnumFieldByName2(handle, type, flags, tokenScope, token);
        }
        catch (global::System.Exception __exception)
        {
            __retVal = global::System.Runtime.InteropServices.Marshalling.ExceptionAsHResultMarshaller<int>.ConvertToUnmanaged(__exception);
        }
        finally
        {
            // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
            __tokenScope_native__marshaller.Free();
            __type_native__marshaller.Free();
        }
    
        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.IXCLRDataTypeDefinition.GetFieldByToken2(global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataModule tokenScope, uint token, uint nameBufLen, uint* nameLen, char* nameBuf, global::Microsoft.Diagnostics.DataContractReader.Legacy.DacComNullableByRef<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition> type, uint* flags)
    {
        var(__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition));
        var __target = ((delegate* unmanaged[MemberFunction]<void*, void*, uint, uint, uint*, char*, void**, uint*, int> )__vtable[34]);
        {
            void* __tokenScope_native = default;
            void** __type_native = default;
            int __retVal = default;
            // Setup - Perform required setup.
            global::Microsoft.Diagnostics.DataContractReader.Legacy.DacComNullableByRefMarshaller<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition>.ManagedToUnmanaged __type_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __type_native__marshaller.FromManaged(type);
                __tokenScope_native = (void*)global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataModule>.ConvertToUnmanaged(tokenScope);
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __type_native = __type_native__marshaller.ToUnmanaged();
                    __retVal = __target(__this, __tokenScope_native, token, nameBufLen, nameLen, nameBuf, __type_native, flags);
                }
    
                // NotifyForSuccessfulInvoke - Keep alive any managed objects that need to stay alive across the call.
                __type_native__marshaller.OnInvoked();
                global::System.GC.KeepAlive(this);
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __type_native__marshaller.Free();
                global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataModule>.Free(__tokenScope_native);
            }
    
            return __retVal;
        }
    }

    [global::System.Runtime.InteropServices.UnmanagedCallersOnlyAttribute(CallConvs = new[] { typeof(global::System.Runtime.CompilerServices.CallConvMemberFunction) })]
    internal static int ABI_GetFieldByToken2(global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native, void* __tokenScope_native, uint token, uint nameBufLen, uint* nameLen, char* nameBuf, void** __type_native, uint* flags)
    {
        global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition @this = default;
        global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataModule tokenScope = default;
        global::Microsoft.Diagnostics.DataContractReader.Legacy.DacComNullableByRef<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition> type = default;
        int __retVal = default;
        // Setup - Perform required setup.
        global::Microsoft.Diagnostics.DataContractReader.Legacy.DacComNullableByRefMarshaller<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition>.UnmanagedToManaged __type_native__marshaller = new();
        try
        {
            // UnmarshalCapture - Capture the native data into marshaller instances in case conversion to managed data throws an exception.
            __type_native__marshaller.FromUnmanaged(__type_native);
            // Unmarshal - Convert native data to managed data.
            type = __type_native__marshaller.ToManaged();
            tokenScope = global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataModule>.ConvertToManaged(__tokenScope_native);
            @this = global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch.GetInstance<global::Microsoft.Diagnostics.DataContractReader.Legacy.IXCLRDataTypeDefinition>(__this_native);
            __retVal = @this.GetFieldByToken2(tokenScope, token, nameBufLen, nameLen, nameBuf, type, flags);
        }
        catch (global::System.Exception __exception)
        {
            __retVal = global::System.Runtime.InteropServices.Marshalling.ExceptionAsHResultMarshaller<int>.ConvertToUnmanaged(__exception);
        }
        finally
        {
            // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
            __type_native__marshaller.Free();
        }
    
        return __retVal;
    }
}

namespace Microsoft.Diagnostics.DataContractReader.Legacy
{
    [global::System.Runtime.InteropServices.Marshalling.IUnknownDerivedAttribute<InterfaceInformation, InterfaceImplementation>]
    public unsafe partial interface IXCLRDataTypeDefinition
    {
    }
}