C#无法访问SetWindowsHookEx中的word对象 [英] C# unable to access word object in SetWindowsHookEx

查看:116
本文介绍了C#无法访问SetWindowsHookEx中的word对象的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我正在使用调用SetWindowsHookEx监视按键。

我需要在按下printscreen键后访问和修改文档。但是具有回调函数HookCallback的单词对象未被识别。即我无法访问单词对象。 word对象是全局和公共定义的。

Hi,
I am using the call SetWindowsHookEx to monitor key presses.
i need to access and modify the document after the printscreen key is pressed. But the word object with the callback function HookCallback is not getting recognised. i.e. i am not able to access the word object. The word object is defined globally and public.

推荐答案

尝试使用marshall.getactiveobject函数link [ ^ ]

从运行对象表(ROT)中获取指定对象的运行实例。
Try using marshall.getactiveobject function link[^]
Obtains a running instance of the specified object from the running object table (ROT).


这篇关于C#无法访问SetWindowsHookEx中的word对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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