File: Generated\361d1da7f942c932\Microsoft.DiaSymReader.ISymUnmanagedConstant.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*, int, int*, char*, int> GetName_3;
    public unsafe delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, global::System.Runtime.InteropServices.Marshalling.ComVariant*, int> GetValue_4;
    public unsafe delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, int, int*, byte*, int> GetSignature_5;
}
 
file sealed class InterfaceInformation : global::System.Runtime.InteropServices.Marshalling.IIUnknownInterfaceType
{
    public static global::System.Guid Iid { get; } = new([216, 94, 178, 72, 173, 91, 188, 65, 156, 238, 205, 98, 250, 188, 116, 233]);
    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.ISymUnmanagedConstant
{
    [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.GetName_3 = &ABI_GetName;
            Vtable.GetValue_4 = &ABI_GetValue;
            Vtable.GetSignature_5 = &ABI_GetSignature;
        }
    }
 
    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.ComInterfaceGenerator", "12.0.14.48102")]
    [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
    int global::Microsoft.DiaSymReader.ISymUnmanagedConstant.GetName(int bufferLength, out int count, char[] name)
    {
        unsafe
        {
            var (__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::Microsoft.DiaSymReader.ISymUnmanagedConstant));
            var __target = ((delegate* unmanaged[MemberFunction]<void*, int, int*, char*, int>)__vtable[3]);
            {
                count = default;
                int __retVal;
                // Pin - Pin data in preparation for calling the P/Invoke.
                fixed (void* __name_native = &global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<char, char>.ManagedToUnmanagedIn.GetPinnableReference(name))
                fixed (int* __count_native = &count)
                {
                    __retVal = __target(__this, bufferLength, __count_native, (char*)__name_native);
                }
                // NotifyForSuccessfulInvoke - Keep alive any managed objects that need to stay alive across the call.
                global::System.GC.KeepAlive(this);
                return __retVal;
            }
        }
    }
 
    [global::System.Runtime.InteropServices.UnmanagedCallersOnlyAttribute(CallConvs = new[] { typeof(global::System.Runtime.CompilerServices.CallConvMemberFunction) })]
    internal static unsafe int ABI_GetName(global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native, int bufferLength, int* __count_native__param, char* __name_native)
    {
        unsafe
        {
            global::Microsoft.DiaSymReader.ISymUnmanagedConstant @this = default;
            ref int __count_native = ref *__count_native__param;
            int count = default;
            char[] name = default;
            int __retVal = default;
            // Setup - Perform required setup.
            int __name_native__numElements;
            __name_native__numElements = default;
            try
            {
                // Unmarshal - Convert native data to managed data.
                __name_native__numElements = bufferLength;
                name = global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<char, char>.AllocateContainerForManagedElements(__name_native, __name_native__numElements);
                global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<char, char>.GetUnmanagedValuesSource(__name_native, __name_native__numElements).CopyTo(global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<char, char>.GetManagedValuesDestination(name));
                @this = global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch.GetInstance<global::Microsoft.DiaSymReader.ISymUnmanagedConstant>(__this_native);
                __retVal = @this.GetName(bufferLength, out count, name);
                // Marshal - Convert managed data to native data.
                global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<char, char>.GetManagedValuesDestination(name).CopyTo(global::System.Runtime.InteropServices.MemoryMarshal.CreateSpan(ref global::System.Runtime.InteropServices.MemoryMarshal.GetReference(global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<char, char>.GetUnmanagedValuesSource(__name_native, __name_native__numElements)), global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<char, char>.GetUnmanagedValuesSource(__name_native, __name_native__numElements).Length));
                __count_native = count;
            }
            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]
    int global::Microsoft.DiaSymReader.ISymUnmanagedConstant.GetValue(out object value)
    {
        unsafe
        {
            var (__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::Microsoft.DiaSymReader.ISymUnmanagedConstant));
            var __target = ((delegate* unmanaged[MemberFunction]<void*, global::System.Runtime.InteropServices.Marshalling.ComVariant*, int>)__vtable[4]);
            {
                bool __invokeSucceeded = default;
                value = default;
                global::System.Runtime.InteropServices.Marshalling.ComVariant __value_native = default;
                int __retVal = default;
                try
                {
                    {
                        __retVal = __target(__this, &__value_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.
                    value = global::System.Runtime.InteropServices.Marshalling.ComVariantMarshaller.ConvertToManaged(__value_native);
                }
                finally
                {
                    if (__invokeSucceeded)
                    {
                        // CleanupCalleeAllocated - Perform cleanup of callee allocated resources.
                        global::System.Runtime.InteropServices.Marshalling.ComVariantMarshaller.Free(__value_native);
                    }
                }
                return __retVal;
            }
        }
    }
 
    [global::System.Runtime.InteropServices.UnmanagedCallersOnlyAttribute(CallConvs = new[] { typeof(global::System.Runtime.CompilerServices.CallConvMemberFunction) })]
    internal static unsafe int ABI_GetValue(global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native, global::System.Runtime.InteropServices.Marshalling.ComVariant* __value_native__param)
    {
        unsafe
        {
            global::Microsoft.DiaSymReader.ISymUnmanagedConstant @this = default;
            ref global::System.Runtime.InteropServices.Marshalling.ComVariant __value_native = ref *__value_native__param;
            object value = default;
            int __retVal = default;
            try
            {
                // Unmarshal - Convert native data to managed data.
                @this = global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch.GetInstance<global::Microsoft.DiaSymReader.ISymUnmanagedConstant>(__this_native);
                __retVal = @this.GetValue(out value);
                // Marshal - Convert managed data to native data.
                __value_native = global::System.Runtime.InteropServices.Marshalling.ComVariantMarshaller.ConvertToUnmanaged(value);
            }
            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]
    int global::Microsoft.DiaSymReader.ISymUnmanagedConstant.GetSignature(int bufferLength, out int count, byte[] signature)
    {
        unsafe
        {
            var (__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::Microsoft.DiaSymReader.ISymUnmanagedConstant));
            var __target = ((delegate* unmanaged[MemberFunction]<void*, int, int*, byte*, int>)__vtable[5]);
            {
                count = default;
                int __retVal;
                // Pin - Pin data in preparation for calling the P/Invoke.
                fixed (void* __signature_native = &global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<byte, byte>.ManagedToUnmanagedIn.GetPinnableReference(signature))
                fixed (int* __count_native = &count)
                {
                    __retVal = __target(__this, bufferLength, __count_native, (byte*)__signature_native);
                }
                // NotifyForSuccessfulInvoke - Keep alive any managed objects that need to stay alive across the call.
                global::System.GC.KeepAlive(this);
                return __retVal;
            }
        }
    }
 
    [global::System.Runtime.InteropServices.UnmanagedCallersOnlyAttribute(CallConvs = new[] { typeof(global::System.Runtime.CompilerServices.CallConvMemberFunction) })]
    internal static unsafe int ABI_GetSignature(global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native, int bufferLength, int* __count_native__param, byte* __signature_native)
    {
        unsafe
        {
            global::Microsoft.DiaSymReader.ISymUnmanagedConstant @this = default;
            ref int __count_native = ref *__count_native__param;
            int count = default;
            byte[] signature = default;
            int __retVal = default;
            // Setup - Perform required setup.
            int __signature_native__numElements;
            __signature_native__numElements = default;
            try
            {
                // Unmarshal - Convert native data to managed data.
                __signature_native__numElements = bufferLength;
                signature = global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<byte, byte>.AllocateContainerForManagedElements(__signature_native, __signature_native__numElements);
                global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<byte, byte>.GetUnmanagedValuesSource(__signature_native, __signature_native__numElements).CopyTo(global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<byte, byte>.GetManagedValuesDestination(signature));
                @this = global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch.GetInstance<global::Microsoft.DiaSymReader.ISymUnmanagedConstant>(__this_native);
                __retVal = @this.GetSignature(bufferLength, out count, signature);
                // Marshal - Convert managed data to native data.
                global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<byte, byte>.GetManagedValuesDestination(signature).CopyTo(global::System.Runtime.InteropServices.MemoryMarshal.CreateSpan(ref global::System.Runtime.InteropServices.MemoryMarshal.GetReference(global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<byte, byte>.GetUnmanagedValuesSource(__signature_native, __signature_native__numElements)), global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<byte, byte>.GetUnmanagedValuesSource(__signature_native, __signature_native__numElements).Length));
                __count_native = count;
            }
            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>]
    public unsafe partial interface ISymUnmanagedConstant
    {
    }
}