-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathPointer.cpp
More file actions
36 lines (29 loc) · 710 Bytes
/
Copy pathPointer.cpp
File metadata and controls
36 lines (29 loc) · 710 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#include "Memory.h"
#pragma unmanaged
//DEFAULT_CONSTRUCTOR
Memory::Pointer::Pointer()
: mBase( NULL )
, mvOffsets( 0 )
{
};
//DESTRUCTOR
Memory::Pointer::~Pointer() {
};
//SINGLE_PTR_CONSTRUCTOR
Memory::Pointer::Pointer( DWORD Base, INT Offset )
: mBase( ( ULONG_PTR* )Base )
{
mvOffsets.resize( 1 );
mvOffsets[ 0 ] = Offset;
};
//MULTI_PTR_CONSTRUCTOR
Memory::Pointer::Pointer( DWORD Base, UINT Level, ... )
: mBase( ( ULONG_PTR* )Base )
{
va_list vl;
va_start( vl, Level );
for( UINT I = 0; I != Level; ++ I ) {
mvOffsets.push_back( va_arg( vl, INT ) );
}
va_end( vl );
};