using System; namespace System.Runtime.InteropServices { /// Wraps a managed object holding a handle to a resource that is passed to unmanaged code using platform invoke. // Token: 0x02000318 RID: 792 [ComVisible(true)] public struct HandleRef { /// Initializes a new instance of the class with the object to wrap and a handle to the resource used by unmanaged code. /// A managed object that should not be finalized until the platform invoke call returns. /// An that indicates a handle to a resource. // Token: 0x06002216 RID: 8726 RVA: 0x00079740 File Offset: 0x00077940 public HandleRef(object wrapper, IntPtr handle) { this.wrapper = wrapper; this.handle = handle; } /// Gets the handle to a resource. /// The handle to a resource. // Token: 0x1700064F RID: 1615 // (get) Token: 0x06002217 RID: 8727 RVA: 0x00079750 File Offset: 0x00077950 public IntPtr Handle { get { return this.handle; } } /// Gets the object holding the handle to a resource. /// The object holding the handle to a resource. // Token: 0x17000650 RID: 1616 // (get) Token: 0x06002218 RID: 8728 RVA: 0x00079758 File Offset: 0x00077958 public object Wrapper { get { return this.wrapper; } } /// Returns the internal integer representation of a object. /// An object that represents a object. /// A object to retrieve an internal integer representation from. // Token: 0x06002219 RID: 8729 RVA: 0x00079760 File Offset: 0x00077960 public static IntPtr ToIntPtr(HandleRef value) { return value.Handle; } /// Returns the handle to a resource of the specified object. /// The handle to a resource of the specified object. /// The object that needs a handle. // Token: 0x0600221A RID: 8730 RVA: 0x0007976C File Offset: 0x0007796C public static explicit operator IntPtr(HandleRef value) { return value.Handle; } // Token: 0x04000D41 RID: 3393 private object wrapper; // Token: 0x04000D42 RID: 3394 private IntPtr handle; } }