如何使用Windows挂钩来获取WinForm的所有对象?

时间:2017-11-15 10:07:46

标签: c# object properties hook

我正在开发自动化测试工具的间谍功能。间谍功能需要获取我想窥探的程序的所有对象和属性。 这时,我可以获得所有句柄"班级名称和字幕"从写字板和记事本中将它们打印到控制台。

现在,我需要从classnamecaptions这些句柄中获取对象和属性。这是控制台的间谍结果:

WordPadClass
Process Name:wordpad
Child handle:UIRibbonCommandBarDock UIRibbonDockLeft
Child handle:UIRibbonCommandBarDock UIRibbonDockRight
Child handle:UIRibbonCommandBarDock UIRibbonDockTop
Child handle:UIRibbonCommandBar Ribbon
Child handle:UIRibbonWorkPane Ribbon
Child handle:NUIPane
Child handle:NetUIHWND
Child handle:NetUICtrlNotifySink
Child handle:NetUICtrlNotifySink
Child handle:UIRibbonCommandBarDock UIRibbonDockBottom
Child handle:Afx:00000000FFAA0000:0:0000000000010003:0000000000000010:0000000000
000000
Child handle:msctls_statusbar32
Child handle:Afx:00000000FFAA0000:0
Child handle:Static Zoo&m
Child handle:Static 100%
Child handle:Button -
Child handle:msctls_trackbar32
Child handle:Button +
Child handle:AfxControlBar42u
Child handle:AfxControlBar42u
Child handle:AfxControlBar42u
Child handle:AfxControlBar42u
Child handle:Afx:00000000FFAA0000:0:0000000000010003:0000000000000010:0000000000
000000
Child handle:RICHEDIT50W
Child handle:UIRibbonWorkPane UIRibbonWorkPane
Press any key to continue . . .
  1. " UIRibbonCommandBarDock"这是classname
  2. " UIRibbonDockLeft"这是标题
  3. 感谢您的帮助。

0 个答案:

没有答案