开发者

Memory Editing Functions

I'm looking for functions to write and read process memory similar to the Win3开发者_如何转开发2API calls in windows.h but I can't seem to find any for standard C++ and I would like it to be platform independent.


There is no standard C++ API for accessing the memory of other processes. Standard C++ does not even have the concept of a 'process' at all. Moreover, the contents of the memory of other processes is highly platform-dependent, so adding a shim layer for porting to other OSes is the least of your problems.


You can get platform independent because those kinds of API calls are dependent on the OS kernel, you'd need to create wrappers for each type(read, write) and change the internal API call based on a PP define (such as _WIN32)


The C++ standard supports memcpy(), memset(), memmove(), and memcmp(). There is also and STL utility, std::copy(). These are all platform independent.


Which functions are you using on Windows? We're not sure what it is you're asking for, but if you show us what you're doing successfully there, we'll be able to help you find the equivalents on other platforms.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜