File: _generated\12\System.Transactions.DtcProxyShim.DtcInterfaces.ITransactionExport.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*, uint*, int> Export_3;
    public delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, void*, uint, byte*, uint*, int> GetTransactionCookie_4;
}

file unsafe sealed class InterfaceInformation : global::System.Runtime.InteropServices.Marshalling.IIUnknownInterfaceType
{
    public static global::System.Guid Iid { get; } = new([165, 253, 65, 1, 192, 143, 206, 17, 189, 24, 32, 76, 79, 79, 80, 32]);
    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.ITransactionExport
{
    [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.Export_3 = &ABI_Export;
        Vtable.GetTransactionCookie_4 = &ABI_GetTransactionCookie;
    }

    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.ComInterfaceGenerator", "11.0.14.26904")]
    void global::System.Transactions.DtcProxyShim.DtcInterfaces.ITransactionExport.Export(global::System.Transactions.DtcProxyShim.DtcInterfaces.ITransaction punkTransaction, out uint pcbTransactionCookie)
    {
        var(__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::System.Transactions.DtcProxyShim.DtcInterfaces.ITransactionExport));
        var __target = ((delegate* unmanaged[MemberFunction]<void*, void*, uint*, int> )__vtable[3]);
        {
            pcbTransactionCookie = default;
            void* __punkTransaction_native = default;
            int __invokeRetVal = default;
            try
            {
                // Marshal - Convert managed data to native data.
                __punkTransaction_native = (void*)global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::System.Transactions.DtcProxyShim.DtcInterfaces.ITransaction>.ConvertToUnmanaged(punkTransaction);
                // Pin - Pin data in preparation for calling the P/Invoke.
                fixed (uint* __pcbTransactionCookie_native = &pcbTransactionCookie)
                {
                    __invokeRetVal = __target(__this, __punkTransaction_native, __pcbTransactionCookie_native);
                }
    
                // NotifyForSuccessfulInvoke - Keep alive any managed objects that need to stay alive across the call.
                global::System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(__invokeRetVal, new([165, 253, 65, 1, 192, 143, 206, 17, 189, 24, 32, 76, 79, 79, 80, 32]), (global::System.IntPtr)__this);
                global::System.GC.KeepAlive(this);
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::System.Transactions.DtcProxyShim.DtcInterfaces.ITransaction>.Free(__punkTransaction_native);
            }
        }
    }

    [global::System.Runtime.InteropServices.UnmanagedCallersOnlyAttribute(CallConvs = new[] { typeof(global::System.Runtime.CompilerServices.CallConvMemberFunction) })]
    internal static int ABI_Export(global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native, void* __punkTransaction_native, uint* __pcbTransactionCookie_native__param)
    {
        global::System.Transactions.DtcProxyShim.DtcInterfaces.ITransactionExport @this = default;
        global::System.Transactions.DtcProxyShim.DtcInterfaces.ITransaction punkTransaction = default;
        ref uint __pcbTransactionCookie_native = ref *__pcbTransactionCookie_native__param;
        uint pcbTransactionCookie = default;
        int __retVal = default;
        try
        {
            // Unmarshal - Convert native data to managed data.
            punkTransaction = global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::System.Transactions.DtcProxyShim.DtcInterfaces.ITransaction>.ConvertToManaged(__punkTransaction_native);
            @this = global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch.GetInstance<global::System.Transactions.DtcProxyShim.DtcInterfaces.ITransactionExport>(__this_native);
            @this.Export(punkTransaction, out pcbTransactionCookie);
            // 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.
            __pcbTransactionCookie_native = pcbTransactionCookie;
        }
        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.26904")]
    void global::System.Transactions.DtcProxyShim.DtcInterfaces.ITransactionExport.GetTransactionCookie(global::System.Transactions.DtcProxyShim.DtcInterfaces.ITransaction pITransaction, uint cbTransactionCookie, byte[] rgbTransactionCookie, out uint pcbUsed)
    {
        var(__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::System.Transactions.DtcProxyShim.DtcInterfaces.ITransactionExport));
        var __target = ((delegate* unmanaged[MemberFunction]<void*, void*, uint, byte*, uint*, int> )__vtable[4]);
        {
            pcbUsed = default;
            void* __pITransaction_native = default;
            int __invokeRetVal = default;
            try
            {
                // Marshal - Convert managed data to native data.
                __pITransaction_native = (void*)global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::System.Transactions.DtcProxyShim.DtcInterfaces.ITransaction>.ConvertToUnmanaged(pITransaction);
                // Pin - Pin data in preparation for calling the P/Invoke.
                fixed (uint* __pcbUsed_native = &pcbUsed)
                fixed (void* __rgbTransactionCookie_native = &global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<byte, byte>.ManagedToUnmanagedIn.GetPinnableReference(rgbTransactionCookie))
                {
                    __invokeRetVal = __target(__this, __pITransaction_native, cbTransactionCookie, (byte*)__rgbTransactionCookie_native, __pcbUsed_native);
                }
    
                // NotifyForSuccessfulInvoke - Keep alive any managed objects that need to stay alive across the call.
                global::System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(__invokeRetVal, new([165, 253, 65, 1, 192, 143, 206, 17, 189, 24, 32, 76, 79, 79, 80, 32]), (global::System.IntPtr)__this);
                global::System.GC.KeepAlive(this);
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                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_GetTransactionCookie(global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native, void* __pITransaction_native, uint cbTransactionCookie, byte* __rgbTransactionCookie_native, uint* __pcbUsed_native__param)
    {
        global::System.Transactions.DtcProxyShim.DtcInterfaces.ITransactionExport @this = default;
        global::System.Transactions.DtcProxyShim.DtcInterfaces.ITransaction pITransaction = default;
        byte[] rgbTransactionCookie = default;
        ref uint __pcbUsed_native = ref *__pcbUsed_native__param;
        uint pcbUsed = default;
        int __retVal = default;
        // Setup - Perform required setup.
        int __rgbTransactionCookie_native__numElements;
        __rgbTransactionCookie_native__numElements = default;
        try
        {
            // Unmarshal - Convert native data to managed data.
            __rgbTransactionCookie_native__numElements = checked((int)(cbTransactionCookie));
            rgbTransactionCookie = global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<byte, byte>.AllocateContainerForManagedElements(__rgbTransactionCookie_native, __rgbTransactionCookie_native__numElements);
            global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<byte, byte>.GetUnmanagedValuesSource(__rgbTransactionCookie_native, __rgbTransactionCookie_native__numElements).CopyTo(global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<byte, byte>.GetManagedValuesDestination(rgbTransactionCookie));
            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.ITransactionExport>(__this_native);
            @this.GetTransactionCookie(pITransaction, cbTransactionCookie, rgbTransactionCookie, out pcbUsed);
            // 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.
            __pcbUsed_native = pcbUsed;
        }
        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 ITransactionExport
    {
    }
}