File: _generated\23\Microsoft.DiaSymReader.ISymUnmanagedReader2.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*, ushort*, global::System.Guid, global::System.Guid, global::System.Guid, void**, int> GetDocument_3;
    public delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, int, int*, global::System.IntPtr*, int> GetDocuments_4;
    public delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, int*, int> GetUserEntryPoint_5;
    public delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, int, void**, int> GetMethod_6;
    public delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, int, int, void**, int> GetMethodByVersion_7;
    public delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, int, int, int*, global::System.IntPtr*, int> GetVariables_8;
    public delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, int, int*, global::System.IntPtr*, int> GetGlobalVariables_9;
    public delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, void*, int, int, void**, int> GetMethodFromDocumentPosition_10;
    public delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, int, ushort*, int, int*, byte*, int> GetSymAttribute_11;
    public delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, int, int*, global::System.IntPtr*, int> GetNamespaces_12;
    public delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, void*, ushort*, ushort*, nint, int> Initialize_13;
    public delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, ushort*, nint, int> UpdateSymbolStore_14;
    public delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, ushort*, nint, int> ReplaceSymbolStore_15;
    public delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, int, int*, char*, int> GetSymbolStoreFileName_16;
    public delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, void*, int, int, int, int*, global::System.IntPtr*, int> GetMethodsFromDocumentPosition_17;
    public delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, void*, int*, int*, int> GetDocumentVersion_18;
    public delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, void*, int*, int> GetMethodVersion_19;
    public delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, int, int, void**, int> GetMethodByVersionPreRemap_20;
    public delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, int, ushort*, int, int*, byte*, int> GetSymAttributePreRemap_21;
    public delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, void*, int, int*, global::System.IntPtr*, int> GetMethodsInDocument_22;
}

file unsafe sealed class InterfaceInformation : global::System.Runtime.InteropServices.Marshalling.IIUnknownInterfaceType
{
    public static global::System.Guid Iid { get; } = new([178, 83, 158, 160, 87, 42, 202, 76, 143, 99, 184, 79, 124, 53, 212, 170]);
    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.ISymUnmanagedReader2
{
    [global::System.Runtime.CompilerServices.FixedAddressValueTypeAttribute]
    public static readonly InterfaceImplementationVtable Vtable;

    static InterfaceImplementation()
    {
        global::System.Runtime.InteropServices.NativeMemory.Copy(
            global::System.Runtime.InteropServices.Marshalling.StrategyBasedComWrappers.DefaultIUnknownInterfaceDetailsStrategy.GetIUnknownDerivedDetails(typeof(global::Microsoft.DiaSymReader.ISymUnmanagedReader).TypeHandle).ManagedVirtualMethodTable,
            global::System.Runtime.CompilerServices.Unsafe.AsPointer(ref Vtable),
            (nuint)(sizeof(void*) * 20));

        Vtable.GetMethodByVersionPreRemap_20 = &ABI_GetMethodByVersionPreRemap;
        Vtable.GetSymAttributePreRemap_21 = &ABI_GetSymAttributePreRemap;
        Vtable.GetMethodsInDocument_22 = &ABI_GetMethodsInDocument;
    }

    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.ComInterfaceGenerator", "11.0.14.22804")]
    [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
    int global::Microsoft.DiaSymReader.ISymUnmanagedReader2.GetMethodByVersionPreRemap(int methodToken, int version, out global::Microsoft.DiaSymReader.ISymUnmanagedMethod method)
    {
        var(__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::Microsoft.DiaSymReader.ISymUnmanagedReader2));
        var __target = ((delegate* unmanaged[MemberFunction]<void*, int, int, void**, int> )__vtable[20]);
        {
            bool __invokeSucceeded = default;
            method = default;
            void* __method_native = default;
            int __retVal = default;
            try
            {
                {
                    __retVal = __target(__this, methodToken, version, &__method_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.
                method = global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedMethod>.ConvertToManaged(__method_native);
            }
            finally
            {
                if (__invokeSucceeded)
                {
                    // CleanupCalleeAllocated - Perform cleanup of callee allocated resources.
                    global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedMethod>.Free(__method_native);
                }
            }
    
            return __retVal;
        }
    }

    [global::System.Runtime.InteropServices.UnmanagedCallersOnlyAttribute(CallConvs = new[] { typeof(global::System.Runtime.CompilerServices.CallConvMemberFunction) })]
    internal static int ABI_GetMethodByVersionPreRemap(global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native, int methodToken, int version, void** __method_native__param)
    {
        global::Microsoft.DiaSymReader.ISymUnmanagedReader2 @this = default;
        ref void* __method_native = ref *__method_native__param;
        global::Microsoft.DiaSymReader.ISymUnmanagedMethod method = default;
        int __retVal = default;
        try
        {
            // Unmarshal - Convert native data to managed data.
            @this = global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch.GetInstance<global::Microsoft.DiaSymReader.ISymUnmanagedReader2>(__this_native);
            __retVal = @this.GetMethodByVersionPreRemap(methodToken, version, out method);
            // Marshal - Convert managed data to native data.
            __method_native = (void*)global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedMethod>.ConvertToUnmanaged(method);
        }
        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]
    int global::Microsoft.DiaSymReader.ISymUnmanagedReader2.GetSymAttributePreRemap(int methodToken, string name, int bufferLength, out int count, byte[] customDebugInformation)
    {
        var(__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::Microsoft.DiaSymReader.ISymUnmanagedReader2));
        var __target = ((delegate* unmanaged[MemberFunction]<void*, int, ushort*, int, int*, byte*, int> )__vtable[21]);
        {
            count = default;
            int __retVal;
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (void* __customDebugInformation_native = &global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<byte, byte>.ManagedToUnmanagedIn.GetPinnableReference(customDebugInformation))
            fixed (int* __count_native = &count)
            fixed (void* __name_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(name))
            {
                __retVal = __target(__this, methodToken, (ushort*)__name_native, bufferLength, __count_native, (byte*)__customDebugInformation_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 int ABI_GetSymAttributePreRemap(global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native, int methodToken, ushort* __name_native, int bufferLength, int* __count_native__param, byte* __customDebugInformation_native)
    {
        global::Microsoft.DiaSymReader.ISymUnmanagedReader2 @this = default;
        string name = default;
        ref int __count_native = ref *__count_native__param;
        int count = default;
        byte[] customDebugInformation = default;
        int __retVal = default;
        // Setup - Perform required setup.
        int __customDebugInformation_native__numElements;
        __customDebugInformation_native__numElements = default;
        try
        {
            // Unmarshal - Convert native data to managed data.
            __customDebugInformation_native__numElements = bufferLength;
            customDebugInformation = global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<byte, byte>.AllocateContainerForManagedElements(__customDebugInformation_native, __customDebugInformation_native__numElements);
            global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<byte, byte>.GetUnmanagedValuesSource(__customDebugInformation_native, __customDebugInformation_native__numElements).CopyTo(global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<byte, byte>.GetManagedValuesDestination(customDebugInformation));
            name = global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.ConvertToManaged(__name_native);
            @this = global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch.GetInstance<global::Microsoft.DiaSymReader.ISymUnmanagedReader2>(__this_native);
            __retVal = @this.GetSymAttributePreRemap(methodToken, name, bufferLength, out count, customDebugInformation);
            // Marshal - Convert managed data to native data.
            global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<byte, byte>.GetManagedValuesDestination(customDebugInformation).CopyTo(global::System.Runtime.InteropServices.MemoryMarshal.CreateSpan(ref global::System.Runtime.InteropServices.MemoryMarshal.GetReference(global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<byte, byte>.GetUnmanagedValuesSource(__customDebugInformation_native, __customDebugInformation_native__numElements)), global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<byte, byte>.GetUnmanagedValuesSource(__customDebugInformation_native, __customDebugInformation_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", "11.0.14.22804")]
    [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
    int global::Microsoft.DiaSymReader.ISymUnmanagedReader2.GetMethodsInDocument(global::Microsoft.DiaSymReader.ISymUnmanagedDocument document, int bufferLength, out int count, global::Microsoft.DiaSymReader.ISymUnmanagedMethod[] methods)
    {
        var(__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::Microsoft.DiaSymReader.ISymUnmanagedReader2));
        var __target = ((delegate* unmanaged[MemberFunction]<void*, void*, int, int*, global::System.IntPtr*, int> )__vtable[22]);
        {
            bool __invokeSucceeded = default;
            count = default;
            void* __document_native = default;
            global::System.IntPtr* __methods_native = default;
            int __retVal = default;
            // Setup - Perform required setup.
            scoped global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedMethod, global::System.IntPtr>.ManagedToUnmanagedIn __methods_native__marshaller = new();
            int __methods_native__numElements;
            global::System.Runtime.CompilerServices.Unsafe.SkipInit(out __methods_native__numElements);
            int __methods_native__lastIndexMarshalled = 0;
            try
            {
                // Marshal - Convert managed data to native data.
                __methods_native__marshaller.FromManaged(methods, stackalloc global::System.IntPtr[global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedMethod, global::System.IntPtr>.ManagedToUnmanagedIn.BufferSize]);
                {
                    global::System.ReadOnlySpan<global::Microsoft.DiaSymReader.ISymUnmanagedMethod> __methods_native__managedSpan = __methods_native__marshaller.GetManagedValuesSource();
                    global::System.Span<global::System.IntPtr> __methods_native__nativeSpan = __methods_native__marshaller.GetUnmanagedValuesDestination();
                    for (int __i0 = 0; __i0 < __methods_native__managedSpan.Length; ++__i0, ++__methods_native__lastIndexMarshalled)
                    {
                        void* __methods_native__nativeSpan____i0_exactType = (void*)__methods_native__nativeSpan[__i0];
                        __methods_native__nativeSpan____i0_exactType = (void*)global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedMethod>.ConvertToUnmanaged(__methods_native__managedSpan[__i0]);
                        __methods_native__nativeSpan[__i0] = (global::System.IntPtr)__methods_native__nativeSpan____i0_exactType;
                    }
                }
    
                __document_native = (void*)global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedDocument>.ConvertToUnmanaged(document);
                // Pin - Pin data in preparation for calling the P/Invoke.
                fixed (void* __methods_native__unused = __methods_native__marshaller)
                fixed (int* __count_native = &count)
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __methods_native = __methods_native__marshaller.ToUnmanaged();
                    __retVal = __target(__this, __document_native, bufferLength, __count_native, __methods_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.
                {
                    __methods_native__numElements = __methods_native__marshaller.GetManagedValuesSource().Length;
                    global::System.Span<global::Microsoft.DiaSymReader.ISymUnmanagedMethod> __methods_native__managedSpan = global::System.Runtime.InteropServices.MemoryMarshal.CreateSpan(ref global::System.Runtime.CompilerServices.Unsafe.AsRef(in __methods_native__marshaller.GetManagedValuesSource().GetPinnableReference()), __methods_native__numElements);
                    global::System.Span<global::System.IntPtr> __methods_native__nativeSpan = __methods_native__marshaller.GetUnmanagedValuesDestination();
                    for (int __i0 = 0; __i0 < __methods_native__managedSpan.Length; ++__i0)
                    {
                        void* __methods_native__nativeSpan____i0_exactType = (void*)__methods_native__nativeSpan[__i0];
                        __methods_native__managedSpan[__i0] = global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedMethod>.ConvertToManaged(__methods_native__nativeSpan____i0_exactType);
                    }
                }
            }
            finally
            {
                if (__invokeSucceeded)
                {
                    // CleanupCalleeAllocated - Perform cleanup of callee allocated resources.
                    _ = __methods_native__lastIndexMarshalled;
                }
    
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                {
                    global::System.ReadOnlySpan<global::System.IntPtr> __methods_native__nativeSpan = __methods_native__marshaller.GetUnmanagedValuesDestination();
                    for (int __i0 = 0; __i0 < __methods_native__lastIndexMarshalled; ++__i0)
                    {
                        void* __methods_native__nativeSpan____i0_exactType = (void*)__methods_native__nativeSpan[__i0];
                        global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedMethod>.Free(__methods_native__nativeSpan____i0_exactType);
                    }
                }
    
                __methods_native__marshaller.Free();
                global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedDocument>.Free(__document_native);
            }
    
            return __retVal;
        }
    }

    [global::System.Runtime.InteropServices.UnmanagedCallersOnlyAttribute(CallConvs = new[] { typeof(global::System.Runtime.CompilerServices.CallConvMemberFunction) })]
    internal static int ABI_GetMethodsInDocument(global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native, void* __document_native, int bufferLength, int* __count_native__param, global::System.IntPtr* __methods_native)
    {
        global::Microsoft.DiaSymReader.ISymUnmanagedReader2 @this = default;
        global::Microsoft.DiaSymReader.ISymUnmanagedDocument document = default;
        ref int __count_native = ref *__count_native__param;
        int count = default;
        global::Microsoft.DiaSymReader.ISymUnmanagedMethod[] methods = default;
        int __retVal = default;
        // Setup - Perform required setup.
        int __methods_native__numElements;
        __methods_native__numElements = default;
        try
        {
            // Unmarshal - Convert native data to managed data.
            __methods_native__numElements = bufferLength;
            methods = global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedMethod, global::System.IntPtr>.AllocateContainerForManagedElements(__methods_native, __methods_native__numElements);
            {
                global::System.ReadOnlySpan<global::System.IntPtr> __methods_native__nativeSpan = global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedMethod, global::System.IntPtr>.GetUnmanagedValuesSource(__methods_native, __methods_native__numElements);
                global::System.Span<global::Microsoft.DiaSymReader.ISymUnmanagedMethod> __methods_native__managedSpan = global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedMethod, global::System.IntPtr>.GetManagedValuesDestination(methods);
                for (int __i0 = 0; __i0 < __methods_native__nativeSpan.Length; ++__i0)
                {
                    void* __methods_native__nativeSpan____i0_exactType = (void*)__methods_native__nativeSpan[__i0];
                    __methods_native__managedSpan[__i0] = global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedMethod>.ConvertToManaged(__methods_native__nativeSpan____i0_exactType);
                }
            }
    
            document = global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedDocument>.ConvertToManaged(__document_native);
            @this = global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch.GetInstance<global::Microsoft.DiaSymReader.ISymUnmanagedReader2>(__this_native);
            __retVal = @this.GetMethodsInDocument(document, bufferLength, out count, methods);
            // Marshal - Convert managed data to native data.
            {
                __methods_native__numElements = global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedMethod, global::System.IntPtr>.GetManagedValuesDestination(methods).Length;
                global::System.Span<global::System.IntPtr> __methods_native__nativeSpan = global::System.Runtime.InteropServices.MemoryMarshal.CreateSpan(ref global::System.Runtime.CompilerServices.Unsafe.AsRef(in global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedMethod, global::System.IntPtr>.GetUnmanagedValuesSource(__methods_native, __methods_native__numElements).GetPinnableReference()), __methods_native__numElements);
                global::System.Span<global::Microsoft.DiaSymReader.ISymUnmanagedMethod> __methods_native__managedSpan = global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedMethod, global::System.IntPtr>.GetManagedValuesDestination(methods);
                for (int __i0 = 0; __i0 < __methods_native__nativeSpan.Length; ++__i0)
                {
                    void* __methods_native__nativeSpan____i0_exactType = (void*)__methods_native__nativeSpan[__i0];
                    void* __methods_native__nativeSpan____i0__original = __methods_native__nativeSpan____i0_exactType;
                    __methods_native__nativeSpan____i0_exactType = (void*)global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedMethod>.ConvertToUnmanaged(__methods_native__managedSpan[__i0]);
                    global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedMethod>.Free(__methods_native__nativeSpan____i0__original);
                    __methods_native__nativeSpan[__i0] = (global::System.IntPtr)__methods_native__nativeSpan____i0_exactType;
                }
            }
    
            __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", "11.0.14.22804")]
    [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
    int global::Microsoft.DiaSymReader.ISymUnmanagedReader2.GetDocument(string url, global::System.Guid language, global::System.Guid languageVendor, global::System.Guid documentType, out global::Microsoft.DiaSymReader.ISymUnmanagedDocument document)
    {
        var(__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::Microsoft.DiaSymReader.ISymUnmanagedReader2));
        var __target = ((delegate* unmanaged[MemberFunction]<void*, ushort*, global::System.Guid, global::System.Guid, global::System.Guid, void**, int> )__vtable[3]);
        {
            bool __invokeSucceeded = default;
            document = default;
            void* __document_native = default;
            int __retVal = default;
            try
            {
                // Pin - Pin data in preparation for calling the P/Invoke.
                fixed (void* __url_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(url))
                {
                    __retVal = __target(__this, (ushort*)__url_native, language, languageVendor, documentType, &__document_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.
                document = global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedDocument>.ConvertToManaged(__document_native);
            }
            finally
            {
                if (__invokeSucceeded)
                {
                    // CleanupCalleeAllocated - Perform cleanup of callee allocated resources.
                    global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedDocument>.Free(__document_native);
                }
            }
    
            return __retVal;
        }
    }

    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.ComInterfaceGenerator", "11.0.14.22804")]
    [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
    int global::Microsoft.DiaSymReader.ISymUnmanagedReader2.GetDocuments(int bufferLength, out int count, global::Microsoft.DiaSymReader.ISymUnmanagedDocument[] documents)
    {
        var(__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::Microsoft.DiaSymReader.ISymUnmanagedReader2));
        var __target = ((delegate* unmanaged[MemberFunction]<void*, int, int*, global::System.IntPtr*, int> )__vtable[4]);
        {
            bool __invokeSucceeded = default;
            count = default;
            global::System.IntPtr* __documents_native = default;
            int __retVal = default;
            // Setup - Perform required setup.
            scoped global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedDocument, global::System.IntPtr>.ManagedToUnmanagedIn __documents_native__marshaller = new();
            int __documents_native__numElements;
            global::System.Runtime.CompilerServices.Unsafe.SkipInit(out __documents_native__numElements);
            int __documents_native__lastIndexMarshalled = 0;
            try
            {
                // Marshal - Convert managed data to native data.
                __documents_native__marshaller.FromManaged(documents, stackalloc global::System.IntPtr[global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedDocument, global::System.IntPtr>.ManagedToUnmanagedIn.BufferSize]);
                {
                    global::System.ReadOnlySpan<global::Microsoft.DiaSymReader.ISymUnmanagedDocument> __documents_native__managedSpan = __documents_native__marshaller.GetManagedValuesSource();
                    global::System.Span<global::System.IntPtr> __documents_native__nativeSpan = __documents_native__marshaller.GetUnmanagedValuesDestination();
                    for (int __i0 = 0; __i0 < __documents_native__managedSpan.Length; ++__i0, ++__documents_native__lastIndexMarshalled)
                    {
                        void* __documents_native__nativeSpan____i0_exactType = (void*)__documents_native__nativeSpan[__i0];
                        __documents_native__nativeSpan____i0_exactType = (void*)global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedDocument>.ConvertToUnmanaged(__documents_native__managedSpan[__i0]);
                        __documents_native__nativeSpan[__i0] = (global::System.IntPtr)__documents_native__nativeSpan____i0_exactType;
                    }
                }
    
                // Pin - Pin data in preparation for calling the P/Invoke.
                fixed (void* __documents_native__unused = __documents_native__marshaller)
                fixed (int* __count_native = &count)
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __documents_native = __documents_native__marshaller.ToUnmanaged();
                    __retVal = __target(__this, bufferLength, __count_native, __documents_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.
                {
                    __documents_native__numElements = __documents_native__marshaller.GetManagedValuesSource().Length;
                    global::System.Span<global::Microsoft.DiaSymReader.ISymUnmanagedDocument> __documents_native__managedSpan = global::System.Runtime.InteropServices.MemoryMarshal.CreateSpan(ref global::System.Runtime.CompilerServices.Unsafe.AsRef(in __documents_native__marshaller.GetManagedValuesSource().GetPinnableReference()), __documents_native__numElements);
                    global::System.Span<global::System.IntPtr> __documents_native__nativeSpan = __documents_native__marshaller.GetUnmanagedValuesDestination();
                    for (int __i0 = 0; __i0 < __documents_native__managedSpan.Length; ++__i0)
                    {
                        void* __documents_native__nativeSpan____i0_exactType = (void*)__documents_native__nativeSpan[__i0];
                        __documents_native__managedSpan[__i0] = global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedDocument>.ConvertToManaged(__documents_native__nativeSpan____i0_exactType);
                    }
                }
            }
            finally
            {
                if (__invokeSucceeded)
                {
                    // CleanupCalleeAllocated - Perform cleanup of callee allocated resources.
                    _ = __documents_native__lastIndexMarshalled;
                }
    
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                {
                    global::System.ReadOnlySpan<global::System.IntPtr> __documents_native__nativeSpan = __documents_native__marshaller.GetUnmanagedValuesDestination();
                    for (int __i0 = 0; __i0 < __documents_native__lastIndexMarshalled; ++__i0)
                    {
                        void* __documents_native__nativeSpan____i0_exactType = (void*)__documents_native__nativeSpan[__i0];
                        global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedDocument>.Free(__documents_native__nativeSpan____i0_exactType);
                    }
                }
    
                __documents_native__marshaller.Free();
            }
    
            return __retVal;
        }
    }

    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.ComInterfaceGenerator", "11.0.14.22804")]
    [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
    int global::Microsoft.DiaSymReader.ISymUnmanagedReader2.GetUserEntryPoint(out int methodToken)
    {
        var(__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::Microsoft.DiaSymReader.ISymUnmanagedReader2));
        var __target = ((delegate* unmanaged[MemberFunction]<void*, int*, int> )__vtable[5]);
        {
            methodToken = default;
            int __retVal;
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (int* __methodToken_native = &methodToken)
            {
                __retVal = __target(__this, __methodToken_native);
            }
    
            // NotifyForSuccessfulInvoke - Keep alive any managed objects that need to stay alive across the call.
            global::System.GC.KeepAlive(this);
            return __retVal;
        }
    }

    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.ComInterfaceGenerator", "11.0.14.22804")]
    [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
    int global::Microsoft.DiaSymReader.ISymUnmanagedReader2.GetMethod(int methodToken, out global::Microsoft.DiaSymReader.ISymUnmanagedMethod method)
    {
        var(__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::Microsoft.DiaSymReader.ISymUnmanagedReader2));
        var __target = ((delegate* unmanaged[MemberFunction]<void*, int, void**, int> )__vtable[6]);
        {
            bool __invokeSucceeded = default;
            method = default;
            void* __method_native = default;
            int __retVal = default;
            try
            {
                {
                    __retVal = __target(__this, methodToken, &__method_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.
                method = global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedMethod>.ConvertToManaged(__method_native);
            }
            finally
            {
                if (__invokeSucceeded)
                {
                    // CleanupCalleeAllocated - Perform cleanup of callee allocated resources.
                    global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedMethod>.Free(__method_native);
                }
            }
    
            return __retVal;
        }
    }

    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.ComInterfaceGenerator", "11.0.14.22804")]
    [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
    int global::Microsoft.DiaSymReader.ISymUnmanagedReader2.GetMethodByVersion(int methodToken, int version, out global::Microsoft.DiaSymReader.ISymUnmanagedMethod method)
    {
        var(__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::Microsoft.DiaSymReader.ISymUnmanagedReader2));
        var __target = ((delegate* unmanaged[MemberFunction]<void*, int, int, void**, int> )__vtable[7]);
        {
            bool __invokeSucceeded = default;
            method = default;
            void* __method_native = default;
            int __retVal = default;
            try
            {
                {
                    __retVal = __target(__this, methodToken, version, &__method_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.
                method = global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedMethod>.ConvertToManaged(__method_native);
            }
            finally
            {
                if (__invokeSucceeded)
                {
                    // CleanupCalleeAllocated - Perform cleanup of callee allocated resources.
                    global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedMethod>.Free(__method_native);
                }
            }
    
            return __retVal;
        }
    }

    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.ComInterfaceGenerator", "11.0.14.22804")]
    [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
    int global::Microsoft.DiaSymReader.ISymUnmanagedReader2.GetVariables(int methodToken, int bufferLength, out int count, global::Microsoft.DiaSymReader.ISymUnmanagedVariable[] variables)
    {
        var(__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::Microsoft.DiaSymReader.ISymUnmanagedReader2));
        var __target = ((delegate* unmanaged[MemberFunction]<void*, int, int, int*, global::System.IntPtr*, int> )__vtable[8]);
        {
            bool __invokeSucceeded = default;
            count = default;
            global::System.IntPtr* __variables_native = default;
            int __retVal = default;
            // Setup - Perform required setup.
            scoped global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedVariable, global::System.IntPtr>.ManagedToUnmanagedIn __variables_native__marshaller = new();
            int __variables_native__numElements;
            global::System.Runtime.CompilerServices.Unsafe.SkipInit(out __variables_native__numElements);
            int __variables_native__lastIndexMarshalled = 0;
            try
            {
                // Marshal - Convert managed data to native data.
                __variables_native__marshaller.FromManaged(variables, stackalloc global::System.IntPtr[global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedVariable, global::System.IntPtr>.ManagedToUnmanagedIn.BufferSize]);
                {
                    global::System.ReadOnlySpan<global::Microsoft.DiaSymReader.ISymUnmanagedVariable> __variables_native__managedSpan = __variables_native__marshaller.GetManagedValuesSource();
                    global::System.Span<global::System.IntPtr> __variables_native__nativeSpan = __variables_native__marshaller.GetUnmanagedValuesDestination();
                    for (int __i0 = 0; __i0 < __variables_native__managedSpan.Length; ++__i0, ++__variables_native__lastIndexMarshalled)
                    {
                        void* __variables_native__nativeSpan____i0_exactType = (void*)__variables_native__nativeSpan[__i0];
                        __variables_native__nativeSpan____i0_exactType = (void*)global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedVariable>.ConvertToUnmanaged(__variables_native__managedSpan[__i0]);
                        __variables_native__nativeSpan[__i0] = (global::System.IntPtr)__variables_native__nativeSpan____i0_exactType;
                    }
                }
    
                // Pin - Pin data in preparation for calling the P/Invoke.
                fixed (void* __variables_native__unused = __variables_native__marshaller)
                fixed (int* __count_native = &count)
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __variables_native = __variables_native__marshaller.ToUnmanaged();
                    __retVal = __target(__this, methodToken, bufferLength, __count_native, __variables_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.
                {
                    __variables_native__numElements = __variables_native__marshaller.GetManagedValuesSource().Length;
                    global::System.Span<global::Microsoft.DiaSymReader.ISymUnmanagedVariable> __variables_native__managedSpan = global::System.Runtime.InteropServices.MemoryMarshal.CreateSpan(ref global::System.Runtime.CompilerServices.Unsafe.AsRef(in __variables_native__marshaller.GetManagedValuesSource().GetPinnableReference()), __variables_native__numElements);
                    global::System.Span<global::System.IntPtr> __variables_native__nativeSpan = __variables_native__marshaller.GetUnmanagedValuesDestination();
                    for (int __i0 = 0; __i0 < __variables_native__managedSpan.Length; ++__i0)
                    {
                        void* __variables_native__nativeSpan____i0_exactType = (void*)__variables_native__nativeSpan[__i0];
                        __variables_native__managedSpan[__i0] = global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedVariable>.ConvertToManaged(__variables_native__nativeSpan____i0_exactType);
                    }
                }
            }
            finally
            {
                if (__invokeSucceeded)
                {
                    // CleanupCalleeAllocated - Perform cleanup of callee allocated resources.
                    _ = __variables_native__lastIndexMarshalled;
                }
    
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                {
                    global::System.ReadOnlySpan<global::System.IntPtr> __variables_native__nativeSpan = __variables_native__marshaller.GetUnmanagedValuesDestination();
                    for (int __i0 = 0; __i0 < __variables_native__lastIndexMarshalled; ++__i0)
                    {
                        void* __variables_native__nativeSpan____i0_exactType = (void*)__variables_native__nativeSpan[__i0];
                        global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedVariable>.Free(__variables_native__nativeSpan____i0_exactType);
                    }
                }
    
                __variables_native__marshaller.Free();
            }
    
            return __retVal;
        }
    }

    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.ComInterfaceGenerator", "11.0.14.22804")]
    [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
    int global::Microsoft.DiaSymReader.ISymUnmanagedReader2.GetGlobalVariables(int bufferLength, out int count, global::Microsoft.DiaSymReader.ISymUnmanagedVariable[] variables)
    {
        var(__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::Microsoft.DiaSymReader.ISymUnmanagedReader2));
        var __target = ((delegate* unmanaged[MemberFunction]<void*, int, int*, global::System.IntPtr*, int> )__vtable[9]);
        {
            bool __invokeSucceeded = default;
            count = default;
            global::System.IntPtr* __variables_native = default;
            int __retVal = default;
            // Setup - Perform required setup.
            scoped global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedVariable, global::System.IntPtr>.ManagedToUnmanagedIn __variables_native__marshaller = new();
            int __variables_native__numElements;
            global::System.Runtime.CompilerServices.Unsafe.SkipInit(out __variables_native__numElements);
            int __variables_native__lastIndexMarshalled = 0;
            try
            {
                // Marshal - Convert managed data to native data.
                __variables_native__marshaller.FromManaged(variables, stackalloc global::System.IntPtr[global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedVariable, global::System.IntPtr>.ManagedToUnmanagedIn.BufferSize]);
                {
                    global::System.ReadOnlySpan<global::Microsoft.DiaSymReader.ISymUnmanagedVariable> __variables_native__managedSpan = __variables_native__marshaller.GetManagedValuesSource();
                    global::System.Span<global::System.IntPtr> __variables_native__nativeSpan = __variables_native__marshaller.GetUnmanagedValuesDestination();
                    for (int __i0 = 0; __i0 < __variables_native__managedSpan.Length; ++__i0, ++__variables_native__lastIndexMarshalled)
                    {
                        void* __variables_native__nativeSpan____i0_exactType = (void*)__variables_native__nativeSpan[__i0];
                        __variables_native__nativeSpan____i0_exactType = (void*)global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedVariable>.ConvertToUnmanaged(__variables_native__managedSpan[__i0]);
                        __variables_native__nativeSpan[__i0] = (global::System.IntPtr)__variables_native__nativeSpan____i0_exactType;
                    }
                }
    
                // Pin - Pin data in preparation for calling the P/Invoke.
                fixed (void* __variables_native__unused = __variables_native__marshaller)
                fixed (int* __count_native = &count)
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __variables_native = __variables_native__marshaller.ToUnmanaged();
                    __retVal = __target(__this, bufferLength, __count_native, __variables_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.
                {
                    __variables_native__numElements = __variables_native__marshaller.GetManagedValuesSource().Length;
                    global::System.Span<global::Microsoft.DiaSymReader.ISymUnmanagedVariable> __variables_native__managedSpan = global::System.Runtime.InteropServices.MemoryMarshal.CreateSpan(ref global::System.Runtime.CompilerServices.Unsafe.AsRef(in __variables_native__marshaller.GetManagedValuesSource().GetPinnableReference()), __variables_native__numElements);
                    global::System.Span<global::System.IntPtr> __variables_native__nativeSpan = __variables_native__marshaller.GetUnmanagedValuesDestination();
                    for (int __i0 = 0; __i0 < __variables_native__managedSpan.Length; ++__i0)
                    {
                        void* __variables_native__nativeSpan____i0_exactType = (void*)__variables_native__nativeSpan[__i0];
                        __variables_native__managedSpan[__i0] = global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedVariable>.ConvertToManaged(__variables_native__nativeSpan____i0_exactType);
                    }
                }
            }
            finally
            {
                if (__invokeSucceeded)
                {
                    // CleanupCalleeAllocated - Perform cleanup of callee allocated resources.
                    _ = __variables_native__lastIndexMarshalled;
                }
    
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                {
                    global::System.ReadOnlySpan<global::System.IntPtr> __variables_native__nativeSpan = __variables_native__marshaller.GetUnmanagedValuesDestination();
                    for (int __i0 = 0; __i0 < __variables_native__lastIndexMarshalled; ++__i0)
                    {
                        void* __variables_native__nativeSpan____i0_exactType = (void*)__variables_native__nativeSpan[__i0];
                        global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedVariable>.Free(__variables_native__nativeSpan____i0_exactType);
                    }
                }
    
                __variables_native__marshaller.Free();
            }
    
            return __retVal;
        }
    }

    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.ComInterfaceGenerator", "11.0.14.22804")]
    [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
    int global::Microsoft.DiaSymReader.ISymUnmanagedReader2.GetMethodFromDocumentPosition(global::Microsoft.DiaSymReader.ISymUnmanagedDocument document, int line, int column, out global::Microsoft.DiaSymReader.ISymUnmanagedMethod method)
    {
        var(__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::Microsoft.DiaSymReader.ISymUnmanagedReader2));
        var __target = ((delegate* unmanaged[MemberFunction]<void*, void*, int, int, void**, int> )__vtable[10]);
        {
            bool __invokeSucceeded = default;
            method = default;
            void* __document_native = default;
            void* __method_native = default;
            int __retVal = default;
            try
            {
                // Marshal - Convert managed data to native data.
                __document_native = (void*)global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedDocument>.ConvertToUnmanaged(document);
                {
                    __retVal = __target(__this, __document_native, line, column, &__method_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.
                method = global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedMethod>.ConvertToManaged(__method_native);
            }
            finally
            {
                if (__invokeSucceeded)
                {
                    // CleanupCalleeAllocated - Perform cleanup of callee allocated resources.
                    global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedMethod>.Free(__method_native);
                }
    
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedDocument>.Free(__document_native);
            }
    
            return __retVal;
        }
    }

    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.ComInterfaceGenerator", "11.0.14.22804")]
    [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
    int global::Microsoft.DiaSymReader.ISymUnmanagedReader2.GetSymAttribute(int methodToken, string name, int bufferLength, out int count, byte[] customDebugInformation)
    {
        var(__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::Microsoft.DiaSymReader.ISymUnmanagedReader2));
        var __target = ((delegate* unmanaged[MemberFunction]<void*, int, ushort*, int, int*, byte*, int> )__vtable[11]);
        {
            count = default;
            int __retVal;
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (void* __customDebugInformation_native = &global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<byte, byte>.ManagedToUnmanagedIn.GetPinnableReference(customDebugInformation))
            fixed (int* __count_native = &count)
            fixed (void* __name_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(name))
            {
                __retVal = __target(__this, methodToken, (ushort*)__name_native, bufferLength, __count_native, (byte*)__customDebugInformation_native);
            }
    
            // NotifyForSuccessfulInvoke - Keep alive any managed objects that need to stay alive across the call.
            global::System.GC.KeepAlive(this);
            return __retVal;
        }
    }

    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.ComInterfaceGenerator", "11.0.14.22804")]
    [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
    int global::Microsoft.DiaSymReader.ISymUnmanagedReader2.GetNamespaces(int bufferLength, out int count, global::Microsoft.DiaSymReader.ISymUnmanagedNamespace[] namespaces)
    {
        var(__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::Microsoft.DiaSymReader.ISymUnmanagedReader2));
        var __target = ((delegate* unmanaged[MemberFunction]<void*, int, int*, global::System.IntPtr*, int> )__vtable[12]);
        {
            bool __invokeSucceeded = default;
            count = default;
            global::System.IntPtr* __namespaces_native = default;
            int __retVal = default;
            // Setup - Perform required setup.
            scoped global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedNamespace, global::System.IntPtr>.ManagedToUnmanagedIn __namespaces_native__marshaller = new();
            int __namespaces_native__numElements;
            global::System.Runtime.CompilerServices.Unsafe.SkipInit(out __namespaces_native__numElements);
            int __namespaces_native__lastIndexMarshalled = 0;
            try
            {
                // Marshal - Convert managed data to native data.
                __namespaces_native__marshaller.FromManaged(namespaces, stackalloc global::System.IntPtr[global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedNamespace, global::System.IntPtr>.ManagedToUnmanagedIn.BufferSize]);
                {
                    global::System.ReadOnlySpan<global::Microsoft.DiaSymReader.ISymUnmanagedNamespace> __namespaces_native__managedSpan = __namespaces_native__marshaller.GetManagedValuesSource();
                    global::System.Span<global::System.IntPtr> __namespaces_native__nativeSpan = __namespaces_native__marshaller.GetUnmanagedValuesDestination();
                    for (int __i0 = 0; __i0 < __namespaces_native__managedSpan.Length; ++__i0, ++__namespaces_native__lastIndexMarshalled)
                    {
                        void* __namespaces_native__nativeSpan____i0_exactType = (void*)__namespaces_native__nativeSpan[__i0];
                        __namespaces_native__nativeSpan____i0_exactType = (void*)global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedNamespace>.ConvertToUnmanaged(__namespaces_native__managedSpan[__i0]);
                        __namespaces_native__nativeSpan[__i0] = (global::System.IntPtr)__namespaces_native__nativeSpan____i0_exactType;
                    }
                }
    
                // Pin - Pin data in preparation for calling the P/Invoke.
                fixed (void* __namespaces_native__unused = __namespaces_native__marshaller)
                fixed (int* __count_native = &count)
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __namespaces_native = __namespaces_native__marshaller.ToUnmanaged();
                    __retVal = __target(__this, bufferLength, __count_native, __namespaces_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.
                {
                    __namespaces_native__numElements = __namespaces_native__marshaller.GetManagedValuesSource().Length;
                    global::System.Span<global::Microsoft.DiaSymReader.ISymUnmanagedNamespace> __namespaces_native__managedSpan = global::System.Runtime.InteropServices.MemoryMarshal.CreateSpan(ref global::System.Runtime.CompilerServices.Unsafe.AsRef(in __namespaces_native__marshaller.GetManagedValuesSource().GetPinnableReference()), __namespaces_native__numElements);
                    global::System.Span<global::System.IntPtr> __namespaces_native__nativeSpan = __namespaces_native__marshaller.GetUnmanagedValuesDestination();
                    for (int __i0 = 0; __i0 < __namespaces_native__managedSpan.Length; ++__i0)
                    {
                        void* __namespaces_native__nativeSpan____i0_exactType = (void*)__namespaces_native__nativeSpan[__i0];
                        __namespaces_native__managedSpan[__i0] = global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedNamespace>.ConvertToManaged(__namespaces_native__nativeSpan____i0_exactType);
                    }
                }
            }
            finally
            {
                if (__invokeSucceeded)
                {
                    // CleanupCalleeAllocated - Perform cleanup of callee allocated resources.
                    _ = __namespaces_native__lastIndexMarshalled;
                }
    
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                {
                    global::System.ReadOnlySpan<global::System.IntPtr> __namespaces_native__nativeSpan = __namespaces_native__marshaller.GetUnmanagedValuesDestination();
                    for (int __i0 = 0; __i0 < __namespaces_native__lastIndexMarshalled; ++__i0)
                    {
                        void* __namespaces_native__nativeSpan____i0_exactType = (void*)__namespaces_native__nativeSpan[__i0];
                        global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedNamespace>.Free(__namespaces_native__nativeSpan____i0_exactType);
                    }
                }
    
                __namespaces_native__marshaller.Free();
            }
    
            return __retVal;
        }
    }

    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.ComInterfaceGenerator", "11.0.14.22804")]
    [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
    int global::Microsoft.DiaSymReader.ISymUnmanagedReader2.Initialize(object metadataImporter, string fileName, string searchPath, global::System.Runtime.InteropServices.ComTypes.IStream stream)
    {
        var(__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::Microsoft.DiaSymReader.ISymUnmanagedReader2));
        var __target = ((delegate* unmanaged[MemberFunction]<void*, void*, ushort*, ushort*, nint, int> )__vtable[13]);
        {
            void* __metadataImporter_native = default;
            nint __stream_native = default;
            int __retVal = default;
            try
            {
                // Marshal - Convert managed data to native data.
                __stream_native = global::Microsoft.DiaSymReader.ComStreamWrapper.Marshaller.ConvertToUnmanaged(stream);
                __metadataImporter_native = (void*)global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<object>.ConvertToUnmanaged(metadataImporter);
                // Pin - Pin data in preparation for calling the P/Invoke.
                fixed (void* __searchPath_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(searchPath))
                fixed (void* __fileName_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(fileName))
                {
                    __retVal = __target(__this, __metadataImporter_native, (ushort*)__fileName_native, (ushort*)__searchPath_native, __stream_native);
                }
    
                // NotifyForSuccessfulInvoke - Keep alive any managed objects that need to stay alive across the call.
                global::System.GC.KeepAlive(this);
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                global::Microsoft.DiaSymReader.ComStreamWrapper.Marshaller.Free(__stream_native);
                global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<object>.Free(__metadataImporter_native);
            }
    
            return __retVal;
        }
    }

    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.ComInterfaceGenerator", "11.0.14.22804")]
    [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
    int global::Microsoft.DiaSymReader.ISymUnmanagedReader2.UpdateSymbolStore(string fileName, global::System.Runtime.InteropServices.ComTypes.IStream stream)
    {
        var(__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::Microsoft.DiaSymReader.ISymUnmanagedReader2));
        var __target = ((delegate* unmanaged[MemberFunction]<void*, ushort*, nint, int> )__vtable[14]);
        {
            nint __stream_native = default;
            int __retVal = default;
            try
            {
                // Marshal - Convert managed data to native data.
                __stream_native = global::Microsoft.DiaSymReader.ComStreamWrapper.Marshaller.ConvertToUnmanaged(stream);
                // Pin - Pin data in preparation for calling the P/Invoke.
                fixed (void* __fileName_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(fileName))
                {
                    __retVal = __target(__this, (ushort*)__fileName_native, __stream_native);
                }
    
                // NotifyForSuccessfulInvoke - Keep alive any managed objects that need to stay alive across the call.
                global::System.GC.KeepAlive(this);
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                global::Microsoft.DiaSymReader.ComStreamWrapper.Marshaller.Free(__stream_native);
            }
    
            return __retVal;
        }
    }

    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.ComInterfaceGenerator", "11.0.14.22804")]
    [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
    int global::Microsoft.DiaSymReader.ISymUnmanagedReader2.ReplaceSymbolStore(string fileName, global::System.Runtime.InteropServices.ComTypes.IStream stream)
    {
        var(__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::Microsoft.DiaSymReader.ISymUnmanagedReader2));
        var __target = ((delegate* unmanaged[MemberFunction]<void*, ushort*, nint, int> )__vtable[15]);
        {
            nint __stream_native = default;
            int __retVal = default;
            try
            {
                // Marshal - Convert managed data to native data.
                __stream_native = global::Microsoft.DiaSymReader.ComStreamWrapper.Marshaller.ConvertToUnmanaged(stream);
                // Pin - Pin data in preparation for calling the P/Invoke.
                fixed (void* __fileName_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(fileName))
                {
                    __retVal = __target(__this, (ushort*)__fileName_native, __stream_native);
                }
    
                // NotifyForSuccessfulInvoke - Keep alive any managed objects that need to stay alive across the call.
                global::System.GC.KeepAlive(this);
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                global::Microsoft.DiaSymReader.ComStreamWrapper.Marshaller.Free(__stream_native);
            }
    
            return __retVal;
        }
    }

    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.ComInterfaceGenerator", "11.0.14.22804")]
    [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
    int global::Microsoft.DiaSymReader.ISymUnmanagedReader2.GetSymbolStoreFileName(int bufferLength, out int count, char[] name)
    {
        var(__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::Microsoft.DiaSymReader.ISymUnmanagedReader2));
        var __target = ((delegate* unmanaged[MemberFunction]<void*, int, int*, char*, int> )__vtable[16]);
        {
            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.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.ComInterfaceGenerator", "11.0.14.22804")]
    [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
    int global::Microsoft.DiaSymReader.ISymUnmanagedReader2.GetMethodsFromDocumentPosition(global::Microsoft.DiaSymReader.ISymUnmanagedDocument document, int line, int column, int bufferLength, out int count, global::Microsoft.DiaSymReader.ISymUnmanagedMethod[] methods)
    {
        var(__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::Microsoft.DiaSymReader.ISymUnmanagedReader2));
        var __target = ((delegate* unmanaged[MemberFunction]<void*, void*, int, int, int, int*, global::System.IntPtr*, int> )__vtable[17]);
        {
            bool __invokeSucceeded = default;
            count = default;
            void* __document_native = default;
            global::System.IntPtr* __methods_native = default;
            int __retVal = default;
            // Setup - Perform required setup.
            scoped global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedMethod, global::System.IntPtr>.ManagedToUnmanagedIn __methods_native__marshaller = new();
            int __methods_native__numElements;
            global::System.Runtime.CompilerServices.Unsafe.SkipInit(out __methods_native__numElements);
            int __methods_native__lastIndexMarshalled = 0;
            try
            {
                // Marshal - Convert managed data to native data.
                __methods_native__marshaller.FromManaged(methods, stackalloc global::System.IntPtr[global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedMethod, global::System.IntPtr>.ManagedToUnmanagedIn.BufferSize]);
                {
                    global::System.ReadOnlySpan<global::Microsoft.DiaSymReader.ISymUnmanagedMethod> __methods_native__managedSpan = __methods_native__marshaller.GetManagedValuesSource();
                    global::System.Span<global::System.IntPtr> __methods_native__nativeSpan = __methods_native__marshaller.GetUnmanagedValuesDestination();
                    for (int __i0 = 0; __i0 < __methods_native__managedSpan.Length; ++__i0, ++__methods_native__lastIndexMarshalled)
                    {
                        void* __methods_native__nativeSpan____i0_exactType = (void*)__methods_native__nativeSpan[__i0];
                        __methods_native__nativeSpan____i0_exactType = (void*)global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedMethod>.ConvertToUnmanaged(__methods_native__managedSpan[__i0]);
                        __methods_native__nativeSpan[__i0] = (global::System.IntPtr)__methods_native__nativeSpan____i0_exactType;
                    }
                }
    
                __document_native = (void*)global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedDocument>.ConvertToUnmanaged(document);
                // Pin - Pin data in preparation for calling the P/Invoke.
                fixed (void* __methods_native__unused = __methods_native__marshaller)
                fixed (int* __count_native = &count)
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __methods_native = __methods_native__marshaller.ToUnmanaged();
                    __retVal = __target(__this, __document_native, line, column, bufferLength, __count_native, __methods_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.
                {
                    __methods_native__numElements = __methods_native__marshaller.GetManagedValuesSource().Length;
                    global::System.Span<global::Microsoft.DiaSymReader.ISymUnmanagedMethod> __methods_native__managedSpan = global::System.Runtime.InteropServices.MemoryMarshal.CreateSpan(ref global::System.Runtime.CompilerServices.Unsafe.AsRef(in __methods_native__marshaller.GetManagedValuesSource().GetPinnableReference()), __methods_native__numElements);
                    global::System.Span<global::System.IntPtr> __methods_native__nativeSpan = __methods_native__marshaller.GetUnmanagedValuesDestination();
                    for (int __i0 = 0; __i0 < __methods_native__managedSpan.Length; ++__i0)
                    {
                        void* __methods_native__nativeSpan____i0_exactType = (void*)__methods_native__nativeSpan[__i0];
                        __methods_native__managedSpan[__i0] = global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedMethod>.ConvertToManaged(__methods_native__nativeSpan____i0_exactType);
                    }
                }
            }
            finally
            {
                if (__invokeSucceeded)
                {
                    // CleanupCalleeAllocated - Perform cleanup of callee allocated resources.
                    _ = __methods_native__lastIndexMarshalled;
                }
    
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                {
                    global::System.ReadOnlySpan<global::System.IntPtr> __methods_native__nativeSpan = __methods_native__marshaller.GetUnmanagedValuesDestination();
                    for (int __i0 = 0; __i0 < __methods_native__lastIndexMarshalled; ++__i0)
                    {
                        void* __methods_native__nativeSpan____i0_exactType = (void*)__methods_native__nativeSpan[__i0];
                        global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedMethod>.Free(__methods_native__nativeSpan____i0_exactType);
                    }
                }
    
                __methods_native__marshaller.Free();
                global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedDocument>.Free(__document_native);
            }
    
            return __retVal;
        }
    }

    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.ComInterfaceGenerator", "11.0.14.22804")]
    [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
    int global::Microsoft.DiaSymReader.ISymUnmanagedReader2.GetDocumentVersion(global::Microsoft.DiaSymReader.ISymUnmanagedDocument document, out int version, out bool isCurrent)
    {
        var(__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::Microsoft.DiaSymReader.ISymUnmanagedReader2));
        var __target = ((delegate* unmanaged[MemberFunction]<void*, void*, int*, int*, int> )__vtable[18]);
        {
            version = default;
            isCurrent = default;
            void* __document_native = default;
            int __isCurrent_native = default;
            int __retVal = default;
            try
            {
                // Marshal - Convert managed data to native data.
                __document_native = (void*)global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedDocument>.ConvertToUnmanaged(document);
                // Pin - Pin data in preparation for calling the P/Invoke.
                fixed (int* __version_native = &version)
                {
                    __retVal = __target(__this, __document_native, __version_native, &__isCurrent_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.
                isCurrent = __isCurrent_native != 0;
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedDocument>.Free(__document_native);
            }
    
            return __retVal;
        }
    }

    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.ComInterfaceGenerator", "11.0.14.22804")]
    [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
    int global::Microsoft.DiaSymReader.ISymUnmanagedReader2.GetMethodVersion(global::Microsoft.DiaSymReader.ISymUnmanagedMethod method, out int version)
    {
        var(__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::Microsoft.DiaSymReader.ISymUnmanagedReader2));
        var __target = ((delegate* unmanaged[MemberFunction]<void*, void*, int*, int> )__vtable[19]);
        {
            version = default;
            void* __method_native = default;
            int __retVal = default;
            try
            {
                // Marshal - Convert managed data to native data.
                __method_native = (void*)global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedMethod>.ConvertToUnmanaged(method);
                // Pin - Pin data in preparation for calling the P/Invoke.
                fixed (int* __version_native = &version)
                {
                    __retVal = __target(__this, __method_native, __version_native);
                }
    
                // NotifyForSuccessfulInvoke - Keep alive any managed objects that need to stay alive across the call.
                global::System.GC.KeepAlive(this);
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                global::System.Runtime.InteropServices.Marshalling.ComInterfaceMarshaller<global::Microsoft.DiaSymReader.ISymUnmanagedMethod>.Free(__method_native);
            }
    
            return __retVal;
        }
    }

    int global::Microsoft.DiaSymReader.ISymUnmanagedReader.GetDocument(string url, global::System.Guid language, global::System.Guid languageVendor, global::System.Guid documentType, out global::Microsoft.DiaSymReader.ISymUnmanagedDocument document) => throw new global::System.Diagnostics.UnreachableException();

    int global::Microsoft.DiaSymReader.ISymUnmanagedReader.GetDocuments(int bufferLength, out int count, global::Microsoft.DiaSymReader.ISymUnmanagedDocument[] documents) => throw new global::System.Diagnostics.UnreachableException();

    int global::Microsoft.DiaSymReader.ISymUnmanagedReader.GetUserEntryPoint(out int methodToken) => throw new global::System.Diagnostics.UnreachableException();

    int global::Microsoft.DiaSymReader.ISymUnmanagedReader.GetMethod(int methodToken, out global::Microsoft.DiaSymReader.ISymUnmanagedMethod method) => throw new global::System.Diagnostics.UnreachableException();

    int global::Microsoft.DiaSymReader.ISymUnmanagedReader.GetMethodByVersion(int methodToken, int version, out global::Microsoft.DiaSymReader.ISymUnmanagedMethod method) => throw new global::System.Diagnostics.UnreachableException();

    int global::Microsoft.DiaSymReader.ISymUnmanagedReader.GetVariables(int methodToken, int bufferLength, out int count, global::Microsoft.DiaSymReader.ISymUnmanagedVariable[] variables) => throw new global::System.Diagnostics.UnreachableException();

    int global::Microsoft.DiaSymReader.ISymUnmanagedReader.GetGlobalVariables(int bufferLength, out int count, global::Microsoft.DiaSymReader.ISymUnmanagedVariable[] variables) => throw new global::System.Diagnostics.UnreachableException();

    int global::Microsoft.DiaSymReader.ISymUnmanagedReader.GetMethodFromDocumentPosition(global::Microsoft.DiaSymReader.ISymUnmanagedDocument document, int line, int column, out global::Microsoft.DiaSymReader.ISymUnmanagedMethod method) => throw new global::System.Diagnostics.UnreachableException();

    int global::Microsoft.DiaSymReader.ISymUnmanagedReader.GetSymAttribute(int methodToken, string name, int bufferLength, out int count, byte[] customDebugInformation) => throw new global::System.Diagnostics.UnreachableException();

    int global::Microsoft.DiaSymReader.ISymUnmanagedReader.GetNamespaces(int bufferLength, out int count, global::Microsoft.DiaSymReader.ISymUnmanagedNamespace[] namespaces) => throw new global::System.Diagnostics.UnreachableException();

    int global::Microsoft.DiaSymReader.ISymUnmanagedReader.Initialize(object metadataImporter, string fileName, string searchPath, global::System.Runtime.InteropServices.ComTypes.IStream stream) => throw new global::System.Diagnostics.UnreachableException();

    int global::Microsoft.DiaSymReader.ISymUnmanagedReader.UpdateSymbolStore(string fileName, global::System.Runtime.InteropServices.ComTypes.IStream stream) => throw new global::System.Diagnostics.UnreachableException();

    int global::Microsoft.DiaSymReader.ISymUnmanagedReader.ReplaceSymbolStore(string fileName, global::System.Runtime.InteropServices.ComTypes.IStream stream) => throw new global::System.Diagnostics.UnreachableException();

    int global::Microsoft.DiaSymReader.ISymUnmanagedReader.GetSymbolStoreFileName(int bufferLength, out int count, char[] name) => throw new global::System.Diagnostics.UnreachableException();

    int global::Microsoft.DiaSymReader.ISymUnmanagedReader.GetMethodsFromDocumentPosition(global::Microsoft.DiaSymReader.ISymUnmanagedDocument document, int line, int column, int bufferLength, out int count, global::Microsoft.DiaSymReader.ISymUnmanagedMethod[] methods) => throw new global::System.Diagnostics.UnreachableException();

    int global::Microsoft.DiaSymReader.ISymUnmanagedReader.GetDocumentVersion(global::Microsoft.DiaSymReader.ISymUnmanagedDocument document, out int version, out bool isCurrent) => throw new global::System.Diagnostics.UnreachableException();

    int global::Microsoft.DiaSymReader.ISymUnmanagedReader.GetMethodVersion(global::Microsoft.DiaSymReader.ISymUnmanagedMethod method, out int version) => throw new global::System.Diagnostics.UnreachableException();
}

namespace Microsoft.DiaSymReader
{
    [global::System.Runtime.InteropServices.Marshalling.IUnknownDerivedAttribute<InterfaceInformation, InterfaceImplementation>]
    public unsafe partial interface ISymUnmanagedReader2
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.ComInterfaceGenerator", "11.0.14.22804")]
        [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
        [global::System.Runtime.InteropServices.PreserveSigAttribute()]
        new int GetDocument(string url, global::System.Guid language, global::System.Guid languageVendor, global::System.Guid documentType, out global::Microsoft.DiaSymReader.ISymUnmanagedDocument document) => ((global::Microsoft.DiaSymReader.ISymUnmanagedReader)this).GetDocument(url, language, languageVendor, documentType, out document);
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.ComInterfaceGenerator", "11.0.14.22804")]
        [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
        [global::System.Runtime.InteropServices.PreserveSigAttribute()]
        new int GetDocuments(int bufferLength, out int count, global::Microsoft.DiaSymReader.ISymUnmanagedDocument[] documents) => ((global::Microsoft.DiaSymReader.ISymUnmanagedReader)this).GetDocuments(bufferLength, out count, documents);
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.ComInterfaceGenerator", "11.0.14.22804")]
        [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
        [global::System.Runtime.InteropServices.PreserveSigAttribute()]
        new int GetUserEntryPoint(out int methodToken) => ((global::Microsoft.DiaSymReader.ISymUnmanagedReader)this).GetUserEntryPoint(out methodToken);
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.ComInterfaceGenerator", "11.0.14.22804")]
        [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
        [global::System.Runtime.InteropServices.PreserveSigAttribute()]
        new int GetMethod(int methodToken, out global::Microsoft.DiaSymReader.ISymUnmanagedMethod method) => ((global::Microsoft.DiaSymReader.ISymUnmanagedReader)this).GetMethod(methodToken, out method);
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.ComInterfaceGenerator", "11.0.14.22804")]
        [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
        [global::System.Runtime.InteropServices.PreserveSigAttribute()]
        new int GetMethodByVersion(int methodToken, int version, out global::Microsoft.DiaSymReader.ISymUnmanagedMethod method) => ((global::Microsoft.DiaSymReader.ISymUnmanagedReader)this).GetMethodByVersion(methodToken, version, out method);
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.ComInterfaceGenerator", "11.0.14.22804")]
        [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
        [global::System.Runtime.InteropServices.PreserveSigAttribute()]
        new int GetVariables(int methodToken, int bufferLength, out int count, global::Microsoft.DiaSymReader.ISymUnmanagedVariable[] variables) => ((global::Microsoft.DiaSymReader.ISymUnmanagedReader)this).GetVariables(methodToken, bufferLength, out count, variables);
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.ComInterfaceGenerator", "11.0.14.22804")]
        [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
        [global::System.Runtime.InteropServices.PreserveSigAttribute()]
        new int GetGlobalVariables(int bufferLength, out int count, global::Microsoft.DiaSymReader.ISymUnmanagedVariable[] variables) => ((global::Microsoft.DiaSymReader.ISymUnmanagedReader)this).GetGlobalVariables(bufferLength, out count, variables);
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.ComInterfaceGenerator", "11.0.14.22804")]
        [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
        [global::System.Runtime.InteropServices.PreserveSigAttribute()]
        new int GetMethodFromDocumentPosition(global::Microsoft.DiaSymReader.ISymUnmanagedDocument document, int line, int column, out global::Microsoft.DiaSymReader.ISymUnmanagedMethod method) => ((global::Microsoft.DiaSymReader.ISymUnmanagedReader)this).GetMethodFromDocumentPosition(document, line, column, out method);
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.ComInterfaceGenerator", "11.0.14.22804")]
        [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
        [global::System.Runtime.InteropServices.PreserveSigAttribute()]
        new int GetSymAttribute(int methodToken, string name, int bufferLength, out int count, byte[] customDebugInformation) => ((global::Microsoft.DiaSymReader.ISymUnmanagedReader)this).GetSymAttribute(methodToken, name, bufferLength, out count, customDebugInformation);
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.ComInterfaceGenerator", "11.0.14.22804")]
        [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
        [global::System.Runtime.InteropServices.PreserveSigAttribute()]
        new int GetNamespaces(int bufferLength, out int count, global::Microsoft.DiaSymReader.ISymUnmanagedNamespace[] namespaces) => ((global::Microsoft.DiaSymReader.ISymUnmanagedReader)this).GetNamespaces(bufferLength, out count, namespaces);
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.ComInterfaceGenerator", "11.0.14.22804")]
        [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
        [global::System.Runtime.InteropServices.PreserveSigAttribute()]
        new int Initialize(object metadataImporter, string fileName, string searchPath, global::System.Runtime.InteropServices.ComTypes.IStream stream) => ((global::Microsoft.DiaSymReader.ISymUnmanagedReader)this).Initialize(metadataImporter, fileName, searchPath, stream);
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.ComInterfaceGenerator", "11.0.14.22804")]
        [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
        [global::System.Runtime.InteropServices.PreserveSigAttribute()]
        new int UpdateSymbolStore(string fileName, global::System.Runtime.InteropServices.ComTypes.IStream stream) => ((global::Microsoft.DiaSymReader.ISymUnmanagedReader)this).UpdateSymbolStore(fileName, stream);
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.ComInterfaceGenerator", "11.0.14.22804")]
        [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
        [global::System.Runtime.InteropServices.PreserveSigAttribute()]
        new int ReplaceSymbolStore(string fileName, global::System.Runtime.InteropServices.ComTypes.IStream stream) => ((global::Microsoft.DiaSymReader.ISymUnmanagedReader)this).ReplaceSymbolStore(fileName, stream);
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.ComInterfaceGenerator", "11.0.14.22804")]
        [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
        [global::System.Runtime.InteropServices.PreserveSigAttribute()]
        new int GetSymbolStoreFileName(int bufferLength, out int count, char[] name) => ((global::Microsoft.DiaSymReader.ISymUnmanagedReader)this).GetSymbolStoreFileName(bufferLength, out count, name);
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.ComInterfaceGenerator", "11.0.14.22804")]
        [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
        [global::System.Runtime.InteropServices.PreserveSigAttribute()]
        new int GetMethodsFromDocumentPosition(global::Microsoft.DiaSymReader.ISymUnmanagedDocument document, int line, int column, int bufferLength, out int count, global::Microsoft.DiaSymReader.ISymUnmanagedMethod[] methods) => ((global::Microsoft.DiaSymReader.ISymUnmanagedReader)this).GetMethodsFromDocumentPosition(document, line, column, bufferLength, out count, methods);
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.ComInterfaceGenerator", "11.0.14.22804")]
        [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
        [global::System.Runtime.InteropServices.PreserveSigAttribute()]
        new int GetDocumentVersion(global::Microsoft.DiaSymReader.ISymUnmanagedDocument document, out int version, out bool isCurrent) => ((global::Microsoft.DiaSymReader.ISymUnmanagedReader)this).GetDocumentVersion(document, out version, out isCurrent);
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.ComInterfaceGenerator", "11.0.14.22804")]
        [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
        [global::System.Runtime.InteropServices.PreserveSigAttribute()]
        new int GetMethodVersion(global::Microsoft.DiaSymReader.ISymUnmanagedMethod method, out int version) => ((global::Microsoft.DiaSymReader.ISymUnmanagedReader)this).GetMethodVersion(method, out version);
    }
}