File: _generated\35\Microsoft.DiaSymReader.ISymUnmanagedDocumentWriter.cs
Web Access
Project: src\src\symreader\src\Microsoft.DiaSymReader\Microsoft.DiaSymReader.csproj (Microsoft.DiaSymReader)
// <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*, uint, byte*, int> SetSource_3;
    public delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, global::System.Guid, uint, byte*, int> SetCheckSum_4;
}

file unsafe sealed class InterfaceInformation : global::System.Runtime.InteropServices.Marshalling.IIUnknownInterfaceType
{
    public static global::System.Guid Iid { get; } = new([235, 175, 31, 176, 80, 196, 77, 58, 190, 236, 180, 206, 236, 1, 224, 6]);
    public static void** ManagedVirtualMethodTable => (void**)global::System.Runtime.CompilerServices.Unsafe.AsPointer(in InterfaceImplementation.Vtable);
}

[global::System.Runtime.InteropServices.DynamicInterfaceCastableImplementationAttribute]
file unsafe interface InterfaceImplementation : global::Microsoft.DiaSymReader.ISymUnmanagedDocumentWriter
{
    [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.SetSource_3 = &ABI_SetSource;
        Vtable.SetCheckSum_4 = &ABI_SetCheckSum;
    }

    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.ComInterfaceGenerator", "11.0.14.22804")]
    [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
    void global::Microsoft.DiaSymReader.ISymUnmanagedDocumentWriter.SetSource(uint sourceSize, byte[] source)
    {
        var(__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::Microsoft.DiaSymReader.ISymUnmanagedDocumentWriter));
        var __target = ((delegate* unmanaged[MemberFunction]<void*, uint, byte*, int> )__vtable[3]);
        {
            int __invokeRetVal;
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (void* __source_native = &global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<byte, byte>.ManagedToUnmanagedIn.GetPinnableReference(source))
            {
                __invokeRetVal = __target(__this, sourceSize, (byte*)__source_native);
            }
    
            // NotifyForSuccessfulInvoke - Keep alive any managed objects that need to stay alive across the call.
            global::System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(__invokeRetVal, new([235, 175, 31, 176, 80, 196, 77, 58, 190, 236, 180, 206, 236, 1, 224, 6]), (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_SetSource(global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native, uint sourceSize, byte* __source_native)
    {
        global::Microsoft.DiaSymReader.ISymUnmanagedDocumentWriter @this = default;
        byte[] source = default;
        int __retVal = default;
        // Setup - Perform required setup.
        int __source_native__numElements;
        __source_native__numElements = default;
        try
        {
            // Unmarshal - Convert native data to managed data.
            __source_native__numElements = checked((int)(sourceSize));
            source = global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<byte, byte>.AllocateContainerForManagedElements(__source_native, __source_native__numElements);
            global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<byte, byte>.GetUnmanagedValuesSource(__source_native, __source_native__numElements).CopyTo(global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<byte, byte>.GetManagedValuesDestination(source));
            @this = global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch.GetInstance<global::Microsoft.DiaSymReader.ISymUnmanagedDocumentWriter>(__this_native);
            @this.SetSource(sourceSize, source);
            // 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.22804")]
    [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
    void global::Microsoft.DiaSymReader.ISymUnmanagedDocumentWriter.SetCheckSum(global::System.Guid algorithmId, uint checkSumSize, byte[] checkSum)
    {
        var(__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::Microsoft.DiaSymReader.ISymUnmanagedDocumentWriter));
        var __target = ((delegate* unmanaged[MemberFunction]<void*, global::System.Guid, uint, byte*, int> )__vtable[4]);
        {
            int __invokeRetVal;
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (void* __checkSum_native = &global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<byte, byte>.ManagedToUnmanagedIn.GetPinnableReference(checkSum))
            {
                __invokeRetVal = __target(__this, algorithmId, checkSumSize, (byte*)__checkSum_native);
            }
    
            // NotifyForSuccessfulInvoke - Keep alive any managed objects that need to stay alive across the call.
            global::System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(__invokeRetVal, new([235, 175, 31, 176, 80, 196, 77, 58, 190, 236, 180, 206, 236, 1, 224, 6]), (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_SetCheckSum(global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native, global::System.Guid algorithmId, uint checkSumSize, byte* __checkSum_native)
    {
        global::Microsoft.DiaSymReader.ISymUnmanagedDocumentWriter @this = default;
        byte[] checkSum = default;
        int __retVal = default;
        // Setup - Perform required setup.
        int __checkSum_native__numElements;
        __checkSum_native__numElements = default;
        try
        {
            // Unmarshal - Convert native data to managed data.
            __checkSum_native__numElements = checked((int)(checkSumSize));
            checkSum = global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<byte, byte>.AllocateContainerForManagedElements(__checkSum_native, __checkSum_native__numElements);
            global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<byte, byte>.GetUnmanagedValuesSource(__checkSum_native, __checkSum_native__numElements).CopyTo(global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<byte, byte>.GetManagedValuesDestination(checkSum));
            @this = global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch.GetInstance<global::Microsoft.DiaSymReader.ISymUnmanagedDocumentWriter>(__this_native);
            @this.SetCheckSum(algorithmId, checkSumSize, checkSum);
            // 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;
    }
}

namespace Microsoft.DiaSymReader
{
    [global::System.Runtime.InteropServices.Marshalling.IUnknownDerivedAttribute<InterfaceInformation, InterfaceImplementation>]
    internal unsafe partial interface ISymUnmanagedDocumentWriter
    {
    }
}