File: Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\Microsoft.DiaSymReader.IUnsafeComStream.cs
Project: Microsoft.DiaSymReader.csproj (Microsoft.DiaSymReader)
// <auto-generated />
#pragma warning disable CS0612, CS0618, CS0649, CS1591
 
[global::System.Runtime.InteropServices.StructLayoutAttribute(global::System.Runtime.InteropServices.LayoutKind.Sequential)]
file struct InterfaceImplementationVtable
{
    public unsafe delegate* unmanaged[MemberFunction]<void*, global::System.Guid*, void**, int> QueryInterface_0;
    public unsafe delegate* unmanaged[MemberFunction]<void*, uint> AddRef_1;
    public unsafe delegate* unmanaged[MemberFunction]<void*, uint> Release_2;
    public unsafe delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, byte*, int, int*, int> Read_3;
    public unsafe delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, byte*, int, int*, int> Write_4;
    public unsafe delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, long, int, long*, int> Seek_5;
    public unsafe delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, long, int> SetSize_6;
    public unsafe delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, nint, long, int*, int*, int> CopyTo_7;
    public unsafe delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, int, int> Commit_8;
    public unsafe delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, int> Revert_9;
    public unsafe delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, long, long, int, int> LockRegion_10;
    public unsafe delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, long, long, int, int> UnlockRegion_11;
    public unsafe delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, global::Microsoft.DiaSymReader.NativeSTATSTG*, int, int> Stat_12;
    public unsafe delegate* unmanaged[MemberFunction]<global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch*, nint*, int> Clone_13;
}
 
file sealed class InterfaceInformation : global::System.Runtime.InteropServices.Marshalling.IIUnknownInterfaceType
{
    public static global::System.Guid Iid { get; } = new([12, 0, 0, 0, 0, 0, 0, 0, 192, 0, 0, 0, 0, 0, 0, 70]);
    public static unsafe void** ManagedVirtualMethodTable
    {
        get
        {
            unsafe
            {
                return (void**)global::System.Runtime.CompilerServices.Unsafe.AsPointer(in InterfaceImplementation.Vtable);
            }
        }
    }
}
 
[global::System.Runtime.InteropServices.DynamicInterfaceCastableImplementationAttribute]
file unsafe interface InterfaceImplementation : global::Microsoft.DiaSymReader.IUnsafeComStream
{
    [global::System.Runtime.CompilerServices.FixedAddressValueTypeAttribute]
    public static readonly InterfaceImplementationVtable Vtable;
 
    static InterfaceImplementation()
    {
        unsafe
        {
            global::System.Runtime.InteropServices.ComWrappers.GetIUnknownImpl(
                out *(nint*)&((InterfaceImplementationVtable*)global::System.Runtime.CompilerServices.Unsafe.AsPointer(ref Vtable))->QueryInterface_0,
                out *(nint*)&((InterfaceImplementationVtable*)global::System.Runtime.CompilerServices.Unsafe.AsPointer(ref Vtable))->AddRef_1,
                out *(nint*)&((InterfaceImplementationVtable*)global::System.Runtime.CompilerServices.Unsafe.AsPointer(ref Vtable))->Release_2);
 
            Vtable.Read_3 = &ABI_Read;
            Vtable.Write_4 = &ABI_Write;
            Vtable.Seek_5 = &ABI_Seek;
            Vtable.SetSize_6 = &ABI_SetSize;
            Vtable.CopyTo_7 = &ABI_CopyTo;
            Vtable.Commit_8 = &ABI_Commit;
            Vtable.Revert_9 = &ABI_Revert;
            Vtable.LockRegion_10 = &ABI_LockRegion;
            Vtable.UnlockRegion_11 = &ABI_UnlockRegion;
            Vtable.Stat_12 = &ABI_Stat;
            Vtable.Clone_13 = &ABI_Clone;
        }
    }
 
    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.ComInterfaceGenerator", "12.0.14.48102")]
    [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
    void global::Microsoft.DiaSymReader.IUnsafeComStream.Read(byte* pv, int cb, int* pcbRead)
    {
        unsafe
        {
            var (__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::Microsoft.DiaSymReader.IUnsafeComStream));
            var __target = ((delegate* unmanaged[MemberFunction]<void*, byte*, int, int*, int>)__vtable[3]);
            {
                int __invokeRetVal;
                {
                    __invokeRetVal = __target(__this, pv, cb, pcbRead);
                }
                // NotifyForSuccessfulInvoke - Keep alive any managed objects that need to stay alive across the call.
                global::System.GC.KeepAlive(this);
                // Unmarshal - Convert native data to managed data.
                global::System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(__invokeRetVal, new([12, 0, 0, 0, 0, 0, 0, 0, 192, 0, 0, 0, 0, 0, 0, 70]), (nint)__this);
            }
        }
    }
 
    [global::System.Runtime.InteropServices.UnmanagedCallersOnlyAttribute(CallConvs = new[] { typeof(global::System.Runtime.CompilerServices.CallConvMemberFunction) })]
    internal static unsafe int ABI_Read(global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native, byte* pv, int cb, int* pcbRead)
    {
        unsafe
        {
            global::Microsoft.DiaSymReader.IUnsafeComStream @this = default;
            int __retVal = default;
            try
            {
                // Unmarshal - Convert native data to managed data.
                __retVal = 0; // S_OK
                @this = global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch.GetInstance<global::Microsoft.DiaSymReader.IUnsafeComStream>(__this_native);
                @this.Read(pv, cb, pcbRead);
            }
            catch (global::System.Exception __exception)
            {
                __retVal = global::System.Runtime.InteropServices.Marshalling.ExceptionAsHResultMarshaller<int>.ConvertToUnmanaged(__exception);
            }
            return __retVal;
        }
    }
 
    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.ComInterfaceGenerator", "12.0.14.48102")]
    [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
    void global::Microsoft.DiaSymReader.IUnsafeComStream.Write(byte* pv, int cb, int* pcbWritten)
    {
        unsafe
        {
            var (__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::Microsoft.DiaSymReader.IUnsafeComStream));
            var __target = ((delegate* unmanaged[MemberFunction]<void*, byte*, int, int*, int>)__vtable[4]);
            {
                int __invokeRetVal;
                {
                    __invokeRetVal = __target(__this, pv, cb, pcbWritten);
                }
                // NotifyForSuccessfulInvoke - Keep alive any managed objects that need to stay alive across the call.
                global::System.GC.KeepAlive(this);
                // Unmarshal - Convert native data to managed data.
                global::System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(__invokeRetVal, new([12, 0, 0, 0, 0, 0, 0, 0, 192, 0, 0, 0, 0, 0, 0, 70]), (nint)__this);
            }
        }
    }
 
    [global::System.Runtime.InteropServices.UnmanagedCallersOnlyAttribute(CallConvs = new[] { typeof(global::System.Runtime.CompilerServices.CallConvMemberFunction) })]
    internal static unsafe int ABI_Write(global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native, byte* pv, int cb, int* pcbWritten)
    {
        unsafe
        {
            global::Microsoft.DiaSymReader.IUnsafeComStream @this = default;
            int __retVal = default;
            try
            {
                // Unmarshal - Convert native data to managed data.
                __retVal = 0; // S_OK
                @this = global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch.GetInstance<global::Microsoft.DiaSymReader.IUnsafeComStream>(__this_native);
                @this.Write(pv, cb, pcbWritten);
            }
            catch (global::System.Exception __exception)
            {
                __retVal = global::System.Runtime.InteropServices.Marshalling.ExceptionAsHResultMarshaller<int>.ConvertToUnmanaged(__exception);
            }
            return __retVal;
        }
    }
 
    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.ComInterfaceGenerator", "12.0.14.48102")]
    [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
    void global::Microsoft.DiaSymReader.IUnsafeComStream.Seek(long dlibMove, int dwOrigin, long* plibNewPosition)
    {
        unsafe
        {
            var (__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::Microsoft.DiaSymReader.IUnsafeComStream));
            var __target = ((delegate* unmanaged[MemberFunction]<void*, long, int, long*, int>)__vtable[5]);
            {
                int __invokeRetVal;
                {
                    __invokeRetVal = __target(__this, dlibMove, dwOrigin, plibNewPosition);
                }
                // NotifyForSuccessfulInvoke - Keep alive any managed objects that need to stay alive across the call.
                global::System.GC.KeepAlive(this);
                // Unmarshal - Convert native data to managed data.
                global::System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(__invokeRetVal, new([12, 0, 0, 0, 0, 0, 0, 0, 192, 0, 0, 0, 0, 0, 0, 70]), (nint)__this);
            }
        }
    }
 
    [global::System.Runtime.InteropServices.UnmanagedCallersOnlyAttribute(CallConvs = new[] { typeof(global::System.Runtime.CompilerServices.CallConvMemberFunction) })]
    internal static unsafe int ABI_Seek(global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native, long dlibMove, int dwOrigin, long* plibNewPosition)
    {
        unsafe
        {
            global::Microsoft.DiaSymReader.IUnsafeComStream @this = default;
            int __retVal = default;
            try
            {
                // Unmarshal - Convert native data to managed data.
                __retVal = 0; // S_OK
                @this = global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch.GetInstance<global::Microsoft.DiaSymReader.IUnsafeComStream>(__this_native);
                @this.Seek(dlibMove, dwOrigin, plibNewPosition);
            }
            catch (global::System.Exception __exception)
            {
                __retVal = global::System.Runtime.InteropServices.Marshalling.ExceptionAsHResultMarshaller<int>.ConvertToUnmanaged(__exception);
            }
            return __retVal;
        }
    }
 
    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.ComInterfaceGenerator", "12.0.14.48102")]
    [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
    void global::Microsoft.DiaSymReader.IUnsafeComStream.SetSize(long libNewSize)
    {
        unsafe
        {
            var (__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::Microsoft.DiaSymReader.IUnsafeComStream));
            var __target = ((delegate* unmanaged[MemberFunction]<void*, long, int>)__vtable[6]);
            {
                int __invokeRetVal;
                {
                    __invokeRetVal = __target(__this, libNewSize);
                }
                // NotifyForSuccessfulInvoke - Keep alive any managed objects that need to stay alive across the call.
                global::System.GC.KeepAlive(this);
                // Unmarshal - Convert native data to managed data.
                global::System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(__invokeRetVal, new([12, 0, 0, 0, 0, 0, 0, 0, 192, 0, 0, 0, 0, 0, 0, 70]), (nint)__this);
            }
        }
    }
 
    [global::System.Runtime.InteropServices.UnmanagedCallersOnlyAttribute(CallConvs = new[] { typeof(global::System.Runtime.CompilerServices.CallConvMemberFunction) })]
    internal static unsafe int ABI_SetSize(global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native, long libNewSize)
    {
        unsafe
        {
            global::Microsoft.DiaSymReader.IUnsafeComStream @this = default;
            int __retVal = default;
            try
            {
                // Unmarshal - Convert native data to managed data.
                __retVal = 0; // S_OK
                @this = global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch.GetInstance<global::Microsoft.DiaSymReader.IUnsafeComStream>(__this_native);
                @this.SetSize(libNewSize);
            }
            catch (global::System.Exception __exception)
            {
                __retVal = global::System.Runtime.InteropServices.Marshalling.ExceptionAsHResultMarshaller<int>.ConvertToUnmanaged(__exception);
            }
            return __retVal;
        }
    }
 
    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.ComInterfaceGenerator", "12.0.14.48102")]
    [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
    void global::Microsoft.DiaSymReader.IUnsafeComStream.CopyTo(nint pstm, long cb, int* pcbRead, int* pcbWritten)
    {
        unsafe
        {
            var (__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::Microsoft.DiaSymReader.IUnsafeComStream));
            var __target = ((delegate* unmanaged[MemberFunction]<void*, nint, long, int*, int*, int>)__vtable[7]);
            {
                int __invokeRetVal;
                {
                    __invokeRetVal = __target(__this, pstm, cb, pcbRead, pcbWritten);
                }
                // NotifyForSuccessfulInvoke - Keep alive any managed objects that need to stay alive across the call.
                global::System.GC.KeepAlive(this);
                // Unmarshal - Convert native data to managed data.
                global::System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(__invokeRetVal, new([12, 0, 0, 0, 0, 0, 0, 0, 192, 0, 0, 0, 0, 0, 0, 70]), (nint)__this);
            }
        }
    }
 
    [global::System.Runtime.InteropServices.UnmanagedCallersOnlyAttribute(CallConvs = new[] { typeof(global::System.Runtime.CompilerServices.CallConvMemberFunction) })]
    internal static unsafe int ABI_CopyTo(global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native, nint pstm, long cb, int* pcbRead, int* pcbWritten)
    {
        unsafe
        {
            global::Microsoft.DiaSymReader.IUnsafeComStream @this = default;
            int __retVal = default;
            try
            {
                // Unmarshal - Convert native data to managed data.
                __retVal = 0; // S_OK
                @this = global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch.GetInstance<global::Microsoft.DiaSymReader.IUnsafeComStream>(__this_native);
                @this.CopyTo(pstm, cb, pcbRead, pcbWritten);
            }
            catch (global::System.Exception __exception)
            {
                __retVal = global::System.Runtime.InteropServices.Marshalling.ExceptionAsHResultMarshaller<int>.ConvertToUnmanaged(__exception);
            }
            return __retVal;
        }
    }
 
    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.ComInterfaceGenerator", "12.0.14.48102")]
    [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
    void global::Microsoft.DiaSymReader.IUnsafeComStream.Commit(int grfCommitFlags)
    {
        unsafe
        {
            var (__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::Microsoft.DiaSymReader.IUnsafeComStream));
            var __target = ((delegate* unmanaged[MemberFunction]<void*, int, int>)__vtable[8]);
            {
                int __invokeRetVal;
                {
                    __invokeRetVal = __target(__this, grfCommitFlags);
                }
                // NotifyForSuccessfulInvoke - Keep alive any managed objects that need to stay alive across the call.
                global::System.GC.KeepAlive(this);
                // Unmarshal - Convert native data to managed data.
                global::System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(__invokeRetVal, new([12, 0, 0, 0, 0, 0, 0, 0, 192, 0, 0, 0, 0, 0, 0, 70]), (nint)__this);
            }
        }
    }
 
    [global::System.Runtime.InteropServices.UnmanagedCallersOnlyAttribute(CallConvs = new[] { typeof(global::System.Runtime.CompilerServices.CallConvMemberFunction) })]
    internal static unsafe int ABI_Commit(global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native, int grfCommitFlags)
    {
        unsafe
        {
            global::Microsoft.DiaSymReader.IUnsafeComStream @this = default;
            int __retVal = default;
            try
            {
                // Unmarshal - Convert native data to managed data.
                __retVal = 0; // S_OK
                @this = global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch.GetInstance<global::Microsoft.DiaSymReader.IUnsafeComStream>(__this_native);
                @this.Commit(grfCommitFlags);
            }
            catch (global::System.Exception __exception)
            {
                __retVal = global::System.Runtime.InteropServices.Marshalling.ExceptionAsHResultMarshaller<int>.ConvertToUnmanaged(__exception);
            }
            return __retVal;
        }
    }
 
    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.ComInterfaceGenerator", "12.0.14.48102")]
    [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
    void global::Microsoft.DiaSymReader.IUnsafeComStream.Revert()
    {
        unsafe
        {
            var (__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::Microsoft.DiaSymReader.IUnsafeComStream));
            var __target = ((delegate* unmanaged[MemberFunction]<void*, int>)__vtable[9]);
            {
                int __invokeRetVal;
                {
                    __invokeRetVal = __target(__this);
                }
                // NotifyForSuccessfulInvoke - Keep alive any managed objects that need to stay alive across the call.
                global::System.GC.KeepAlive(this);
                // Unmarshal - Convert native data to managed data.
                global::System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(__invokeRetVal, new([12, 0, 0, 0, 0, 0, 0, 0, 192, 0, 0, 0, 0, 0, 0, 70]), (nint)__this);
            }
        }
    }
 
    [global::System.Runtime.InteropServices.UnmanagedCallersOnlyAttribute(CallConvs = new[] { typeof(global::System.Runtime.CompilerServices.CallConvMemberFunction) })]
    internal static unsafe int ABI_Revert(global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native)
    {
        unsafe
        {
            global::Microsoft.DiaSymReader.IUnsafeComStream @this = default;
            int __retVal = default;
            try
            {
                // Unmarshal - Convert native data to managed data.
                __retVal = 0; // S_OK
                @this = global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch.GetInstance<global::Microsoft.DiaSymReader.IUnsafeComStream>(__this_native);
                @this.Revert();
            }
            catch (global::System.Exception __exception)
            {
                __retVal = global::System.Runtime.InteropServices.Marshalling.ExceptionAsHResultMarshaller<int>.ConvertToUnmanaged(__exception);
            }
            return __retVal;
        }
    }
 
    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.ComInterfaceGenerator", "12.0.14.48102")]
    [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
    void global::Microsoft.DiaSymReader.IUnsafeComStream.LockRegion(long libOffset, long cb, int dwLockType)
    {
        unsafe
        {
            var (__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::Microsoft.DiaSymReader.IUnsafeComStream));
            var __target = ((delegate* unmanaged[MemberFunction]<void*, long, long, int, int>)__vtable[10]);
            {
                int __invokeRetVal;
                {
                    __invokeRetVal = __target(__this, libOffset, cb, dwLockType);
                }
                // NotifyForSuccessfulInvoke - Keep alive any managed objects that need to stay alive across the call.
                global::System.GC.KeepAlive(this);
                // Unmarshal - Convert native data to managed data.
                global::System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(__invokeRetVal, new([12, 0, 0, 0, 0, 0, 0, 0, 192, 0, 0, 0, 0, 0, 0, 70]), (nint)__this);
            }
        }
    }
 
    [global::System.Runtime.InteropServices.UnmanagedCallersOnlyAttribute(CallConvs = new[] { typeof(global::System.Runtime.CompilerServices.CallConvMemberFunction) })]
    internal static unsafe int ABI_LockRegion(global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native, long libOffset, long cb, int dwLockType)
    {
        unsafe
        {
            global::Microsoft.DiaSymReader.IUnsafeComStream @this = default;
            int __retVal = default;
            try
            {
                // Unmarshal - Convert native data to managed data.
                __retVal = 0; // S_OK
                @this = global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch.GetInstance<global::Microsoft.DiaSymReader.IUnsafeComStream>(__this_native);
                @this.LockRegion(libOffset, cb, dwLockType);
            }
            catch (global::System.Exception __exception)
            {
                __retVal = global::System.Runtime.InteropServices.Marshalling.ExceptionAsHResultMarshaller<int>.ConvertToUnmanaged(__exception);
            }
            return __retVal;
        }
    }
 
    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.ComInterfaceGenerator", "12.0.14.48102")]
    [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
    void global::Microsoft.DiaSymReader.IUnsafeComStream.UnlockRegion(long libOffset, long cb, int dwLockType)
    {
        unsafe
        {
            var (__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::Microsoft.DiaSymReader.IUnsafeComStream));
            var __target = ((delegate* unmanaged[MemberFunction]<void*, long, long, int, int>)__vtable[11]);
            {
                int __invokeRetVal;
                {
                    __invokeRetVal = __target(__this, libOffset, cb, dwLockType);
                }
                // NotifyForSuccessfulInvoke - Keep alive any managed objects that need to stay alive across the call.
                global::System.GC.KeepAlive(this);
                // Unmarshal - Convert native data to managed data.
                global::System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(__invokeRetVal, new([12, 0, 0, 0, 0, 0, 0, 0, 192, 0, 0, 0, 0, 0, 0, 70]), (nint)__this);
            }
        }
    }
 
    [global::System.Runtime.InteropServices.UnmanagedCallersOnlyAttribute(CallConvs = new[] { typeof(global::System.Runtime.CompilerServices.CallConvMemberFunction) })]
    internal static unsafe int ABI_UnlockRegion(global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native, long libOffset, long cb, int dwLockType)
    {
        unsafe
        {
            global::Microsoft.DiaSymReader.IUnsafeComStream @this = default;
            int __retVal = default;
            try
            {
                // Unmarshal - Convert native data to managed data.
                __retVal = 0; // S_OK
                @this = global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch.GetInstance<global::Microsoft.DiaSymReader.IUnsafeComStream>(__this_native);
                @this.UnlockRegion(libOffset, cb, dwLockType);
            }
            catch (global::System.Exception __exception)
            {
                __retVal = global::System.Runtime.InteropServices.Marshalling.ExceptionAsHResultMarshaller<int>.ConvertToUnmanaged(__exception);
            }
            return __retVal;
        }
    }
 
    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.ComInterfaceGenerator", "12.0.14.48102")]
    [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
    void global::Microsoft.DiaSymReader.IUnsafeComStream.Stat(ref global::Microsoft.DiaSymReader.NativeSTATSTG pstatstg, int grfStatFlag)
    {
        unsafe
        {
            var (__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::Microsoft.DiaSymReader.IUnsafeComStream));
            var __target = ((delegate* unmanaged[MemberFunction]<void*, global::Microsoft.DiaSymReader.NativeSTATSTG*, int, int>)__vtable[12]);
            {
                int __invokeRetVal;
                // Pin - Pin data in preparation for calling the P/Invoke.
                fixed (global::Microsoft.DiaSymReader.NativeSTATSTG* __pstatstg_native = &pstatstg)
                {
                    __invokeRetVal = __target(__this, __pstatstg_native, grfStatFlag);
                }
                // NotifyForSuccessfulInvoke - Keep alive any managed objects that need to stay alive across the call.
                global::System.GC.KeepAlive(this);
                // Unmarshal - Convert native data to managed data.
                global::System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(__invokeRetVal, new([12, 0, 0, 0, 0, 0, 0, 0, 192, 0, 0, 0, 0, 0, 0, 70]), (nint)__this);
            }
        }
    }
 
    [global::System.Runtime.InteropServices.UnmanagedCallersOnlyAttribute(CallConvs = new[] { typeof(global::System.Runtime.CompilerServices.CallConvMemberFunction) })]
    internal static unsafe int ABI_Stat(global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native, global::Microsoft.DiaSymReader.NativeSTATSTG* __pstatstg_native__param, int grfStatFlag)
    {
        unsafe
        {
            global::Microsoft.DiaSymReader.IUnsafeComStream @this = default;
            ref global::Microsoft.DiaSymReader.NativeSTATSTG __pstatstg_native = ref *__pstatstg_native__param;
            global::Microsoft.DiaSymReader.NativeSTATSTG pstatstg = default;
            int __retVal = default;
            try
            {
                // Unmarshal - Convert native data to managed data.
                __retVal = 0; // S_OK
                pstatstg = __pstatstg_native;
                @this = global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch.GetInstance<global::Microsoft.DiaSymReader.IUnsafeComStream>(__this_native);
                @this.Stat(ref pstatstg, grfStatFlag);
                // Marshal - Convert managed data to native data.
                __pstatstg_native = pstatstg;
            }
            catch (global::System.Exception __exception)
            {
                __retVal = global::System.Runtime.InteropServices.Marshalling.ExceptionAsHResultMarshaller<int>.ConvertToUnmanaged(__exception);
            }
            return __retVal;
        }
    }
 
    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.ComInterfaceGenerator", "12.0.14.48102")]
    [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
    void global::Microsoft.DiaSymReader.IUnsafeComStream.Clone(out nint ppstm)
    {
        unsafe
        {
            var (__this, __vtable) = ((global::System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider)this).GetVirtualMethodTableInfoForKey(typeof(global::Microsoft.DiaSymReader.IUnsafeComStream));
            var __target = ((delegate* unmanaged[MemberFunction]<void*, nint*, int>)__vtable[13]);
            {
                ppstm = default;
                int __invokeRetVal;
                // Pin - Pin data in preparation for calling the P/Invoke.
                fixed (nint* __ppstm_native = &ppstm)
                {
                    __invokeRetVal = __target(__this, __ppstm_native);
                }
                // NotifyForSuccessfulInvoke - Keep alive any managed objects that need to stay alive across the call.
                global::System.GC.KeepAlive(this);
                // Unmarshal - Convert native data to managed data.
                global::System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(__invokeRetVal, new([12, 0, 0, 0, 0, 0, 0, 0, 192, 0, 0, 0, 0, 0, 0, 70]), (nint)__this);
            }
        }
    }
 
    [global::System.Runtime.InteropServices.UnmanagedCallersOnlyAttribute(CallConvs = new[] { typeof(global::System.Runtime.CompilerServices.CallConvMemberFunction) })]
    internal static unsafe int ABI_Clone(global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* __this_native, nint* __ppstm_native__param)
    {
        unsafe
        {
            global::Microsoft.DiaSymReader.IUnsafeComStream @this = default;
            ref nint __ppstm_native = ref *__ppstm_native__param;
            nint ppstm = default;
            int __retVal = default;
            try
            {
                // Unmarshal - Convert native data to managed data.
                __retVal = 0; // S_OK
                @this = global::System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch.GetInstance<global::Microsoft.DiaSymReader.IUnsafeComStream>(__this_native);
                @this.Clone(out ppstm);
                // Marshal - Convert managed data to native data.
                __ppstm_native = ppstm;
            }
            catch (global::System.Exception __exception)
            {
                __retVal = global::System.Runtime.InteropServices.Marshalling.ExceptionAsHResultMarshaller<int>.ConvertToUnmanaged(__exception);
            }
            return __retVal;
        }
    }
}
 
namespace Microsoft.DiaSymReader
{
    [global::System.Runtime.InteropServices.Marshalling.IUnknownDerivedAttribute<InterfaceInformation, InterfaceImplementation>]
    internal unsafe partial interface IUnsafeComStream
    {
    }
}