File: Generated\361d1da7f942c932\Microsoft.DiaSymReader.ISymUnmanagedDocumentWriter.cs
Project: 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 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*, uint, byte*, int> SetSource_3;
    public unsafe delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, global::System.Guid, uint, byte*, int> SetCheckSum_4;
}
 
file 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 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::Microsoft.DiaSymReader.ISymUnmanagedDocumentWriter
{
    [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.SetSource_3 = &ABI_SetSource;
            Vtable.SetCheckSum_4 = &ABI_SetCheckSum;
        }
    }
 
    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.ComInterfaceGenerator", "12.0.14.48102")]
    [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
    void global::Microsoft.DiaSymReader.ISymUnmanagedDocumentWriter.SetSource(uint sourceSize, byte[] source)
    {
        unsafe
        {
            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.GC.KeepAlive(this);
                // Unmarshal - Convert native data to managed data.
                global::System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(__invokeRetVal, new([235, 175, 31, 176, 80, 196, 77, 58, 190, 236, 180, 206, 236, 1, 224, 6]), (nint)__this);
            }
        }
    }
 
    [global::System.Runtime.InteropServices.UnmanagedCallersOnlyAttribute(CallConvs = new[] { typeof(global::System.Runtime.CompilerServices.CallConvMemberFunction) })]
    internal static unsafe int ABI_SetSource(global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native, uint sourceSize, byte* __source_native)
    {
        unsafe
        {
            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.
                __retVal = 0; // S_OK
                __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);
            }
            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.48102")]
    [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
    void global::Microsoft.DiaSymReader.ISymUnmanagedDocumentWriter.SetCheckSum(global::System.Guid algorithmId, uint checkSumSize, byte[] checkSum)
    {
        unsafe
        {
            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.GC.KeepAlive(this);
                // Unmarshal - Convert native data to managed data.
                global::System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(__invokeRetVal, new([235, 175, 31, 176, 80, 196, 77, 58, 190, 236, 180, 206, 236, 1, 224, 6]), (nint)__this);
            }
        }
    }
 
    [global::System.Runtime.InteropServices.UnmanagedCallersOnlyAttribute(CallConvs = new[] { typeof(global::System.Runtime.CompilerServices.CallConvMemberFunction) })]
    internal static unsafe int ABI_SetCheckSum(global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native, global::System.Guid algorithmId, uint checkSumSize, byte* __checkSum_native)
    {
        unsafe
        {
            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.
                __retVal = 0; // S_OK
                __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);
            }
            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
    {
    }
}