A stub implementation for the INativeHandle interface
NativeHandle
01 Syntax
02 Methods
| Name | Overloads | Summary |
|---|---|---|
| .ctor | 2 | Specialised default constructor for use only by derived class. |
| SetHandle | 1 | Sets a handle. |
| Finalize | 1 | Finaliser. Triggers the disposal of this object if not manually done. |
| ReleaseHandle | 1 | Releases the native resource for this handle. |
| Dispose | 1 | If the reference counts allows it, release the resource refered to by this handle. |
| GetHandle | 1 | Returns the value of the handle. |
| AddRef | 1 | Manually increments the reference counter. |
| Release | 1 | Manually decrements the reference counter. |
03 Properties
| Name | Overloads | Summary |
|---|---|---|
| ReferenceCount | 1 | Gets the number of references to the native resource for this handle. |
| Disposed | 1 | Gets a value indicating whether this handle has been disposed of already |
| IsInvalid | 1 | Gets a value indicating whether this handle is invalid. |
04 Fields
| Name | Overloads | Summary |
|---|---|---|
| handle | 1 | The handle to the native resource. |
05 Members
IntPtr, Int32)Specialised constructor for use only by derived class.
If a native object was created prior to its use by .NET, its lifetime may need to extend its use from .NET. In practice the scenario is unlikely
| Name | Type | Description |
|---|---|---|
pointer | IntPtr | The handle, value of the pointer to the native object |
currentRefCount | Int32 | (Optional) Number of pre-existing references for the native object |
Specialised default constructor for use only by derived class. Defers setting the handle to the derived class
IntPtr, Int32)Sets a handle.
If a native object was created prior to its use by .NET, its lifetime may need to extend its use from .NET. In practice the scenario is unlikely
| Name | Type | Description |
|---|---|---|
pointer | IntPtr | The handle, value of the pointer to the native object |
currentRefCount | Int32 | (Optional) Number of pre-existing references for the native object |
Finaliser. Triggers the disposal of this object if not manually done.
Releases the native resource for this handle.
True if it succeeds, false if it fails.
If the reference counts allows it, release the resource refered to by this handle.
Returns the value of the handle.
The handle.
Manually increments the reference counter.
Manually decrements the reference counter. Triggers disposal if count reaches is zero.
Gets the number of references to the native resource for this handle.
Gets a value indicating whether this handle has been disposed of already
Gets a value indicating whether this handle is invalid.
The handle to the native resource.