File: Generated\361d1da7f942c932\System.Transactions.DtcProxyShim.DtcInterfaces.ITransactionResourceAsync.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, global::System.Transactions.DtcProxyShim.OletxXactRm, int, int, int> PrepareRequest_3;
    public unsafe delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, global::System.Transactions.DtcProxyShim.OletxXactRm, nint, int> CommitRequest_4;
    public unsafe delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, nint, int, nint, int> AbortRequest_5;
    public unsafe delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, int> TMDown_6;
}

file sealed class InterfaceInformation : global::System.Runtime.InteropServices.Marshalling.IIUnknownInterfaceType
{
    public static global::System.Guid Iid { get; } = new([240, 113, 233, 105, 206, 35, 207, 17, 173, 96, 0, 170, 0, 167, 76, 205]);
    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.ITransactionResourceAsync
{
    [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.PrepareRequest_3 = &ABI_PrepareRequest;
            Vtable.CommitRequest_4 = &ABI_CommitRequest;
            Vtable.AbortRequest_5 = &ABI_AbortRequest;
            Vtable.TMDown_6 = &ABI_TMDown;
        }
    }

    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.ComInterfaceGenerator", "12.0.14.46520")]
    void global::System.Transactions.DtcProxyShim.DtcInterfaces.ITransactionResourceAsync.PrepareRequest(bool fRetaining, global::System.Transactions.DtcProxyShim.OletxXactRm grfRM, bool fWantMoniker, bool fSinglePhase)
    {
        unsafe
        {
            var(__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::System.Transactions.DtcProxyShim.DtcInterfaces.ITransactionResourceAsync));
            var __target = ((delegate* unmanaged[MemberFunction]<void*, int, global::System.Transactions.DtcProxyShim.OletxXactRm, int, int, int> )__vtable[3]);
            {
                int __fRetaining_native;
                int __fWantMoniker_native;
                int __fSinglePhase_native;
                int __invokeRetVal;
                // Marshal - Convert managed data to native data.
                __fSinglePhase_native = (int)(fSinglePhase ? 1 : 0);
                __fWantMoniker_native = (int)(fWantMoniker ? 1 : 0);
                __fRetaining_native = (int)(fRetaining ? 1 : 0);
                {
                    __invokeRetVal = __target(__this, __fRetaining_native, grfRM, __fWantMoniker_native, __fSinglePhase_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([240, 113, 233, 105, 206, 35, 207, 17, 173, 96, 0, 170, 0, 167, 76, 205]), (global::System.IntPtr)__this);
            }
        }
    }

    [global::System.Runtime.InteropServices.UnmanagedCallersOnlyAttribute(CallConvs = new[] { typeof(global::System.Runtime.CompilerServices.CallConvMemberFunction) })]
    internal static unsafe int ABI_PrepareRequest(global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native, int __fRetaining_native, global::System.Transactions.DtcProxyShim.OletxXactRm grfRM, int __fWantMoniker_native, int __fSinglePhase_native)
    {
        unsafe
        {
            global::System.Transactions.DtcProxyShim.DtcInterfaces.ITransactionResourceAsync @this = default;
            bool fRetaining = default;
            bool fWantMoniker = default;
            bool fSinglePhase = default;
            int __retVal = default;
            try
            {
                // Unmarshal - Convert native data to managed data.
                __retVal = 0; // S_OK
                fSinglePhase = __fSinglePhase_native != 0;
                fWantMoniker = __fWantMoniker_native != 0;
                fRetaining = __fRetaining_native != 0;
                @this = global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch.GetInstance<global::System.Transactions.DtcProxyShim.DtcInterfaces.ITransactionResourceAsync>(__this_native);
                @this.PrepareRequest(fRetaining, grfRM, fWantMoniker, fSinglePhase);
            }
            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.ITransactionResourceAsync.CommitRequest(global::System.Transactions.DtcProxyShim.OletxXactRm grfRM, nint pNewUOW)
    {
        unsafe
        {
            var(__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::System.Transactions.DtcProxyShim.DtcInterfaces.ITransactionResourceAsync));
            var __target = ((delegate* unmanaged[MemberFunction]<void*, global::System.Transactions.DtcProxyShim.OletxXactRm, nint, int> )__vtable[4]);
            {
                int __invokeRetVal;
                {
                    __invokeRetVal = __target(__this, grfRM, pNewUOW);
                }
    
                // 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([240, 113, 233, 105, 206, 35, 207, 17, 173, 96, 0, 170, 0, 167, 76, 205]), (global::System.IntPtr)__this);
            }
        }
    }

    [global::System.Runtime.InteropServices.UnmanagedCallersOnlyAttribute(CallConvs = new[] { typeof(global::System.Runtime.CompilerServices.CallConvMemberFunction) })]
    internal static unsafe int ABI_CommitRequest(global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native, global::System.Transactions.DtcProxyShim.OletxXactRm grfRM, nint pNewUOW)
    {
        unsafe
        {
            global::System.Transactions.DtcProxyShim.DtcInterfaces.ITransactionResourceAsync @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.ITransactionResourceAsync>(__this_native);
                @this.CommitRequest(grfRM, pNewUOW);
            }
            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.ITransactionResourceAsync.AbortRequest(nint pboidReason, bool fRetaining, nint pNewUOW)
    {
        unsafe
        {
            var(__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::System.Transactions.DtcProxyShim.DtcInterfaces.ITransactionResourceAsync));
            var __target = ((delegate* unmanaged[MemberFunction]<void*, nint, int, nint, int> )__vtable[5]);
            {
                int __fRetaining_native;
                int __invokeRetVal;
                // Marshal - Convert managed data to native data.
                __fRetaining_native = (int)(fRetaining ? 1 : 0);
                {
                    __invokeRetVal = __target(__this, pboidReason, __fRetaining_native, pNewUOW);
                }
    
                // 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([240, 113, 233, 105, 206, 35, 207, 17, 173, 96, 0, 170, 0, 167, 76, 205]), (global::System.IntPtr)__this);
            }
        }
    }

    [global::System.Runtime.InteropServices.UnmanagedCallersOnlyAttribute(CallConvs = new[] { typeof(global::System.Runtime.CompilerServices.CallConvMemberFunction) })]
    internal static unsafe int ABI_AbortRequest(global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native, nint pboidReason, int __fRetaining_native, nint pNewUOW)
    {
        unsafe
        {
            global::System.Transactions.DtcProxyShim.DtcInterfaces.ITransactionResourceAsync @this = default;
            bool fRetaining = default;
            int __retVal = default;
            try
            {
                // Unmarshal - Convert native data to managed data.
                __retVal = 0; // S_OK
                fRetaining = __fRetaining_native != 0;
                @this = global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch.GetInstance<global::System.Transactions.DtcProxyShim.DtcInterfaces.ITransactionResourceAsync>(__this_native);
                @this.AbortRequest(pboidReason, fRetaining, pNewUOW);
            }
            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.ITransactionResourceAsync.TMDown()
    {
        unsafe
        {
            var(__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::System.Transactions.DtcProxyShim.DtcInterfaces.ITransactionResourceAsync));
            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([240, 113, 233, 105, 206, 35, 207, 17, 173, 96, 0, 170, 0, 167, 76, 205]), (global::System.IntPtr)__this);
            }
        }
    }

    [global::System.Runtime.InteropServices.UnmanagedCallersOnlyAttribute(CallConvs = new[] { typeof(global::System.Runtime.CompilerServices.CallConvMemberFunction) })]
    internal static unsafe int ABI_TMDown(global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native)
    {
        unsafe
        {
            global::System.Transactions.DtcProxyShim.DtcInterfaces.ITransactionResourceAsync @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.ITransactionResourceAsync>(__this_native);
                @this.TMDown();
            }
            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 ITransactionResourceAsync
    {
    }
}