小弟需要 一份hookapi代码能定制截获 只截获想截获的程序 截获 send revc 急啊 真急
解决方案 »
- 求解思路 (自由画笔的结构体设计)
- 如何禁止qq中的文件传输,但允许聊天?急!
- 关于socket通信?
- 五一快乐,懒散五下吧!
- 欲开发一个小软件,请问用vc开发好还是别的什么软件?
- 关于MessageBox("分配内存失败!", "系统提示" , MB_ICONINFORMATION | MB_OK);的问题
- 求助我如何得到CListCtrl的字段数?
- 使用MFC的DLL中怎么样才能获取指向DLL中的全局唯一的theApp对象的指针?就向EXE中的AfxGetApp那样的功能
- 初学Ado,一个简单的问题
- 怎么使用CHeaderCtrl?怎样让它和CListBox练习起来?关注就有分,谢谢!
- 刚学VC++,请教一个极度基础的问题。
- 求解!将Flash作为对话框的“背景”(急)
/******************************************************************************
Module: APIHook.cpp
Notices: Copyright (c) 2000 Jeffrey Richter
******************************************************************************//******************************************************************************
Module: APIHook.h
Notices: Copyright (c) 2000 Jeffrey Richter
******************************************************************************///HookApi·ÖÏÂÃ漸²½£º//Step 1: ¶¨ÒåÒª Hook Api µÄº¯ÊýÖ¸ÕëÀàÐÍ
typedef int (WINAPI* PFN_MessageBox)(
HWND hWnd, // handle of owner window
LPCTSTR lpText, // address of text in message box
LPCTSTR lpCaption, // address of title of message box
UINT uType); // style of message box//Step 2: ¶¨ÒåÄã×Ô¼ºÓÃÓÚÌæ»» Api µÄº¯ÊýµÄ¶¨ÒåÓëÉêÃ÷
int WINAPI MyMessageBox(HWND hWnd, // handle of owner window
LPCTSTR lpText, // address of text in message box
LPCTSTR lpCaption, // address of title of message box
UINT uType); // style of message boxUINT WINAPI MySetTimer(HWND hWnd,
UINT nIDEvent,
UINT uElapse,
TIMERPROC lpTimerFunc);BOOL WINAPI MyPlaySound(LPCSTR pszSound,
HMODULE hmod,
DWORD fdwSound);
//Step 3: ʹÓà "CAPIHook class" hook API
CAPIHook g_MessageBox("USER32.DLL", "MessageBoxA", (PROC)MyMessageBox, TRUE);
CAPIHook g_SetTimer("USER32.DLL", "SetTimer", (PROC)MySetTimer, TRUE);
CAPIHook g_PlaySound("winmm.dll", "PlaySound", (PROC)MyPlaySound, TRUE); 楼主 需要代码 我给你一个 HOOK PlaySound等的。。
我原来通过Hook API的方式截获过CS的通信包,不过分析不出来。
就是hook send recv这两三个函数。
http://dev.csdn.net/develop/article/15/15119.shtm
这个hook不住其他的进程得API调用阿。我用一个测试的例子,install hook后,然后用另外的一个例子调用API函数,结果不好用