File: _generated\1\System.Data.Common.UnsafeNativeMethods.IErrorInfo.cs
Web Access
Project: src\src\runtime\src\libraries\System.Data.OleDb\src\System.Data.OleDb.csproj (System.Data.OleDb)
// <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*, int> GetGUID_3;
    public delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, ushort**, global::System.Data.OleDb.OleDbHResult> GetSource_4;
    public delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, ushort**, global::System.Data.OleDb.OleDbHResult> GetDescription_5;
}

file unsafe sealed class InterfaceInformation : global::System.Runtime.InteropServices.Marshalling.IIUnknownInterfaceType
{
    public static global::System.Guid Iid { get; } = new([32, 177, 242, 28, 125, 84, 27, 16, 142, 101, 8, 0, 43, 43, 209, 25]);
    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.Data.Common.UnsafeNativeMethods.IErrorInfo
{
    [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.GetGUID_3 = &ABI_GetGUID;
        Vtable.GetSource_4 = &ABI_GetSource;
        Vtable.GetDescription_5 = &ABI_GetDescription;
    }

    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.ComInterfaceGenerator", "11.0.14.26904")]
    [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
    void global::System.Data.Common.UnsafeNativeMethods.IErrorInfo.GetGUID()
    {
        var(__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::System.Data.Common.UnsafeNativeMethods.IErrorInfo));
        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.Runtime.InteropServices.Marshal.ThrowExceptionForHR(__invokeRetVal, new([32, 177, 242, 28, 125, 84, 27, 16, 142, 101, 8, 0, 43, 43, 209, 25]), (global::System.IntPtr)__this);
            global::System.GC.KeepAlive(this);
        }
    }

    [global::System.Runtime.InteropServices.UnmanagedCallersOnlyAttribute(CallConvs = new[] { typeof(global::System.Runtime.CompilerServices.CallConvMemberFunction) })]
    internal static int ABI_GetGUID(global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native)
    {
        global::System.Data.Common.UnsafeNativeMethods.IErrorInfo @this = default;
        int __retVal = default;
        try
        {
            // Unmarshal - Convert native data to managed data.
            @this = global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch.GetInstance<global::System.Data.Common.UnsafeNativeMethods.IErrorInfo>(__this_native);
            @this.GetGUID();
            // NotifyForSuccessfulInvoke - Keep alive any managed objects that need to stay alive across the call.
            __retVal = 0; // S_OK
        }
        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")]
    [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
    global::System.Data.OleDb.OleDbHResult global::System.Data.Common.UnsafeNativeMethods.IErrorInfo.GetSource(out string pBstrSource)
    {
        var(__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::System.Data.Common.UnsafeNativeMethods.IErrorInfo));
        var __target = ((delegate* unmanaged[MemberFunction]<void*, ushort**, global::System.Data.OleDb.OleDbHResult> )__vtable[4]);
        {
            bool __invokeSucceeded = default;
            pBstrSource = default;
            ushort* __pBstrSource_native = default;
            global::System.Data.OleDb.OleDbHResult __retVal = default;
            try
            {
                {
                    __retVal = __target(__this, &__pBstrSource_native);
                }
    
                // NotifyForSuccessfulInvoke - Keep alive any managed objects that need to stay alive across the call.
                global::System.GC.KeepAlive(this);
                __invokeSucceeded = true;
                // Unmarshal - Convert native data to managed data.
                pBstrSource = global::System.Runtime.InteropServices.Marshalling.BStrStringMarshaller.ConvertToManaged(__pBstrSource_native);
            }
            finally
            {
                if (__invokeSucceeded)
                {
                    // CleanupCalleeAllocated - Perform cleanup of callee allocated resources.
                    global::System.Runtime.InteropServices.Marshalling.BStrStringMarshaller.Free(__pBstrSource_native);
                }
            }
    
            return __retVal;
        }
    }

    [global::System.Runtime.InteropServices.UnmanagedCallersOnlyAttribute(CallConvs = new[] { typeof(global::System.Runtime.CompilerServices.CallConvMemberFunction) })]
    internal static global::System.Data.OleDb.OleDbHResult ABI_GetSource(global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native, ushort** __pBstrSource_native__param)
    {
        global::System.Data.Common.UnsafeNativeMethods.IErrorInfo @this = default;
        ref ushort* __pBstrSource_native = ref *__pBstrSource_native__param;
        string pBstrSource = default;
        global::System.Data.OleDb.OleDbHResult __retVal = default;
        try
        {
            // Unmarshal - Convert native data to managed data.
            @this = global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch.GetInstance<global::System.Data.Common.UnsafeNativeMethods.IErrorInfo>(__this_native);
            __retVal = @this.GetSource(out pBstrSource);
            // Marshal - Convert managed data to native data.
            __pBstrSource_native = (ushort*)global::System.Runtime.InteropServices.Marshalling.BStrStringMarshaller.ConvertToUnmanaged(pBstrSource);
        }
        catch (global::System.Exception __exception)
        {
            __retVal = global::System.Runtime.InteropServices.Marshalling.ExceptionAsDefaultMarshaller<global::System.Data.OleDb.OleDbHResult>.ConvertToUnmanaged(__exception);
        }
    
        return __retVal;
    }

    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.ComInterfaceGenerator", "11.0.14.26904")]
    [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
    global::System.Data.OleDb.OleDbHResult global::System.Data.Common.UnsafeNativeMethods.IErrorInfo.GetDescription(out string pBstrDescription)
    {
        var(__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::System.Data.Common.UnsafeNativeMethods.IErrorInfo));
        var __target = ((delegate* unmanaged[MemberFunction]<void*, ushort**, global::System.Data.OleDb.OleDbHResult> )__vtable[5]);
        {
            bool __invokeSucceeded = default;
            pBstrDescription = default;
            ushort* __pBstrDescription_native = default;
            global::System.Data.OleDb.OleDbHResult __retVal = default;
            try
            {
                {
                    __retVal = __target(__this, &__pBstrDescription_native);
                }
    
                // NotifyForSuccessfulInvoke - Keep alive any managed objects that need to stay alive across the call.
                global::System.GC.KeepAlive(this);
                __invokeSucceeded = true;
                // Unmarshal - Convert native data to managed data.
                pBstrDescription = global::System.Runtime.InteropServices.Marshalling.BStrStringMarshaller.ConvertToManaged(__pBstrDescription_native);
            }
            finally
            {
                if (__invokeSucceeded)
                {
                    // CleanupCalleeAllocated - Perform cleanup of callee allocated resources.
                    global::System.Runtime.InteropServices.Marshalling.BStrStringMarshaller.Free(__pBstrDescription_native);
                }
            }
    
            return __retVal;
        }
    }

    [global::System.Runtime.InteropServices.UnmanagedCallersOnlyAttribute(CallConvs = new[] { typeof(global::System.Runtime.CompilerServices.CallConvMemberFunction) })]
    internal static global::System.Data.OleDb.OleDbHResult ABI_GetDescription(global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native, ushort** __pBstrDescription_native__param)
    {
        global::System.Data.Common.UnsafeNativeMethods.IErrorInfo @this = default;
        ref ushort* __pBstrDescription_native = ref *__pBstrDescription_native__param;
        string pBstrDescription = default;
        global::System.Data.OleDb.OleDbHResult __retVal = default;
        try
        {
            // Unmarshal - Convert native data to managed data.
            @this = global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch.GetInstance<global::System.Data.Common.UnsafeNativeMethods.IErrorInfo>(__this_native);
            __retVal = @this.GetDescription(out pBstrDescription);
            // Marshal - Convert managed data to native data.
            __pBstrDescription_native = (ushort*)global::System.Runtime.InteropServices.Marshalling.BStrStringMarshaller.ConvertToUnmanaged(pBstrDescription);
        }
        catch (global::System.Exception __exception)
        {
            __retVal = global::System.Runtime.InteropServices.Marshalling.ExceptionAsDefaultMarshaller<global::System.Data.OleDb.OleDbHResult>.ConvertToUnmanaged(__exception);
        }
    
        return __retVal;
    }
}

namespace System.Data.Common
{
    internal static unsafe partial class UnsafeNativeMethods
    {
        [global::System.Runtime.InteropServices.Marshalling.IUnknownDerivedAttribute<InterfaceInformation, InterfaceImplementation>]
        internal unsafe partial interface IErrorInfo
        {
        }
    }
}