Additional methods to extend the System.IntPtr structure's functionality.
More...
|
| static IntPtr | add (this IntPtr pointer, long offset) |
| | Adds an offset to the address wrapped by a System.IntPtr instance.
|
| static IntPtr | align (this IntPtr pointer, int alignmentInBits) |
| | Will align a user space address to a certain bit boundary.
|
| static long | subtract (this IntPtr firstPointer, IntPtr secondPointer) |
| | Subtracts 2 System.IntPtr instances from one another.
|
Additional methods to extend the System.IntPtr structure's functionality.
◆ add()
| IntPtr add |
( |
this IntPtr | pointer, |
|
|
long | offset ) |
|
inlinestatic |
Adds an offset to the address wrapped by a System.IntPtr instance.
- Returns
- A new System.IntPtr instance pointing to the new memory location.
- Parameters
-
| [in] | pointer | The System.IntPtr instance |
| [in] | offset | An offset in bytes |
◆ align()
| IntPtr align |
( |
this IntPtr | pointer, |
|
|
int | alignmentInBits ) |
|
inlinestatic |
Will align a user space address to a certain bit boundary.
- Returns
- A new System.IntPtr instance pointing to the aligned memory location.
- Parameters
-
| [in] | pointer | The System.IntPtr instance |
| [in] | alignmentInBits | The alignment in bits |
◆ subtract()
| long subtract |
( |
this IntPtr | firstPointer, |
|
|
IntPtr | secondPointer ) |
|
inlinestatic |
Subtracts 2 System.IntPtr instances from one another.
- Returns
- The difference between the 2 memory locations in bytes.
- Parameters
-
| [in] | firstPointer | The System.IntPtr instance |
| [in] | secondPointer | The second System.IntPtr instance |