File: Generated\361d1da7f942c932\System.Transactions.DtcProxyShim.DtcInterfaces.ITransactionPhase0EnlistmentAsync.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*, int> Enable_3;
    public unsafe delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, int> WaitForEnlistment_4;
    public unsafe delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, int> Phase0Done_5;
    public unsafe delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, int> Unenlist_6;
    public unsafe delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, void**, int> GetTransaction_7;
}

file sealed class InterfaceInformation : global::System.Runtime.InteropServices.Marshalling.IIUnknownInterfaceType
{
    public static global::System.Guid Iid { get; } = new([225, 136, 220, 130, 84, 169, 209, 17, 143, 136, 0, 96, 8, 149, 231, 213]);
    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.ITransactionPhase0EnlistmentAsync
{
    [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.Enable_3 = &ABI_Enable;
            Vtable.WaitForEnlistment_4 = &ABI_WaitForEnlistment;
            Vtable.Phase0Done_5 = &ABI_Phase0Done;
            Vtable.Unenlist_6 = &ABI_Unenlist;
            Vtable.GetTransaction_7 = &ABI_GetTransaction;
        }
    }

    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.ComInterfaceGenerator", "12.0.14.46520")]
    void global::System.Transactions.DtcProxyShim.DtcInterfaces.ITransactionPhase0EnlistmentAsync.Enable()
    {
        unsafe
        {
            var(__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::System.Transactions.DtcProxyShim.DtcInterfaces.ITransactionPhase0EnlistmentAsync));
            var __target = ((delegate* unmanaged[MemberFunction]<void*, int> )__vtable[3]);
            {
                int __invokeRetVal;
                {
                    __invokeRetVal = __target(__this);
                }
    
                // 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([225, 136, 220, 130, 84, 169, 209, 17, 143, 136, 0, 96, 8, 149, 231, 213]), (global::System.IntPtr)__this);
            }
        }
    }

    [global::System.Runtime.InteropServices.UnmanagedCallersOnlyAttribute(CallConvs = new[] { typeof(global::System.Runtime.CompilerServices.CallConvMemberFunction) })]
    internal static unsafe int ABI_Enable(global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native)
    {
        unsafe
        {
            global::System.Transactions.DtcProxyShim.DtcInterfaces.ITransactionPhase0EnlistmentAsync @this = 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.ITransactionPhase0EnlistmentAsync>(__this_native);
                @this.Enable();
            }
            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.ITransactionPhase0EnlistmentAsync.WaitForEnlistment()
    {
        unsafe
        {
            var(__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::System.Transactions.DtcProxyShim.DtcInterfaces.ITransactionPhase0EnlistmentAsync));
            var __target = ((delegate* unmanaged[MemberFunction]<void*, int> )__vtable[4]);
            {
                int __invokeRetVal;
                {
                    __invokeRetVal = __target(__this);
                }
    
                // 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([225, 136, 220, 130, 84, 169, 209, 17, 143, 136, 0, 96, 8, 149, 231, 213]), (global::System.IntPtr)__this);
            }
        }
    }

    [global::System.Runtime.InteropServices.UnmanagedCallersOnlyAttribute(CallConvs = new[] { typeof(global::System.Runtime.CompilerServices.CallConvMemberFunction) })]
    internal static unsafe int ABI_WaitForEnlistment(global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native)
    {
        unsafe
        {
            global::System.Transactions.DtcProxyShim.DtcInterfaces.ITransactionPhase0EnlistmentAsync @this = 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.ITransactionPhase0EnlistmentAsync>(__this_native);
                @this.WaitForEnlistment();
            }
            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.ITransactionPhase0EnlistmentAsync.Phase0Done()
    {
        unsafe
        {
            var(__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::System.Transactions.DtcProxyShim.DtcInterfaces.ITransactionPhase0EnlistmentAsync));
            var __target = ((delegate* unmanaged[MemberFunction]<void*, int> )__vtable[5]);
            {
                int __invokeRetVal;
                {
                    __invokeRetVal = __target(__this);
                }
    
                // 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([225, 136, 220, 130, 84, 169, 209, 17, 143, 136, 0, 96, 8, 149, 231, 213]), (global::System.IntPtr)__this);
            }
        }
    }

    [global::System.Runtime.InteropServices.UnmanagedCallersOnlyAttribute(CallConvs = new[] { typeof(global::System.Runtime.CompilerServices.CallConvMemberFunction) })]
    internal static unsafe int ABI_Phase0Done(global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native)
    {
        unsafe
        {
            global::System.Transactions.DtcProxyShim.DtcInterfaces.ITransactionPhase0EnlistmentAsync @this = 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.ITransactionPhase0EnlistmentAsync>(__this_native);
                @this.Phase0Done();
            }
            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.ITransactionPhase0EnlistmentAsync.Unenlist()
    {
        unsafe
        {
            var(__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::System.Transactions.DtcProxyShim.DtcInterfaces.ITransactionPhase0EnlistmentAsync));
            var __target = ((delegate* unmanaged[MemberFunction]<void*, int> )__vtable[6]);
            {
                int __invokeRetVal;
                {
                    __invokeRetVal = __target(__this);
                }
    
                // 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([225, 136, 220, 130, 84, 169, 209, 17, 143, 136, 0, 96, 8, 149, 231, 213]), (global::System.IntPtr)__this);
            }
        }
    }

    [global::System.Runtime.InteropServices.UnmanagedCallersOnlyAttribute(CallConvs = new[] { typeof(global::System.Runtime.CompilerServices.CallConvMemberFunction) })]
    internal static unsafe int ABI_Unenlist(global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native)
    {
        unsafe
        {
            global::System.Transactions.DtcProxyShim.DtcInterfaces.ITransactionPhase0EnlistmentAsync @this = 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.ITransactionPhase0EnlistmentAsync>(__this_native);
                @this.Unenlist();
            }
            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.ITransactionPhase0EnlistmentAsync.GetTransaction(out global::System.Transactions.DtcProxyShim.DtcInterfaces.ITransaction ppITransaction)
    {
        unsafe
        {
            var(__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::System.Transactions.DtcProxyShim.DtcInterfaces.ITransactionPhase0EnlistmentAsync));
            var __target = ((delegate* unmanaged[MemberFunction]<void*, void**, int> )__vtable[7]);
            {
                bool __invokeSucceeded = default;
                ppITransaction = default;
                void* __ppITransaction_native = default;
                int __invokeRetVal = default;
                try
                {
                    {
                        __invokeRetVal = __target(__this, &__ppITransaction_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([225, 136, 220, 130, 84, 169, 209, 17, 143, 136, 0, 96, 8, 149, 231, 213]), (global::System.IntPtr)__this);
                    __invokeSucceeded = true;
                    // Unmarshal - Convert native data to managed data.
                    ppITransaction = global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::System.Transactions.DtcProxyShim.DtcInterfaces.ITransaction>.ConvertToManaged(__ppITransaction_native);
                }
                finally
                {
                    if (__invokeSucceeded)
                    {
                        // CleanupCalleeAllocated - Perform cleanup of callee allocated resources.
                        global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::System.Transactions.DtcProxyShim.DtcInterfaces.ITransaction>.Free(__ppITransaction_native);
                    }
                }
            }
        }
    }

    [global::System.Runtime.InteropServices.UnmanagedCallersOnlyAttribute(CallConvs = new[] { typeof(global::System.Runtime.CompilerServices.CallConvMemberFunction) })]
    internal static unsafe int ABI_GetTransaction(global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native, void** __ppITransaction_native__param)
    {
        unsafe
        {
            global::System.Transactions.DtcProxyShim.DtcInterfaces.ITransactionPhase0EnlistmentAsync @this = default;
            ref void* __ppITransaction_native = ref *__ppITransaction_native__param;
            global::System.Transactions.DtcProxyShim.DtcInterfaces.ITransaction ppITransaction = 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.ITransactionPhase0EnlistmentAsync>(__this_native);
                @this.GetTransaction(out ppITransaction);
                // Marshal - Convert managed data to native data.
                __ppITransaction_native = (void*)global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::System.Transactions.DtcProxyShim.DtcInterfaces.ITransaction>.ConvertToUnmanaged(ppITransaction);
            }
            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 ITransactionPhase0EnlistmentAsync
    {
    }
}