智动软件 - 站长优化推广网站好帮手
帐号: 密码: 注册会员
模糊 标题

钩子(HOOK)函数教程(十二)

时间:2010-04-21 Tag: HOOK 钩子 教程 点击:统计中..

方法7  :  ForegroundIdleProc Function

智动软件

The ForegroundIdleProc hook procedure is an application-defined or library-defined callback function used with the SetWindowsHookEx function. The system calls this function whenever the foreground thread is about to become idle. www.zdwork.cn

ForegroundIdleProc钩子子程是和SetWindowsHookEx方法一起使用的、程序定义的或者库定义的回调函数。当前台线程即将变成空闲时,系统将调用该方法。 智动软件

The HOOKPROC type defines a pointer to this callback function. ForegroundIdleProc is a placeholder for the application-defined or library-defined function name. HOOKPROC类型定义了指向该回调函数的指针。ForegroundIdleProc是程序定义的或者库定义的方法名字。 智动软件

Syntax 语法 本文来自智动软件zdwork.cn

DWORD CALLBACK ForegroundIdleProc(      智动软件

   int code, copyright 智动软件

    DWORD wParam,

智动软件

    LONG lParam

zdwork.cn

); 内容来自zdwork.cn

Parameters 参数

内容来自zdwork.cn

code [in] Specifies whether the hook procedure must process the message. If code is HC_ACTION, the hook procedure must process the message. If code is less than zero, the hook procedure must pass the message to the CallNextHookEx function without further processing and should return the value returned by CallNextHookEx.

copyright 智动软件

指定钩子子程是否必须处理消息。如果nCodeHC_ACTION,钩子子程就必须处理该消息。如果nCode小于0,钩子子程就必须将该消息传递给CallNextHookEx方法,自己对消息不做进一步处理,并且应该返回由CallNextHookEx方法返回的返回值。 智动软件

wParam This parameter is not used. 未使用

内容来自zdwork.cn

lParam  This parameter is not used. 未使用

copyright 智动软件

Return Value 返回值

本文来自智动软件zdwork.cn

If code is less than zero, the hook procedure must return the value returned by CallNextHookEx. If code 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_FOREGROUNDIDLE 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.

智动软件

如果nCode小于0,钩子子程必须返回由CallNextHookEx返回的返回值。如果nCode大于等于0,强烈要求调用CallNextHookEx方法,并返回由它返回的返回值;否则,其他已经安装了WH_ CALLWNDPROCRET钩子的程序将收不到钩子通知,可能导致行为的错误。如果钩子子程没有调用CallNextHookEx方法,返回值应该是0 本文来自智动软件zdwork.cn

Remarks 备注 本文来自智动软件zdwork.cn

An application installs this hook procedure by specifying the WH_FOREGROUNDIDLE hook type and the pointer to the hook procedure in a call to the SetWindowsHookEx function.

本文来自智动软件zdwork.cn

应用程序通过下面方式安装该钩子子程:指定WH_ FOREGROUNDIDLE钩子类型;在调用SetWindowsHookEx方法的函数中指向钩子子程的指针。

copyright 智动软件

Helios 2007-4-12

copyright 智动软件

 

  本文来自智动软件zdwork.cn

(责任编辑:admin)
顶一下
(0)
0%
踩一下
(0)
0%

推荐内容

热门内容

相关内容


关于我们 | 联系我们 | 代理合作 | 意见及建议

本站免费提供刷IP软件,另有邮件搜索软件等,需要定制软件或有建议可联系我们。联系方式:QQ:896186342 Email:zdwork@qq.com 滇ICP备08001410号.