PatchData

From eeew, 10 Years ago, written in C++, viewed 756 times.
URL https://paste.godclan.hu/view/GcfQulSZ Embed
Download Paste or View Raw
  1. template <typename T>
  2. void PatchData(DWORD addr, T data){
  3.     DWORD oldprot;
  4.     addr += vcmpaddr;
  5.     VirtualProtect((void*)addr, sizeof(T), PAGE_EXECUTE_READWRITE, &oldprot);
  6.     *(T*)addr = data;
  7.     VirtualProtect((void*)addr, sizeof(T), oldprot, &oldprot);
  8. }

Reply to "PatchData"

Here you can reply to the paste above