mscorlib(4.0.0.0) API with additions
HandleRef.cs
2 {
4  [ComVisible(true)]
5  public struct HandleRef
6  {
7  internal object m_wrapper;
8 
9  internal IntPtr m_handle;
10 
13  public object Wrapper => m_wrapper;
14 
17  public IntPtr Handle => m_handle;
18 
22  public HandleRef(object wrapper, IntPtr handle)
23  {
24  m_wrapper = wrapper;
25  m_handle = handle;
26  }
27 
31  public static explicit operator IntPtr(HandleRef value)
32  {
33  return value.m_handle;
34  }
35 
39  public static IntPtr ToIntPtr(HandleRef value)
40  {
41  return value.m_handle;
42  }
43  }
44 }
IntPtr Handle
Gets the handle to a resource.
Definition: HandleRef.cs:17
Wraps a managed object holding a handle to a resource that is passed to unmanaged code using platform...
Definition: HandleRef.cs:5
A platform-specific type that is used to represent a pointer or a handle.
Definition: IntPtr.cs:14
static IntPtr ToIntPtr(HandleRef value)
Returns the internal integer representation of a T:System.Runtime.InteropServices....
Definition: HandleRef.cs:39
HandleRef(object wrapper, IntPtr handle)
Initializes a new instance of the T:System.Runtime.InteropServices.HandleRef class with the object to...
Definition: HandleRef.cs:22
object Wrapper
Gets the object holding the handle to a resource.
Definition: HandleRef.cs:13