Files
2026-04-10 22:50:51 +02:00

204 lines
8.8 KiB
C#

using System;
using System.Runtime.ConstrainedExecution;
using Cpp2IlInjected;
namespace System.Runtime.InteropServices
{
/// <summary>Represents a wrapper class for operating system handles. This class must be inherited.</summary>
// Token: 0x02000585 RID: 1413
[Token(Token = "0x2000585")]
[StructLayout(0)]
public abstract class SafeHandle : CriticalFinalizerObject, IDisposable
{
/// <summary>Initializes a new instance of the <see cref="T:System.Runtime.InteropServices.SafeHandle" /> class with the specified invalid handle value.</summary>
/// <param name="invalidHandleValue">The value of an invalid handle (usually 0 or -1). Your implementation of <see cref="P:System.Runtime.InteropServices.SafeHandle.IsInvalid" /> should return <see langword="true" /> for this value.</param>
/// <param name="ownsHandle">
/// <see langword="true" /> to reliably let <see cref="T:System.Runtime.InteropServices.SafeHandle" /> release the handle during the finalization phase; otherwise, <see langword="false" /> (not recommended).</param>
/// <exception cref="T:System.TypeLoadException">The derived class resides in an assembly without unmanaged code access permission.</exception>
// Token: 0x06002AC5 RID: 10949 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x6002AC5")]
[Address(RVA = "0x2382810", Offset = "0x2381610", VA = "0x182382810")]
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail)]
protected SafeHandle(IntPtr invalidHandleValue, bool ownsHandle)
{
}
/// <summary>Frees all resources associated with the handle.</summary>
// Token: 0x06002AC6 RID: 10950 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x6002AC6")]
[Address(RVA = "0x2382610", Offset = "0x2381410", VA = "0x182382610", Slot = "1")]
protected override void Finalize()
{
}
/// <summary>Sets the handle to the specified pre-existing handle.</summary>
/// <param name="handle">The pre-existing handle to use.</param>
// Token: 0x06002AC7 RID: 10951 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x6002AC7")]
[Address(RVA = "0x3F7200", Offset = "0x3F6000", VA = "0x1803F7200")]
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
protected void SetHandle(IntPtr handle)
{
}
/// <summary>Returns the value of the <see cref="F:System.Runtime.InteropServices.SafeHandle.handle" /> field.</summary>
/// <returns>An <see langword="IntPtr" /> representing the value of the <see cref="F:System.Runtime.InteropServices.SafeHandle.handle" /> field. If the handle has been marked invalid with <see cref="M:System.Runtime.InteropServices.SafeHandle.SetHandleAsInvalid" />, this method still returns the original handle value, which can be a stale value.</returns>
// Token: 0x06002AC8 RID: 10952 RVA: 0x00016A58 File Offset: 0x00014C58
[Token(Token = "0x6002AC8")]
[Address(RVA = "0x3F6E20", Offset = "0x3F5C20", VA = "0x1803F6E20")]
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
public IntPtr DangerousGetHandle()
{
return 0;
}
/// <summary>Gets a value indicating whether the handle is closed.</summary>
/// <returns>
/// <see langword="true" /> if the handle is closed; otherwise, <see langword="false" />.</returns>
// Token: 0x17000653 RID: 1619
// (get) Token: 0x06002AC9 RID: 10953 RVA: 0x00016A70 File Offset: 0x00014C70
[Token(Token = "0x17000653")]
public bool IsClosed
{
[Token(Token = "0x6002AC9")]
[Address(RVA = "0x23828A0", Offset = "0x23816A0", VA = "0x1823828A0")]
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
get
{
return default(bool);
}
}
/// <summary>When overridden in a derived class, gets a value indicating whether the handle value is invalid.</summary>
/// <returns>
/// <see langword="true" /> if the handle value is invalid; otherwise, <see langword="false" />.</returns>
// Token: 0x17000654 RID: 1620
// (get) Token: 0x06002ACA RID: 10954
[Token(Token = "0x17000654")]
public abstract bool IsInvalid
{
[Token(Token = "0x6002ACA")]
[Address(Slot = "5")]
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
get;
}
/// <summary>Marks the handle for releasing and freeing resources.</summary>
// Token: 0x06002ACB RID: 10955 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x6002ACB")]
[Address(RVA = "0x2382280", Offset = "0x2381080", VA = "0x182382280")]
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
public void Close()
{
}
/// <summary>Releases all resources used by the <see cref="T:System.Runtime.InteropServices.SafeHandle" /> class.</summary>
// Token: 0x06002ACC RID: 10956 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x6002ACC")]
[Address(RVA = "0x2382280", Offset = "0x2381080", VA = "0x182382280", Slot = "4")]
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
public void Dispose()
{
}
/// <summary>Releases the unmanaged resources used by the <see cref="T:System.Runtime.InteropServices.SafeHandle" /> class specifying whether to perform a normal dispose operation.</summary>
/// <param name="disposing">
/// <see langword="true" /> for a normal dispose operation; <see langword="false" /> to finalize the handle.</param>
// Token: 0x06002ACD RID: 10957 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x6002ACD")]
[Address(RVA = "0x2382560", Offset = "0x2381360", VA = "0x182382560", Slot = "6")]
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
protected virtual void Dispose(bool disposing)
{
}
/// <summary>When overridden in a derived class, executes the code required to free the handle.</summary>
/// <returns>
/// <see langword="true" /> if the handle is released successfully; otherwise, in the event of a catastrophic failure, <see langword="false" />. In this case, it generates a releaseHandleFailed Managed Debugging Assistant.</returns>
// Token: 0x06002ACE RID: 10958
[Token(Token = "0x6002ACE")]
[Address(Slot = "7")]
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
protected abstract bool ReleaseHandle();
/// <summary>Marks a handle as no longer used.</summary>
// Token: 0x06002ACF RID: 10959 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x6002ACF")]
[Address(RVA = "0x2382740", Offset = "0x2381540", VA = "0x182382740")]
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
public void SetHandleAsInvalid()
{
}
/// <summary>Manually increments the reference counter on <see cref="T:System.Runtime.InteropServices.SafeHandle" /> instances.</summary>
/// <param name="success">
/// <see langword="true" /> if the reference counter was successfully incremented; otherwise, <see langword="false" />.</param>
// Token: 0x06002AD0 RID: 10960 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x6002AD0")]
[Address(RVA = "0x23822A0", Offset = "0x23810A0", VA = "0x1823822A0")]
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail)]
public void DangerousAddRef(ref bool success)
{
}
/// <summary>Manually decrements the reference counter on a <see cref="T:System.Runtime.InteropServices.SafeHandle" /> instance.</summary>
// Token: 0x06002AD1 RID: 10961 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x6002AD1")]
[Address(RVA = "0x2382550", Offset = "0x2381350", VA = "0x182382550")]
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
public void DangerousRelease()
{
}
// Token: 0x06002AD2 RID: 10962 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x6002AD2")]
[Address(RVA = "0x2382690", Offset = "0x2381490", VA = "0x182382690")]
private void InternalDispose()
{
}
// Token: 0x06002AD3 RID: 10963 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x6002AD3")]
[Address(RVA = "0x2382720", Offset = "0x2381520", VA = "0x182382720")]
private void InternalFinalize()
{
}
// Token: 0x06002AD4 RID: 10964 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x6002AD4")]
[Address(RVA = "0x23823B0", Offset = "0x23811B0", VA = "0x1823823B0")]
private void DangerousReleaseInternal(bool dispose)
{
}
/// <summary>Specifies the handle to be wrapped.</summary>
// Token: 0x04001935 RID: 6453
[FieldOffset(Offset = "0x10")]
[Token(Token = "0x4001935")]
protected IntPtr handle;
// Token: 0x04001936 RID: 6454
[FieldOffset(Offset = "0x18")]
[Token(Token = "0x4001936")]
private int _state;
// Token: 0x04001937 RID: 6455
[FieldOffset(Offset = "0x1C")]
[Token(Token = "0x4001937")]
private bool _ownsHandle;
// Token: 0x04001938 RID: 6456
[FieldOffset(Offset = "0x1D")]
[Token(Token = "0x4001938")]
private bool _fullyInitialized;
// Token: 0x04001939 RID: 6457
[Token(Token = "0x4001939")]
private const int RefCount_Mask = 2147483644;
// Token: 0x0400193A RID: 6458
[Token(Token = "0x400193A")]
private const int RefCount_One = 4;
}
}