Advertisement
CasualGamer

Helper.h

Oct 23rd, 2019 (edited)
5,806
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.72 KB | None | 0 0
  1. #pragma once
  2. #include <Windows.h>  //DWORD, HANDLE
  3. #include <TlHelp32.h> //CreateToolhelp32Snapshot
  4. #include <tchar.h>    //_tcscmp
  5. #include <Psapi.h>    //GetModuleInformation
  6. #include <vector>
  7.  
  8. using namespace std;
  9.  
  10. class Helper
  11. {
  12. public:
  13.     Helper();
  14.     Helper(DWORD pID);
  15.     ~Helper();
  16.     uintptr_t GetModuleBaseAddress(TCHAR* lpszModuleName);
  17.     uintptr_t GetDynamicAddress(uintptr_t baseAddress, vector<DWORD> offsets);
  18.     uintptr_t GetAddressFromSignature(vector<int> signature);
  19.     void SetpID(DWORD pID);
  20.     void SetpBaseAddress(char moduleName[]);
  21.     DWORD GetpID();
  22.     HANDLE GetprocessHandle();
  23.    
  24. private:
  25.     DWORD pID;
  26.     DWORD pBaseAddress; //Base Address of exe
  27.     DWORD pSize;        //Size of exe module
  28.     HANDLE processHandle;
  29. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement