File: _generated\28\System.Transactions.DtcProxyShim.DtcInterfaces.ITransactionVoterFactory2.cs
Web Access
Project: src\src\runtime\src\libraries\System.Transactions.Local\src\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 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*, void*, void**, int> Create_3;
}

file unsafe sealed class InterfaceInformation : global::System.Runtime.InteropServices.Marshalling.IIUnknownInterfaceType
{
    public static global::System.Guid Iid { get; } = new([106, 55, 51, 84, 77, 65, 211, 17, 178, 6, 0, 192, 79, 194, 243, 239]);
    public static void** ManagedVirtualMethodTable => (void**)global::System.Runtime.CompilerServices.Unsafe.AsPointer(in InterfaceImplementation.Vtable);
}

[global::System.Runtime.InteropServices.DynamicInterfaceCastableImplementationAttribute]
file unsafe interface InterfaceImplementation : global::System.Transactions.DtcProxyShim.DtcInterfaces.ITransactionVoterFactory2
{
    [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.Create_3 = &ABI_Create;
    }

    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.ComInterfaceGenerator", "11.0.14.26904")]
    void global::System.Transactions.DtcProxyShim.DtcInterfaces.ITransactionVoterFactory2.Create(global::System.Transactions.DtcProxyShim.DtcInterfaces.ITransaction pITransaction, global::System.Transactions.DtcProxyShim.DtcInterfaces.ITransactionVoterNotifyAsync2 pVoterNotify, out global::System.Transactions.DtcProxyShim.DtcInterfaces.ITransactionVoterBallotAsync2 ppVoterBallot)
    {
        var(__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::System.Transactions.DtcProxyShim.DtcInterfaces.ITransactionVoterFactory2));
        var __target = ((delegate* unmanaged[MemberFunction]<void*, void*, void*, void**, int> )__vtable[3]);
        {
            bool __invokeSucceeded = default;
            ppVoterBallot = default;
            void* __pITransaction_native = default;
            void* __pVoterNotify_native = default;
            void* __ppVoterBallot_native = default;
            int __invokeRetVal = default;
            try
            {
                // Marshal - Convert managed data to native data.
                __pVoterNotify_native = (void*)global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::System.Transactions.DtcProxyShim.DtcInterfaces.ITransactionVoterNotifyAsync2>.ConvertToUnmanaged(pVoterNotify);
                __pITransaction_native = (void*)global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::System.Transactions.DtcProxyShim.DtcInterfaces.ITransaction>.ConvertToUnmanaged(pITransaction);
                {
                    __invokeRetVal = __target(__this, __pITransaction_native, __pVoterNotify_native, &__ppVoterBallot_native);
                }
    
                // NotifyForSuccessfulInvoke - Keep alive any managed objects that need to stay alive across the call.
                global::System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(__invokeRetVal, new([106, 55, 51, 84, 77, 65, 211, 17, 178, 6, 0, 192, 79, 194, 243, 239]), (global::System.IntPtr)__this);
                global::System.GC.KeepAlive(this);
                __invokeSucceeded = true;
                // Unmarshal - Convert native data to managed data.
                ppVoterBallot = global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::System.Transactions.DtcProxyShim.DtcInterfaces.ITransactionVoterBallotAsync2>.ConvertToManaged(__ppVoterBallot_native);
            }
            finally
            {
                if (__invokeSucceeded)
                {
                    // CleanupCalleeAllocated - Perform cleanup of callee allocated resources.
                    global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::System.Transactions.DtcProxyShim.DtcInterfaces.ITransactionVoterBallotAsync2>.Free(__ppVoterBallot_native);
                }
    
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::System.Transactions.DtcProxyShim.DtcInterfaces.ITransactionVoterNotifyAsync2>.Free(__pVoterNotify_native);
                global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::System.Transactions.DtcProxyShim.DtcInterfaces.ITransaction>.Free(__pITransaction_native);
            }
        }
    }

    [global::System.Runtime.InteropServices.UnmanagedCallersOnlyAttribute(CallConvs = new[] { typeof(global::System.Runtime.CompilerServices.CallConvMemberFunction) })]
    internal static int ABI_Create(global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native, void* __pITransaction_native, void* __pVoterNotify_native, void** __ppVoterBallot_native__param)
    {
        global::System.Transactions.DtcProxyShim.DtcInterfaces.ITransactionVoterFactory2 @this = default;
        global::System.Transactions.DtcProxyShim.DtcInterfaces.ITransaction pITransaction = default;
        global::System.Transactions.DtcProxyShim.DtcInterfaces.ITransactionVoterNotifyAsync2 pVoterNotify = default;
        ref void* __ppVoterBallot_native = ref *__ppVoterBallot_native__param;
        global::System.Transactions.DtcProxyShim.DtcInterfaces.ITransactionVoterBallotAsync2 ppVoterBallot = default;
        int __retVal = default;
        try
        {
            // Unmarshal - Convert native data to managed data.
            pVoterNotify = global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::System.Transactions.DtcProxyShim.DtcInterfaces.ITransactionVoterNotifyAsync2>.ConvertToManaged(__pVoterNotify_native);
            pITransaction = global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::System.Transactions.DtcProxyShim.DtcInterfaces.ITransaction>.ConvertToManaged(__pITransaction_native);
            @this = global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch.GetInstance<global::System.Transactions.DtcProxyShim.DtcInterfaces.ITransactionVoterFactory2>(__this_native);
            @this.Create(pITransaction, pVoterNotify, out ppVoterBallot);
            // NotifyForSuccessfulInvoke - Keep alive any managed objects that need to stay alive across the call.
            __retVal = 0; // S_OK
            // Marshal - Convert managed data to native data.
            __ppVoterBallot_native = (void*)global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::System.Transactions.DtcProxyShim.DtcInterfaces.ITransactionVoterBallotAsync2>.ConvertToUnmanaged(ppVoterBallot);
        }
        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 ITransactionVoterFactory2
    {
    }
}