我在C ++中有一个监听器,它监视窗口消息并获取新创建的窗口的pUIAutomation
。使用UIAutomation SDK for C ++,我可以从中获取AutomationElement和相关信息
IUIAutomation
CoCreateInstance
是通过调用IUIAutomationElement *
获得的类型AutomationElement
的指针。
是否有一种方法可以将此AutomationElement
传递给C#hwnd
?有一个c#模块需要进一步处理。
我知道C#本身可以直接侦听事件并获取新窗口的AutomationElement.FromHandle(hwnd)
,但是我不能使用它。另外,def get_software_version(self):
"""
Gets the software version
Examples
--------
100000 = V1.00
Command Reference
-----------------
CSWVE
Returns
-------
version: string
version number as string
"""
可以传递到C#模块,{{1}}可以用来获取它。
我正在寻找是否可以直接通过自动化元素本身。
预先感谢