Advertisement
captmicro

Untitled

Jun 17th, 2010
234
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.15 KB | None | 0 0
  1. //in both headers:
  2. struct HACKSTATUS {
  3.     FLOAT host_timescale;
  4.     BOOL sv_cheats;
  5.     BOOL r_drawothermodels;
  6.     HWND window;
  7. };
  8. //DLL:
  9. HACKSTATUS *status;
  10. status = (HACKSTATUS*)lpParam;
  11. //How i asign to it in dll:
  12. ReadProcessMemory(proc, (LPVOID)(ABS_OFFSET_HOSTTIMESCALE), (LPVOID)&fTemp, sizeof(FLOAT), NULL);
  13. status->host_timescale = fTemp;
  14. ReadProcessMemory(proc, (LPVOID)(ABS_OFFSET_SVCHEATS), (LPVOID)&dwTemp, sizeof(DWORD), NULL);
  15. status->sv_cheats = dwTemp;
  16. ReadProcessMemory(proc, (LPVOID)(ABS_OFFSET_RDRAWOTHERMODELS), (LPVOID)&dwTemp, sizeof(DWORD), NULL);
  17. status->sv_cheats = dwTemp;
  18.  
  19. if (lpParam != NULL) lpParam = (LPVOID)status;
  20. //In exe:
  21. HACKSTATUS *status;
  22. status = (HACKSTATUS*)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(HACKSTATUS));
  23. status->host_timescale = -1;
  24. status->r_drawothermodels = -1;
  25. status->sv_cheats = -1;
  26. status->window = NULL;
  27. //Reading from it in exe:
  28. SetDlgItemText(hwnd, APP_SVCHEATS_STATUS, (status->sv_cheats>=1)?L"ON":L"OFF");
  29. SetDlgItemText(hwnd, APP_WALLHACK_STATUS, (status->r_drawothermodels==2)?L"ON":L"OFF");
  30. SendMessage(GetDlgItem(hwnd, APP_SPEEDBAR), PBM_SETPOS, (WPARAM)status->host_timescale, 0);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement