-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMemoryUtility.h
27 lines (20 loc) · 841 Bytes
/
MemoryUtility.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
#include <Windows.h>
#include <string>
#include <vector>
class MemoryUtility {
public:
static DWORD_PTR modBaseAddress;
static DWORD_PTR tmodBaseAddress;
static DWORD_PTR GetModuleBaseAddress(DWORD processId, const std::wstring& moduleName);
static int ReadInt32(DWORD_PTR address);
static long long ReadInt64(DWORD_PTR address);
static std::string ReadString(DWORD_PTR address, int length);
static std::vector<unsigned char> ReadBytes(DWORD_PTR address, int length);
static DWORD_PTR GetPtrAddr(DWORD_PTR base, const std::vector<DWORD>& offsets);
static bool IsValidAddress(DWORD_PTR address);
static double ReadVideoTime();
static double ReadMaxVideoTime();
static std::vector<std::string> ReadVideoId();
static double ReadDouble(DWORD_PTR address);
static void initialize();
};