How to port this snippet?

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,166
Messages
2,570,901
Members
47,442
Latest member
KevinLocki

Latest Threads

Top