使用DLL挂钩messageboxa [英] Hooking messageboxa using a DLL

查看:161
本文介绍了使用DLL挂钩messageboxa的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近创建了一个hello worldc ++程序:



I've recently created a "hello world" c++ program:

#include <windows.h>

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd)
{
    MessageBoxA(NULL, "Hello World!", "", MB_OK);
    return 0;
}





我现在需要做的是创建一个挂钩MessageBoxA API并更改消息的dll(我想要使用LoadLibrary从我的主程序加载DLL。



我已经下载并正确安装了MS Detours 3.0并在网上寻求帮助,但我完全是卡住!任何帮助将在创建该DLL时受到赞赏。



提前致谢。



什么我试过了:



搜索网页并尝试我找到的所有内容。



What I need to do now is create a dll that hooks MessageBoxA API and changes the message (I want to load the dll from my main program using LoadLibrary).

I've downloaded and properly installed MS Detours 3.0 and have searched the web for help, but I'm completely stuck! Any help would be appreciated in creating that dll.

Thanks in advance.

What I have tried:

Searching the web and trying everything I found.

推荐答案

请参阅此CodeProject文章: API挂钩显示 [ ^ ]。



另请参阅GitHub上的这个开源项目: EasyHook [ ^ ]。



-SA
Please see this CodeProject article: API hooking revealed[^].

See also this open-source project at GitHub: EasyHook[^].

—SA


这篇关于使用DLL挂钩messageboxa的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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