网站首页  词典首页

请输入您要查询的函数:

 

术语 callwndproc
释义 CallWndProc
语法:
LRESULT CALLBACK CallWndProc( int nCode,
WPARAM wParam,
LPARAM lParam
);
CallWndProc功能
该CallWndProc挂钩过程是一个应用程序定义或库定义的回调函数中调用SetWindowsHookEx函数使用。
Windows 95/98/Me中时,Windows NT 3.51:系统调用该函数每当线程调用SendMessage函数。该WH_CALLWNDPROC挂钩被称为在线程的上下文中调用SendMessage消息,而不是线程接收消息。
Windows NT 4.0和更高版本:该系统调用,然后再调用窗口过程处理邮件发送到该函数的线程。
在HOOKPROC类型定义一个指向这个回调函数。 CallWndProc是一个应用程序的占位符定义或库定义的函数的名称。
参数
nCode
[in]指定是否挂钩过程必须处理的消息。如果nCode是HC_ACTION,挂钩过程必须处理的消息。如果nCode小于零,钩子程序必须通过信息,CallNextHookEx函数没有进一步的处理,必须归还CallNextHookEx返回的值。
wParam
[in]消息是否是由当前线程发送指定。如果消息是由当前线程发送,它是非零,否则,它是零。
lparam的
[in]指向1 CWPSTRUCT结构,其中包含有关信件的具体内容。
返回值
如果nCode小于零,钩子程序必须归还CallNextHookEx返回的值。
如果nCode大于或等于零,强烈建议您调用CallNextHookEx并返回返回值,否则,已经安装WH_CALLWNDPROC其他应用程序挂钩钩将不会收到通知,并可能表现为一个结果不正确。如果挂钩过程不会调用CallNextHookEx,返回值应为零。
备注
该CallWndProc挂钩过程可以检查邮件,但不能对其进行修改。挂钩过程后,返回控制系统,消息传递给窗口过程。
安装的应用程序通过指定WH_CALLWNDPROC挂钩类型和在调用指针挂钩过程的SetWindowsHookEx函数钩子程序。
功能信息
在Winuser.h中HeaderDeclared,头文件:winuser.h
import libraryNone
最低操作系统Windows 95,Windows NT 3.1
参见
钩概述,CallNextHookEx,CWPSTRUCT,SendMessage消息,调用SetWindowsHookEx
==英文原文==CallWndProc Function
The CallWndProc hook procedure is an application-defined or library-defined callback function used with the SetWindowsHookEx function.
Windows 95/98/Me, Windows NT 3.51: The system calls this function whenever the thread calls the SendMessage function. The WH_CALLWNDPROC hook is called in the context of the thread that calls SendMessage, not the thread that receives the message.
Windows NT 4.0 and later: The system calls this function before calling the window procedure to process a message sent to the thread.
The HOOKPROC type defines a pointer to this callback function. CallWndProc is a placeholder for the application-defined or library-defined function name.
Syntax
LRESULT CALLBACK CallWndProc( int nCode,
WPARAM wParam,
LPARAM lParam
);
Parameters
nCode
[in] 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
[in] 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
[in] Pointer to a CWPSTRUCT structure that contains details about the message.
Return Value
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 a pointer to the hook procedure in a call to the SetWindowsHookEx function.
Function Information
HeaderDeclared in Winuser.h, include Windows.h
Import libraryNone
Minimum operating systemsWindows 95, Windows NT 3.1
See Also
Hooks Overview , CallNextHookEx , CWPSTRUCT , SendMessage , SetWindowsHookEx
==原始网址==http://msdn.microsoft.com/en-us/library/ms644975(VS.85).aspx\n
随便看

 

windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。

 

Copyright © 2004-2023 Winrtm.com All Rights Reserved
京ICP备2021023879号-40 更新时间:2024/10/6 11:30:36