Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //in both headers:
- struct HACKSTATUS {
- FLOAT host_timescale;
- BOOL sv_cheats;
- BOOL r_drawothermodels;
- HWND window;
- };
- //DLL:
- HACKSTATUS *status;
- status = (HACKSTATUS*)lpParam;
- //How i asign to it in dll:
- ReadProcessMemory(proc, (LPVOID)(ABS_OFFSET_HOSTTIMESCALE), (LPVOID)&fTemp, sizeof(FLOAT), NULL);
- status->host_timescale = fTemp;
- ReadProcessMemory(proc, (LPVOID)(ABS_OFFSET_SVCHEATS), (LPVOID)&dwTemp, sizeof(DWORD), NULL);
- status->sv_cheats = dwTemp;
- ReadProcessMemory(proc, (LPVOID)(ABS_OFFSET_RDRAWOTHERMODELS), (LPVOID)&dwTemp, sizeof(DWORD), NULL);
- status->sv_cheats = dwTemp;
- if (lpParam != NULL) lpParam = (LPVOID)status;
- //In exe:
- HACKSTATUS *status;
- status = (HACKSTATUS*)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(HACKSTATUS));
- status->host_timescale = -1;
- status->r_drawothermodels = -1;
- status->sv_cheats = -1;
- status->window = NULL;
- //Reading from it in exe:
- SetDlgItemText(hwnd, APP_SVCHEATS_STATUS, (status->sv_cheats>=1)?L"ON":L"OFF");
- SetDlgItemText(hwnd, APP_WALLHACK_STATUS, (status->r_drawothermodels==2)?L"ON":L"OFF");
- SendMessage(GetDlgItem(hwnd, APP_SPEEDBAR), PBM_SETPOS, (WPARAM)status->host_timescale, 0);
- //How i pass it in createthread:
- hackThread = CreateThread(0, 0, hackFunc, status, 0, 0);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement