using System; using System.Runtime.ConstrainedExecution; using Cpp2IlInjected; namespace System.Runtime.InteropServices { /// Represents a wrapper class for operating system handles. This class must be inherited. // Token: 0x020005A4 RID: 1444 [Token(Token = "0x20005A4")] [StructLayout(0)] public abstract class SafeHandle : CriticalFinalizerObject, IDisposable { /// Initializes a new instance of the class with the specified invalid handle value. /// The value of an invalid handle (usually 0 or -1). Your implementation of should return for this value. /// /// to reliably let release the handle during the finalization phase; otherwise, (not recommended). /// The derived class resides in an assembly without unmanaged code access permission. // Token: 0x06002CD9 RID: 11481 RVA: 0x00002050 File Offset: 0x00000250 [Token(Token = "0x6002CD9")] [Address(RVA = "0x2CFCDC0", Offset = "0x2CFBDC0", VA = "0x182CFCDC0")] [ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail)] protected SafeHandle(IntPtr invalidHandleValue, bool ownsHandle) { } /// Frees all resources associated with the handle. // Token: 0x06002CDA RID: 11482 RVA: 0x00002050 File Offset: 0x00000250 [Token(Token = "0x6002CDA")] [Address(RVA = "0x2CFCBC0", Offset = "0x2CFBBC0", VA = "0x182CFCBC0", Slot = "1")] protected override void Finalize() { } /// Sets the handle to the specified pre-existing handle. /// The pre-existing handle to use. // Token: 0x06002CDB RID: 11483 RVA: 0x00002050 File Offset: 0x00000250 [Token(Token = "0x6002CDB")] [Address(RVA = "0x415800", Offset = "0x414800", VA = "0x180415800")] [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)] protected void SetHandle(IntPtr handle) { } /// Returns the value of the field. /// An representing the value of the field. If the handle has been marked invalid with , this method still returns the original handle value, which can be a stale value. // Token: 0x06002CDC RID: 11484 RVA: 0x00018E40 File Offset: 0x00017040 [Token(Token = "0x6002CDC")] [Address(RVA = "0x411530", Offset = "0x410530", VA = "0x180411530")] [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)] public IntPtr DangerousGetHandle() { return 0; } /// Gets a value indicating whether the handle is closed. /// /// if the handle is closed; otherwise, . // Token: 0x170006CB RID: 1739 // (get) Token: 0x06002CDD RID: 11485 RVA: 0x00018E58 File Offset: 0x00017058 [Token(Token = "0x170006CB")] public bool IsClosed { [Token(Token = "0x6002CDD")] [Address(RVA = "0x2CFCE50", Offset = "0x2CFBE50", VA = "0x182CFCE50")] [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)] get { return default(bool); } } /// When overridden in a derived class, gets a value indicating whether the handle value is invalid. /// /// if the handle value is invalid; otherwise, . // Token: 0x170006CC RID: 1740 // (get) Token: 0x06002CDE RID: 11486 [Token(Token = "0x170006CC")] public abstract bool IsInvalid { [Token(Token = "0x6002CDE")] [Address(Slot = "5")] [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)] get; } /// Marks the handle for releasing and freeing resources. // Token: 0x06002CDF RID: 11487 RVA: 0x00002050 File Offset: 0x00000250 [Token(Token = "0x6002CDF")] [Address(RVA = "0x2BA3AB0", Offset = "0x2BA2AB0", VA = "0x182BA3AB0")] [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)] public void Close() { } /// Releases all resources used by the class. // Token: 0x06002CE0 RID: 11488 RVA: 0x00002050 File Offset: 0x00000250 [Token(Token = "0x6002CE0")] [Address(RVA = "0x2BA3AB0", Offset = "0x2BA2AB0", VA = "0x182BA3AB0", Slot = "4")] [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)] public void Dispose() { } /// Releases the unmanaged resources used by the class specifying whether to perform a normal dispose operation. /// /// for a normal dispose operation; to finalize the handle. // Token: 0x06002CE1 RID: 11489 RVA: 0x00002050 File Offset: 0x00000250 [Token(Token = "0x6002CE1")] [Address(RVA = "0x2CFCB10", Offset = "0x2CFBB10", VA = "0x182CFCB10", Slot = "6")] [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)] protected virtual void Dispose(bool disposing) { } /// When overridden in a derived class, executes the code required to free the handle. /// /// if the handle is released successfully; otherwise, in the event of a catastrophic failure, . In this case, it generates a releaseHandleFailed Managed Debugging Assistant. // Token: 0x06002CE2 RID: 11490 [Token(Token = "0x6002CE2")] [Address(Slot = "7")] [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)] protected abstract bool ReleaseHandle(); /// Marks a handle as no longer used. // Token: 0x06002CE3 RID: 11491 RVA: 0x00002050 File Offset: 0x00000250 [Token(Token = "0x6002CE3")] [Address(RVA = "0x2CFCCF0", Offset = "0x2CFBCF0", VA = "0x182CFCCF0")] [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)] public void SetHandleAsInvalid() { } /// Manually increments the reference counter on instances. /// /// if the reference counter was successfully incremented; otherwise, . // Token: 0x06002CE4 RID: 11492 RVA: 0x00002050 File Offset: 0x00000250 [Token(Token = "0x6002CE4")] [Address(RVA = "0x2CFC850", Offset = "0x2CFB850", VA = "0x182CFC850")] [ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail)] public void DangerousAddRef(ref bool success) { } /// Manually decrements the reference counter on a instance. // Token: 0x06002CE5 RID: 11493 RVA: 0x00002050 File Offset: 0x00000250 [Token(Token = "0x6002CE5")] [Address(RVA = "0x2CFCB00", Offset = "0x2CFBB00", VA = "0x182CFCB00")] [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)] public void DangerousRelease() { } // Token: 0x06002CE6 RID: 11494 RVA: 0x00002050 File Offset: 0x00000250 [Token(Token = "0x6002CE6")] [Address(RVA = "0x2CFCC40", Offset = "0x2CFBC40", VA = "0x182CFCC40")] private void InternalDispose() { } // Token: 0x06002CE7 RID: 11495 RVA: 0x00002050 File Offset: 0x00000250 [Token(Token = "0x6002CE7")] [Address(RVA = "0x2CFCCD0", Offset = "0x2CFBCD0", VA = "0x182CFCCD0")] private void InternalFinalize() { } // Token: 0x06002CE8 RID: 11496 RVA: 0x00002050 File Offset: 0x00000250 [Token(Token = "0x6002CE8")] [Address(RVA = "0x2CFC960", Offset = "0x2CFB960", VA = "0x182CFC960")] private void DangerousReleaseInternal(bool dispose) { } /// Specifies the handle to be wrapped. // Token: 0x040019F8 RID: 6648 [FieldOffset(Offset = "0x10")] [Token(Token = "0x40019F8")] protected IntPtr handle; // Token: 0x040019F9 RID: 6649 [FieldOffset(Offset = "0x18")] [Token(Token = "0x40019F9")] private int _state; // Token: 0x040019FA RID: 6650 [FieldOffset(Offset = "0x1C")] [Token(Token = "0x40019FA")] private bool _ownsHandle; // Token: 0x040019FB RID: 6651 [FieldOffset(Offset = "0x1D")] [Token(Token = "0x40019FB")] private bool _fullyInitialized; // Token: 0x040019FC RID: 6652 [Token(Token = "0x40019FC")] private const int RefCount_Mask = 2147483644; // Token: 0x040019FD RID: 6653 [Token(Token = "0x40019FD")] private const int RefCount_One = 4; } }