Unmanaged Memory pointer in VisualBasic language.(内存指针)
IntPtr
00 Remarks
只不过这个对象是封装了写内存操作的
Type Parameters
| Name | Description |
|---|---|
T |
01 Syntax
Microsoft.VisualBasic.Emit.Marshal.IntPtr`1
02 Methods
| Name | Overloads | Summary |
|---|---|---|
| .ctor | 2 | 方便进行数组操作的 |
| Write | 2 | Unsafe write memory |
| op_Addition | 1 | Move forward the current position of this memory pointer ptr by a specific step d |
| op_Subtraction | 1 | Move backward the current position of this memory pointer ptr by a specific step d |
| Dispose | 1 | write memory and release the memory pointer |
| Read | 1 | |
| ToString | 1 |
03 Properties
| Name | Overloads | Summary |
|---|---|---|
| Scan0 | 1 | The position in the memory region of the first byte for read. |
04 Fields
| Name | Overloads | Summary |
|---|---|---|
| __writeMemory | 1 | vbnet Public Delegate Sub UnsafeWrite(Of T)(destination As T(), startIndex As Integer, source As System.IntPtr, length As Integer) |
05 Members
Make data unsafe copy in this constructor function
Parameters
| Name | Type | Description |
|---|---|---|
p | IntPtr | - |
chunkSize | Int32 | - |
unsafeCopys | UnsafeCopys(Of `0) | |
unsafeWrite | UnsafeWrite(Of `0) | |
#ctor(
`0(), Nullable(Of IntPtr))方便进行数组操作的
Parameters
| Name | Type | Description |
|---|---|---|
raw | `0() | - |
p | Nullable(Of IntPtr) | - |
Write
Unsafe write memory
Write(
IntPtr)Please be carefull by using this method, if the memory region size of IntPtr.Scan0 in this memory pointer is larger than des, this method will caused exception.
Parameters
| Name | Type | Description |
|---|---|---|
des | IntPtr | - |
op_Addition(IntPtr(Of `0),
Int32)Move forward the current position of this memory pointer ptr by a specific step d
Parameters
| Name | Type | Description |
|---|---|---|
ptr | IntPtr(Of `0) | - |
d | Int32 | - |
op_Subtraction(IntPtr(Of `0),
Int32)Move backward the current position of this memory pointer ptr by a specific step d
Parameters
| Name | Type | Description |
|---|---|---|
ptr | IntPtr(Of `0) | - |
d | Int32 | - |
Dispose
write memory and release the memory pointer
Scan0
The position in the memory region of the first byte for read.
Returns
(第一个位置)
__writeMemory
Public Delegate Sub UnsafeWrite(Of T)(destination As T(), startIndex As Integer, source As System.IntPtr, length As Integer)Read()
ToString()