File: Generated\361d1da7f942c932\System.Transactions.DtcProxyShim.DtcInterfaces.ITmNodeName.cs
Project: System.Transactions.Local.csproj (System.Transactions.Local)
// <auto-generated />
#pragma warning disable CS0612, CS0618, CS0649, CS1591

[global::System.Runtime.InteropServices.StructLayoutAttribute(global::System.Runtime.InteropServices.LayoutKind.Sequential)]
file struct InterfaceImplementationVtable
{
    public unsafe delegate* unmanaged[MemberFunction]<void*, global::System.Guid*, void**, int> QueryInterface_0;
    public unsafe delegate* unmanaged[MemberFunction]<void*, uint> AddRef_1;
    public unsafe delegate* unmanaged[MemberFunction]<void*, uint> Release_2;
    public unsafe delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, uint*, int> GetNodeNameSize_3;
    public unsafe delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, uint, ushort**, int> GetNodeName_4;
}

file sealed class InterfaceInformation : global::System.Runtime.InteropServices.Marshalling.IIUnknownInterfaceType
{
    public static global::System.Guid Iid { get; } = new([136, 79, 39, 48, 228, 110, 78, 71, 155, 149, 120, 7, 188, 158, 248, 207]);
    public static unsafe void** ManagedVirtualMethodTable
    {
        get
        {
            unsafe
            {
                return (void**)global::System.Runtime.CompilerServices.Unsafe.AsPointer(in InterfaceImplementation.Vtable);
            }
        }
    }
}

[global::System.Runtime.InteropServices.DynamicInterfaceCastableImplementationAttribute]
file unsafe interface InterfaceImplementation : global::System.Transactions.DtcProxyShim.DtcInterfaces.ITmNodeName
{
    [global::System.Runtime.CompilerServices.FixedAddressValueTypeAttribute]
    public static readonly InterfaceImplementationVtable Vtable;

    static InterfaceImplementation()
    {
        unsafe
        {
            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.GetNodeNameSize_3 = &ABI_GetNodeNameSize;
            Vtable.GetNodeName_4 = &ABI_GetNodeName;
        }
    }

    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.ComInterfaceGenerator", "12.0.14.46520")]
    void global::System.Transactions.DtcProxyShim.DtcInterfaces.ITmNodeName.GetNodeNameSize(out uint pcbNodeNameSize)
    {
        unsafe
        {
            var(__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::System.Transactions.DtcProxyShim.DtcInterfaces.ITmNodeName));
            var __target = ((delegate* unmanaged[MemberFunction]<void*, uint*, int> )__vtable[3]);
            {
                pcbNodeNameSize = default;
                int __invokeRetVal;
                // Pin - Pin data in preparation for calling the P/Invoke.
                fixed (uint* __pcbNodeNameSize_native = &pcbNodeNameSize)
                {
                    __invokeRetVal = __target(__this, __pcbNodeNameSize_native);
                }
    
                // NotifyForSuccessfulInvoke - Keep alive any managed objects that need to stay alive across the call.
                global::System.GC.KeepAlive(this);
                // Unmarshal - Convert native data to managed data.
                global::System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(__invokeRetVal, new([136, 79, 39, 48, 228, 110, 78, 71, 155, 149, 120, 7, 188, 158, 248, 207]), (global::System.IntPtr)__this);
            }
        }
    }

    [global::System.Runtime.InteropServices.UnmanagedCallersOnlyAttribute(CallConvs = new[] { typeof(global::System.Runtime.CompilerServices.CallConvMemberFunction) })]
    internal static unsafe int ABI_GetNodeNameSize(global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native, uint* __pcbNodeNameSize_native__param)
    {
        unsafe
        {
            global::System.Transactions.DtcProxyShim.DtcInterfaces.ITmNodeName @this = default;
            ref uint __pcbNodeNameSize_native = ref *__pcbNodeNameSize_native__param;
            uint pcbNodeNameSize = default;
            int __retVal = default;
            try
            {
                // Unmarshal - Convert native data to managed data.
                __retVal = 0; // S_OK
                @this = global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch.GetInstance<global::System.Transactions.DtcProxyShim.DtcInterfaces.ITmNodeName>(__this_native);
                @this.GetNodeNameSize(out pcbNodeNameSize);
                // Marshal - Convert managed data to native data.
                __pcbNodeNameSize_native = pcbNodeNameSize;
            }
            catch (global::System.Exception __exception)
            {
                __retVal = global::System.Runtime.InteropServices.Marshalling.ExceptionAsHResultMarshaller<int>.ConvertToUnmanaged(__exception);
            }
    
            return __retVal;
        }
    }

    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.ComInterfaceGenerator", "12.0.14.46520")]
    void global::System.Transactions.DtcProxyShim.DtcInterfaces.ITmNodeName.GetNodeName(uint cbNodeNameBufferSize, out string pcbNodeSize)
    {
        unsafe
        {
            var(__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::System.Transactions.DtcProxyShim.DtcInterfaces.ITmNodeName));
            var __target = ((delegate* unmanaged[MemberFunction]<void*, uint, ushort**, int> )__vtable[4]);
            {
                bool __invokeSucceeded = default;
                pcbNodeSize = default;
                ushort* __pcbNodeSize_native = default;
                int __invokeRetVal = default;
                try
                {
                    {
                        __invokeRetVal = __target(__this, cbNodeNameBufferSize, &__pcbNodeSize_native);
                    }
    
                    // NotifyForSuccessfulInvoke - Keep alive any managed objects that need to stay alive across the call.
                    global::System.GC.KeepAlive(this);
                    // Unmarshal - Convert native data to managed data.
                    global::System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(__invokeRetVal, new([136, 79, 39, 48, 228, 110, 78, 71, 155, 149, 120, 7, 188, 158, 248, 207]), (global::System.IntPtr)__this);
                    __invokeSucceeded = true;
                    // Unmarshal - Convert native data to managed data.
                    pcbNodeSize = global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.ConvertToManaged(__pcbNodeSize_native);
                }
                finally
                {
                    if (__invokeSucceeded)
                    {
                        // CleanupCalleeAllocated - Perform cleanup of callee allocated resources.
                        global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.Free(__pcbNodeSize_native);
                    }
                }
            }
        }
    }

    [global::System.Runtime.InteropServices.UnmanagedCallersOnlyAttribute(CallConvs = new[] { typeof(global::System.Runtime.CompilerServices.CallConvMemberFunction) })]
    internal static unsafe int ABI_GetNodeName(global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native, uint cbNodeNameBufferSize, ushort** __pcbNodeSize_native__param)
    {
        unsafe
        {
            global::System.Transactions.DtcProxyShim.DtcInterfaces.ITmNodeName @this = default;
            ref ushort* __pcbNodeSize_native = ref *__pcbNodeSize_native__param;
            string pcbNodeSize = default;
            int __retVal = default;
            try
            {
                // Unmarshal - Convert native data to managed data.
                __retVal = 0; // S_OK
                @this = global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch.GetInstance<global::System.Transactions.DtcProxyShim.DtcInterfaces.ITmNodeName>(__this_native);
                @this.GetNodeName(cbNodeNameBufferSize, out pcbNodeSize);
                // Marshal - Convert managed data to native data.
                __pcbNodeSize_native = (ushort*)global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.ConvertToUnmanaged(pcbNodeSize);
            }
            catch (global::System.Exception __exception)
            {
                __retVal = global::System.Runtime.InteropServices.Marshalling.ExceptionAsHResultMarshaller<int>.ConvertToUnmanaged(__exception);
            }
    
            return __retVal;
        }
    }
}

namespace System.Transactions.DtcProxyShim.DtcInterfaces
{
    [global::System.Runtime.InteropServices.Marshalling.IUnknownDerivedAttribute<InterfaceInformation, InterfaceImplementation>]
    internal unsafe partial interface ITmNodeName
    {
    }
}