Pointer::Box Method (Void*, Type^)
.NET Framework (current version)
Boxes the supplied unmanaged memory pointer and the type associated with that pointer into a managed Pointer wrapper object. The value and the type are saved so they can be accessed from the native code during an invocation.
Assembly: mscorlib (in mscorlib.dll)
Parameters
- ptr
-
Type:
System::Void*
The supplied unmanaged memory pointer.
- type
-
Type:
System::Type^
The type associated with the ptr parameter.
| Exception | Condition |
|---|---|
| ArgumentException | type is not a pointer. |
| ArgumentNullException | type is null. |
SecurityCriticalAttribute
Requires full trust for the immediate caller. This member cannot be used by partially trusted or transparent code.
.NET Framework
Available since 1.1
Available since 1.1
Show: