程序存储器地址位置访问? [英] Programms memory adress location access?

查看:92
本文介绍了程序存储器地址位置访问?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

例如我有一个简单的程序

int main()

{

int test = NULL;

while(1){

printf("%d \ nn",test);

getch();

test ++;

}

返回0;

}


编译运行后它,我想访问它的内存地址

位置(在windows下)来自其他程序(我想写,但是

不知道怎么说或更好说,来自开始:-))并找到这个测试

变量并在程序运行时更改其值。我怎么能用C ++编写的外部程序来实现
?任何帮助,将不胜感激。 THX。

for example i have one simple programm

int main()
{
int test = NULL;
while(1){
printf("%d\n",test);
getch();
test++;
}
return 0;
}

After compiling and running it, i want to access to its memory adress
location(under windows) from other programm(which i want to write, but
dont know how or better say, from to start :-)) and find this "test"
variable and change its value during programm run-time. How i can do it
from external programm written in C++? Any help would be appreciated. THX.

推荐答案

TIM在新闻中写道:40 ********** @ news.estpak.ee在comp.lang中。 c ++:
TIM wrote in news:40**********@news.estpak.ee in comp.lang.c++:
例如我有一个简单的程序

int main()
{/ / int int test = NULL;
while(1){
printf("%d \ nn,test);
getch();
test ++;
}
返回0;
}

编译并运行后,我想从其他程序(我想写的,但是
不知道如何或更好地说,从开始:-))并找到这个测试变量并在程序运行时更改其值。我怎么能用C ++编写的外部程序来做它?任何帮助都将受到赞赏。 THX。
for example i have one simple programm

int main()
{
int test = NULL;
while(1){
printf("%d\n",test);
getch();
test++;
}
return 0;
}

After compiling and running it, i want to access to its memory adress
location(under windows) from other programm(which i want to write, but
dont know how or better say, from to start :-)) and find this "test"
variable and change its value during programm run-time. How i can do
it from external programm written in C++? Any help would be
appreciated. THX.




Alas标准C ++,对于访问数据或代码没什么好说的。

in * other * program。


您应该在Windows编程新闻组中询问:


comp.os.ms-windows.programmer.win32


< off-topic>


你应该IMO重新考虑你的问题,你上面提到的只能通过调试器来实现
将需要一个程序

编译带有debuging信息,如果这是你想要的那么b $ b请直接询问它,这样的东西不仅仅是os具体的

但是特定于编译器,因此请在支持你的
编译器的新闻组中询问。


你可能想要谷歌的一些术语:


IPC - 进程间通信

RPC - 远程过程调用

COM - 组件对象模型(win32 / most /)


< / off-topic>


HTH。


R ob。

-
http ://www.victim-prime.dsl.pipex.com/


TIM在新闻中写道:40 ********** comp.lang.c ++中的@ news.estpak.ee:
TIM wrote in news:40**********@news.estpak.ee in comp.lang.c++:
例如我有一个简单的程序

int main()
{
int test = NULL;
while(1){
printf("%d \ nn,test);
getch();
test ++;
}
返回0;
}

编译运行后,我想从其他程序访问其内存地址(在windows下) (我想写,但不知道如何或更好地说,从开始:-))并找到这个测试变量并在程序运行时更改其值。我怎么能用C ++编写的外部程序来做它?任何帮助都将受到赞赏。 THX。
for example i have one simple programm

int main()
{
int test = NULL;
while(1){
printf("%d\n",test);
getch();
test++;
}
return 0;
}

After compiling and running it, i want to access to its memory adress
location(under windows) from other programm(which i want to write, but
dont know how or better say, from to start :-)) and find this "test"
variable and change its value during programm run-time. How i can do
it from external programm written in C++? Any help would be
appreciated. THX.




Alas标准C ++,对于访问数据或代码没什么好说的。

in * other * program。


您应该在Windows编程新闻组中询问:


comp.os.ms-windows.programmer.win32


< off-topic>


你应该IMO重新考虑你的问题,你上面提到的只能通过调试器来实现
将需要一个程序

编译带有debuging信息,如果这是你想要的那么b $ b请直接询问它,这样的东西不仅仅是os具体的

但是特定于编译器,因此请在支持你的
编译器的新闻组中询问。


你可能想要谷歌的一些术语:


IPC - 进程间通信

RPC - 远程过程调用

COM - 组件对象模型(win32 / most /)


< / off-topic>


HTH。


R ob。

-
http ://www.victim-prime.dsl.pipex.com/


TIM写道:
例如我有一个简单的程序


{int / test int = NULL;
while(1){
printf("%d \ n" ;,测试);
getch();
测试++;
}
返回0;
}
编译并运行后,我想从其他程序(我想写,但不知道如何或更好的说,从开始:-)访问其内存地址
位置(在Windows下)并找到这个 ;测试"
变量并在程序运行时更改其值。我怎么能用C ++编写的外部程序来做呢?任何帮助,将不胜感激。 THX。
for example i have one simple programm

int main()
{
int test = NULL;
while(1){
printf("%d\n",test);
getch();
test++;
}
return 0;
}

After compiling and running it, i want to access to its memory adress
location(under windows) from other programm(which i want to write, but
dont know how or better say, from to start :-)) and find this "test"
variable and change its value during programm run-time. How i can do it
from external programm written in C++? Any help would be appreciated. THX.




对不起,在C ++中没有标准的方法可以做到这一点。尝试在

Windows组中询问。



Sorry, there''s no standard way to do this in C++. Try asking in a
Windows group.


这篇关于程序存储器地址位置访问?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆