你怎么能在Windows中打开的应用程序读取值? [英] How can you read values from an open application in Windows?

查看:170
本文介绍了你怎么能在Windows中打开的应用程序读取值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要创建一个程序或者使用一个程序,读取内存的值了另一个应用程序。有谁知道一个应用程序/库,将做到这一点的?

I want to create a program or use a program that will read the memory values out of another application. Does anyone know of an application/library that will do this?

目标应用是这个。我想从中读取汇率值。

The target app is this. I would like to read the exchange rate values from it.

我是一名经验丰富的C#程序员,但从来没有与Win32 / USER32 API工作这就是我假设我将不得不面对拉本关闭。

I'm an experienced c# programmer, but have never worked with the Win32/user32 api which is what I'm assuming I'll have to deal with to pull this off.

这让我朝着正确的方向任何帮助是极大的赞赏。

Any help that gets me going in the right direction is greatly appreciated.

更新:
我设法利用间谍++获取窗口句柄,所以我相信我能得到的值一定如何。

Update: I managed to use Spy++ to get the window handle, so I'm sure I can get the values some how.

推荐答案

通常应用程序创建的一致庄园一个对话框,同一ID,同一顺序等的控制,所以寻找一个控制编程相当简单。使用间谍++ 找到该控件的ID,然后你可以搜索由所需的控制应用程序创建的窗口。不熟悉与有问题的应用程序,我不能给具体细节,但如果间谍++ :显示您希望的数值,它可能不是很难获得在代码中的值。

Typically an application creates controls in a dialog in a consistent manor, same ID, same order etc, so finding a control programatically is fairly simple. Using Spy++ find the control's ID and then you can search the windows created by the application for the desired control. Not being familiar with the app in question I cannot give specifics, but if Spy++ shows the value you desire, it is likely not difficult to obtain the value in your code.

在显示什么类型的控件的值?你可能能够使用 GetDlgItemText 获得的价值,一旦你有父窗口的句柄和控制ID?要得到父窗口尝试使用 EnumWindows的

What type of control is the value displayed in? You'll may be able to use GetDlgItemText to obtain the value once you have the parent window handle and control ID? To get the parent window try using EnumWindows.

这篇关于你怎么能在Windows中打开的应用程序读取值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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