Displaying 1 result from an estimated 1 matches for "oldprotect".
2010 Sep 20
1
Dynamic forking in Win32
...ageBase == childInfo.baseAddr &&
imageSize <= childInfo.imageSize) {
/* if new EXE has same baseaddr and its size is <= to the
* original EXE, just overwrite it in memory
*/
v = (LPVOID)childInfo.baseAddr;
DWORD oldProtect;
VirtualProtectEx(
pi.hProcess,
(LPVOID)childInfo.baseAddr,
childInfo.imageSize,
PAGE_EXECUTE_READWRITE,
&oldProtect);
printf("Using Existing Mem for New EXE at %X\n", (uint)v);...