S
Steve
Hello I am working on porting a windows program to linux,
unfortunately it doesn't appear the gcc has the ability to understand
the following code.
FlushInstructionCache(GetCurrentProcess(),(LPCVOID)Address, Length);
VirtualProtectEx(GetCurrentProcess(),
(LPVOID)address,Length,PAGE_EXECUTE_READWRITE, &oldperm);
WriteProcessMemory(GetCurrentProcess(),(LPVOID)Address,
(LPVOID)NewData,
Length,
NULL);
VirtualProtectEx(GetCurrentProcess(), (LPVOID)Address, Length,
oldperm, &tmp);
This code is the "heart" of the program, which will allow you to
modify offset values in a running process, on the fly.
This code works fine under windows and vs.net, just wondering if
anyone could clue me in on how to port this to gcc and/or any other
linux compiler.
unfortunately it doesn't appear the gcc has the ability to understand
the following code.
FlushInstructionCache(GetCurrentProcess(),(LPCVOID)Address, Length);
VirtualProtectEx(GetCurrentProcess(),
(LPVOID)address,Length,PAGE_EXECUTE_READWRITE, &oldperm);
WriteProcessMemory(GetCurrentProcess(),(LPVOID)Address,
(LPVOID)NewData,
Length,
NULL);
VirtualProtectEx(GetCurrentProcess(), (LPVOID)Address, Length,
oldperm, &tmp);
This code is the "heart" of the program, which will allow you to
modify offset values in a running process, on the fly.
This code works fine under windows and vs.net, just wondering if
anyone could clue me in on how to port this to gcc and/or any other
linux compiler.