非托管第三方应用程序的对象间谍 [英] Object Spy of Unmanaged Third Party Application

查看:77
本文介绍了非托管第三方应用程序的对象间谍的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





假设有第三方申请。用于构建应用程序的技术是未知的,大多数是非托管应用程序。



此应用程序上有一些文本框,按钮,网格。



使用Spy ++访问时,仅显示表单的外部句柄。文本框,按钮,网格没有单独的句柄,整个FORM只有一个句柄。



有没有办法侵入应用程序的过程并理解这些控件的属性,以便我们可以获取和设置这些控件的值..

Hi,

Suppose there is a Third Party Application . The Technology using which the Application is build is unknown , mostly unmanaged Application.

This Application has some textboxes , Buttons , Grids on it .

When accessed using Spy++ , only the outer handle of the Form is displayed . The textboxes ,buttons , Grids dont have separate handles and the entire FORM has only one handle.

Is there a Way to Intrusively get into the Process of the Application and understand the properties of these controls , so that we can get and set values to these controls..

推荐答案

是的,当然,但仅当问题中的控件为真时windows,就Windows API而言。



并非所有控件都是这样的。某些库中的某些控件未实现为窗口对象。它们以纯图形实现,例如使用GDI +,DirectX或其他一些图形访问。在这种方法中,一些主机控件(面板,窗口)实际上是一个窗口对象,但内部控件基于访问该主机控件的图形和事件。有时,这种UI方法称为轻量级。在某种程度上,从Windows API的角度来看,这种轻量级控件根本不存在;相反,它们全部由一个主机控件代表,一次全部。



如果你想深入到控件哪个是真正的Windows API窗口对象,你需要使用... Windows API。这种方法可以完成大部分工作:

http://msdn.microsoft.com/en-us/library/windows/desktop/ms633515%28v=vs.85%29.aspx [ ^ ]。



如您所见,如果您只有某个顶级窗口的HWND,则可以挖掘出在此主窗口中分层放置的所有子窗口。



-SA
Yes, of course, but only if the controls in questions are true windows, in the sense of Windows API.

Not all controls are like that. Some controls in some libraries are not implemented as window objects. They are implemented in pure graphics, using, say, GDI+, DirectX, or some other access to graphics. In such approach, some host control (panel, window) is really a window object, but inner controls are based on accessing graphics and events of this host control. Sometimes, such approach to UI is called "lightweight". In a way, such "lightweight" control simply don't exist from the standpoint of Windows API; instead they are all represented by a single host control, all at once.

If you want to drill down to the control which are real Windows API window object, you need to use… Windows API. This single method would do the most of the job:
http://msdn.microsoft.com/en-us/library/windows/desktop/ms633515%28v=vs.85%29.aspx[^].

As you can see, if you only have the HWND of some top-level window, you can dig out all child windows hierarchically placed in this main window.

—SA


这篇关于非托管第三方应用程序的对象间谍的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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