首页
社区
课程
招聘
谁能帮翻译一下,看不懂,帮帮忙把?[求助]
2006-7-19 17:24 3641

谁能帮翻译一下,看不懂,帮帮忙把?[求助]

2006-7-19 17:24
3641
谁能帮翻译一下,看不懂,帮帮忙把?
CallWndProc
The CallWndProc hook procedure is an application-defined or library-defined callback function used with the SetWindowsHookEx function. The system calls this function whenever theSendMessage function is called. Before passing the message to the destination window procedure, the system passes the message to the hook procedure. The hook procedure can examine the message; it cannot modify it.

The HOOKPROC type defines a pointer to this callback function. CallWndProc is a placeholder for the application-defined or library-defined function name.

LRESULT CALLBACK CallWndProc(
  int nCode,      // hook code
  WPARAM wParam,  // current-process flag
  LPARAM lParam   // address of structure with message data
);

Parameters
nCode
Specifies whether the hook procedure must process the message. If nCode is HC_ACTION, the hook procedure must process the message. If nCode is less than zero, the hook procedure must pass the message to the CallNextHookEx function without further processing and must return the value returned by CallNextHookEx.
wParam
Specifies whether the message was sent by the current thread. If the message was sent by the current thread, it is nonzero; otherwise, it is zero.
lParam
Pointer to a CWPSTRUCT structure that contains details about the message.
Return Values
If nCode is less than zero, the hook procedure must return the value returned by CallNextHookEx.

If nCode is greater than or equal to zero, it is highly recommended that you call CallNextHookEx and return the value it returns; otherwise, other applications that have installed WH_CALLWNDPROC hooks will not receive hook notifications and may behave incorrectly as a result. If the hook procedure does not call CallNextHookEx, the return value should be zero.

Remarks
The CallWndProc hook procedure can examine the message, but it cannot modify it. After the hook procedure returns control to the system, the message is passed to the window procedure.

An application installs the hook procedure by specifying the WH_CALLWNDPROC hook type and the address of the hook procedure in a call to the SetWindowsHookEx function.

The WM_CALLWNDPROC hook is called in the context of the thread that calls SendMessage, not the thread that receives the message.

[培训]《安卓高级研修班(网课)》月薪三万计划,掌握调试、分析还原ollvm、vmp的方法,定制art虚拟机自动化脱壳的方法

收藏
点赞0
打赏
分享
最新回复 (1)
雪    币: 207
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
w三二dasm 2006-7-19 18:09
2
0
CallWndProc
CallWndProc 钩程序是一个申请-定义或者图书馆定义的收回功能使用了 SetWindowsHookEx 功能。 系统呼叫这一个功能每当功能被叫做的 theSendMessage 。 在经过给目的地窗户程序的讯息之前,系统经过给钩程序的讯息。 钩程序能调查信息; 它不能够修正它。

HOOKPROC 类型定义对这一个收回功能的一个指针。 CallWndProc 是申请的一个占位符号-定义或者图书馆-定义了功能名字。

LRESULT 收回 CallWndProc(
  int nCode,      // 钩密码
  WPARAM wParam,// 涌流-程序的旗子
  LPARAM lParam// 和信息数据的结构的住址
);

叁数
nCode
叙述钩程序是否一定处理信息。 如果 nCode 是 HC_ACTION,钩程序一定处理信息。 如果 nCode 比零更少,钩程序一定通过没有进一步的处理的给 CallNextHookEx 功能的讯息和一定回复被 CallNextHookEx 退还的价值。
wParam
叙述信息是否被现在线传达了。 如果信息被现在线传达了, 它是非零; 以别的方式,它是零。
lParam
对包含关于信息的细节的 CWPSTRUCT 结构的指针。
归还价值
如果 nCode 比零更少,钩程序一定回复被 CallNextHookEx 退还的价值。

如果 nCode 是更棒的超过或者与对准零位相同, 它高度地被推荐你呼叫 CallNextHookEx 而且归还它归还的价值; 以别的方式,已经安装 WH_CALLWNDPROC 钩的其他的申请将不接受钩通知和可能不正确地结果行为表现。 如果钩程序不呼叫 CallNextHookEx,回返价值应该是零。

评论
CallWndProc 钩程序能调查信息,但是它不能够修正它。 在对系统的钩程序回返控制之后,信息被传给窗户程序。

一个申请藉由叙述对 SetWindowsHookEx 功能的在一个呼叫中的钩程序的 WH_CALLWNDPROC 钩类型和住址安装钩程序。

WM_CALLWNDPROC 钩被收回呼叫 SendMessage 而不是接受信息的线的线的上下文。
游客
登录 | 注册 方可回帖
返回