网站首页  词典首页

请输入您要查询的函数:

 

术语 getmsgproc
释义 GetMsgProc
语法:
LRESULT CALLBACK GetMsgProc( int code,
WPARAM wParam,
LPARAM lParam
);
GetMsgProc函数
该GetMsgProc函数是一个应用程序定义或库定义的回调函数中调用SetWindowsHookEx函数使用。每当系统调用GetMessage或PeekMessage函数有来自应用程序消息队列的消息这个功能。在返回的检索信息,来电,系统传递到挂钩过程。
在HOOKPROC类型定义一个指向这个回调函数。 GetMsgProc是一个应用程序的占位符定义或库定义的函数的名称。
参数
代码
[in]指定是否挂钩过程必须处理的消息。如果代码是HC_ACTION,挂钩过程必须处理的消息。如果代码小于零,钩子程序必须通过信息,CallNextHookEx函数没有进一步的处理,并应归还CallNextHookEx返回的值。
wParam
[in]指定的信息是否已被从队列中删除。此参数可以是下列值之一。
PM_NOREMOVE
指定该消息尚未从队列中删除。 (应用程序称为PeekMessage函数,指定PM_NOREMOVE标志。)
PM_REMOVE
指定该邮件已被从队列中删除。 (应用程序调用GetMessage,或称为PeekMessage函数,指定PM_REMOVE标志。)
lparam的
[in]指向一个MSG结构,它包含有关信件的具体内容。
返回值
如果代码小于零,钩子程序必须归还CallNextHookEx返回的值。
如果代码是大于或等于零,强烈建议您调用CallNextHookEx并返回返回值,否则,已经安装WH_GETMESSAGE其他应用程序挂钩钩将不会收到通知,并可能表现为一个结果不正确。如果挂钩过程不会调用CallNextHookEx,返回值应为零。
备注
在GetMsgProc挂钩过程可以检查或修改信息。挂钩过程后,返回控制系统,GetMessage或PeekMessage函数返回的消息,以及任何修改,以原来的应用程序调用它。
安装的应用程序通过指定WH_GETMESSAGE挂钩类型和在调用指针挂钩过程的SetWindowsHookEx函数此挂钩过程。
功能信息
在Winuser.h中HeaderDeclared,头文件:winuser.h
import libraryNone
最低操作系统Windows 95,Windows NT 3.1
参见
钩概述,CallNextHookEx,GetMessage,味精,PeekMessage,调用SetWindowsHookEx
==英文原文==GetMsgProc Function
The GetMsgProc function is an application-defined or library-defined callback function used with the SetWindowsHookEx function. The system calls this function whenever the GetMessage or PeekMessage function has retrieved a message from an application message queue. Before returning the retrieved message to the caller, the system passes the message to the hook procedure.
The HOOKPROC type defines a pointer to this callback function. GetMsgProc is a placeholder for the application-defined or library-defined function name.
Syntax
LRESULT CALLBACK GetMsgProc( int code,
WPARAM wParam,
LPARAM lParam
);
Parameters
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.
wParam
[in] Specifies whether the message has been removed from the queue. This parameter can be one of the following values.
PM_NOREMOVE
Specifies that the message has not been removed from the queue. (An application called the PeekMessage function, specifying the PM_NOREMOVE flag.)
PM_REMOVE
Specifies that the message has been removed from the queue. (An application called GetMessage, or it called the PeekMessage function, specifying the PM_REMOVE flag.)
lParam
[in] Pointer to an MSG structure that contains details about the message.
Return Value
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_GETMESSAGE 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 GetMsgProc hook procedure can examine or modify the message. After the hook procedure returns control to the system, the GetMessage or PeekMessage function returns the message, along with any modifications, to the application that originally called it.
An application installs this hook procedure by specifying the WH_GETMESSAGE 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 , GetMessage , MSG , PeekMessage , SetWindowsHookEx
==原始网址==http://msdn.microsoft.com/en-us/library/ms644981(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:29:03