Impact Acquire SDK .NET
IntPtrExtension Class Reference

Additional methods to extend the System.IntPtr structure's functionality. More...

Static Public Member Functions

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.
 

Detailed Description

Additional methods to extend the System.IntPtr structure's functionality.

Member Function Documentation

◆ add()

static 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]pointerThe System.IntPtr instance
[in]offsetAn offset in bytes

◆ align()

static 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]pointerThe System.IntPtr instance
[in]alignmentInBitsThe alignment in bits

◆ subtract()

static 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]firstPointerThe System.IntPtr instance
[in]secondPointerThe second System.IntPtr instance