-
Notifications
You must be signed in to change notification settings - Fork 1
/
memoryReading.h
53 lines (44 loc) · 1.32 KB
/
memoryReading.h
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#pragma once
#include <windows.h>
#include <vector>
class memoryReading
{
public:
/**
* @brief retrieves necessary information for memory reading
* @details retrieves information such as base address, process ID etc
*/
memoryReading();
/**
* @brief closes Phandle
* @details closes the Phandle to avoid issues
*/
~memoryReading(void);
/**
* @brief memory reading function
* @details reads memory with base address + offsets
*
* @param v vector with all offsets
* @return value read at specified memory address
*/
int readMemory( const std::vector<DWORD> v );
private:
/**
* @brief gets base address
* @details retrieves the base address from Tibianic.dll
*
* @param tibianicPID Process ID of Tibia client
* @return returns the base address
*/
DWORD getStartAddress(DWORD TibianicPID);
BOOL SetPrivilege(
HANDLE hToken, // access token handle
LPCTSTR lpszPrivilege, // name of privilege to enable/disable
BOOL bEnablePrivilege // to enable or disable privilege
);
DWORD Address; ///< base address of Tibianic.dll
HANDLE phandle; ///< handle to open the process
HWND hWnd; ///< handle for Tibiaclient
DWORD TibianicPID; ///< this will store our Process ID, used to read/write into the memory
HANDLE hProcessSnap; ///< handle to take snapshot of all modules
};