C ++ - Detours(Win32 API劫持) - 劫持类方法 [英] C++ -- Detours (Win32 API Hijacking) -- Hijack Class Methods

查看:186
本文介绍了C ++ - Detours(Win32 API劫持) - 劫持类方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我没有问题劫持函数与Detours长时间...当我试图劫持类方法(在我的case IHTMLDocument2 ::写从mshtml.dll)我遇到无休止的问题(主要是类型不匹配)。因为我没有在网上找到任何相关的例子,我开始怀疑这可以做。

I had no problems hijacking function with Detours for a long time... When I tried to hijack class methods (in my case IHTMLDocument2::write from mshtml.dll) I encountered endless problems (mainly type mismatching). As I didn't find any relevant example on the net I began doubting this can be done.

我的问题是:是否可能劫持类方法与Detours?我可以举个例子吗?如果没有,是否可以用更简单的方法用另一个钩子库来劫持类方法?

My question is: is it possible to hijack class methods with Detours? Can I have an example, please? If not, is it possible to hijack class methods in a simpler way with another hooking library?

先感谢你们!

推荐答案

IHTMLDocument2 :: write 不仅仅是一个类方法;它是一个COM方法。这意味着更多。例如,还有一个等效的C声明。迂回方法时可以使用C签名;它仍然是相同的功能。

IHTMLDocument2::write is not just a class method; it's a COM method. That implies a whole lot more. For instance, there's also an equivalent C declaration. You can use that C signature when detouring the method; it's still the same function.

这篇关于C ++ - Detours(Win32 API劫持) - 劫持类方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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