setwindowshookex和其回调函数的使用实例.pdfVIP

  • 10
  • 0
  • 约1.4万字
  • 约 10页
  • 2021-06-08 发布于湖南
  • 举报

setwindowshookex和其回调函数的使用实例.pdf

学习必备 欢迎下载 在网上找了好久都没有找到消息 hook 的实例,下面是我的例子给大家分享一下 下面是 dll 中的代码: //我的经验,编译的时候会提示 DllMain ,已在 DllMain.cpp 中定义,把 DllMain.cpp 从源文件里 删掉就好了 #include stdafx.h #includeWindows.h HHOOK hkey=NULL; HINSTANCE h_dll; #pragma data_seg(.MySec) // 定义字段,段名 .MySec HWND h_wnd=NULL; #pragma data_seg() #pragma comment(linker,/section:.MySec,RWS) BOOL WINAPI DllMain(HINSTANCE hinstDLL,DWORD fdwReason,LPVOID lpvReserved) { h_dll=hinstDLL; /

文档评论(0)

1亿VIP精品文档

相关文档