Provides a wrapper class for pointers.
More...
|
static unsafe object | Box (void *ptr, Type type) |
| Boxes the supplied unmanaged memory pointer and the type associated with that pointer into a managed T:System.Reflection.Pointer wrapper object. The value and the type are saved so they can be accessed from the native code during an invocation. More...
|
|
static unsafe void * | Unbox (object ptr) |
| Returns the stored pointer. More...
|
|
Provides a wrapper class for pointers.
Definition at line 11 of file Pointer.cs.
◆ Box()
static unsafe object System.Reflection.Pointer.Box |
( |
void * |
ptr, |
|
|
Type |
type |
|
) |
| |
|
static |
Boxes the supplied unmanaged memory pointer and the type associated with that pointer into a managed T:System.Reflection.Pointer wrapper object. The value and the type are saved so they can be accessed from the native code during an invocation.
- Parameters
-
ptr | The supplied unmanaged memory pointer. |
type | The type associated with the ptr parameter. |
- Returns
- A pointer object.
- Exceptions
-
T:System.ArgumentException | type is not a pointer. |
T:System.ArgumentNullException | type is null . |
Definition at line 38 of file Pointer.cs.
◆ Unbox()
static unsafe void* System.Reflection.Pointer.Unbox |
( |
object |
ptr | ) |
|
|
static |
Returns the stored pointer.
- Parameters
-
- Returns
- This method returns void.
- Exceptions
-
T:System.ArgumentException | ptr is not a pointer. |
Definition at line 65 of file Pointer.cs.
The documentation for this class was generated from the following file: