网站首页  词典首页

请输入您要查询的函数:

 

术语 lowlevelmouseproc
释义 LowLevelMouseProc
语法:
LRESULT CALLBACK LowLevelMouseProc( int nCode,
WPARAM wParam,
LPARAM lParam
);
LowLevelMouseProc功能
该LowLevelMouseProc挂钩过程是一个应用程序定义或库定义的回调函数中调用SetWindowsHookEx函数使用。该系统调用这个函数每一次新的鼠标输入事件即将发布到一个线程输入队列。鼠标输入可以来自当地的鼠标驱动程序或调用mouse_event函数。如果输入的调用mouse_event来,输入是“注入”。然而,WH_MOUSE_LL挂钩是没有注入到另一个进程。相反,上下文切换回安装该钩子过程,是在其原来的上下文中调用。然后,上下文切换回应用程序产生的事件。
在HOOKPROC类型定义一个指向这个回调函数。 LowLevelMouseProc是一个应用程序的占位符定义或库定义的函数的名称。
参数
nCode
[in]指定的代码程序,使用挂钩,以决定如何处理该消息。如果nCode小于零,钩子程序必须通过信息,CallNextHookEx函数没有进一步的处理,并应归还CallNextHookEx返回的值。此参数可以是下列值之一。
HC_ACTION
的WPARAM和LPARAM参数包含有关鼠标消息的信息。
wParam
[in]指定鼠标的消息标识符。此参数可以是以下消息:WM_LBUTTONDOWN,WM_LBUTTONUP,一条WM_MOUSEMOVE消息,WM_MOUSEWHEEL,WM_MOUSEHWHEEL,WM_RBUTTONDOWN,或WM_RBUTTONUP。
lparam的
[in]指向一个MSLLHOOKSTRUCT结构。
返回值
如果nCode小于零,钩子程序必须归还CallNextHookEx返回的值。
如果nCode大于或等于零,而挂钩程序并不处理消息,强烈建议您调用CallNextHookEx并返回返回值,否则,已经安装WH_MOUSE_LL其他应用程序挂钩将不会收到通知和钩可能行为不正确结果。如果挂钩过程处理的消息,则可能会返回一个非零值,以防止信息传递给钩子链或其他目标窗口程序的系统。
备注
安装的应用程序通过指定WH_MOUSE_LL吊钩式,并在一个呼叫指针挂钩过程的SetWindowsHookEx函数钩子程序。
这被称为钩在安装它的线程上下文。上述呼吁是由发送一个信息,即安装了钩线。因此,安装该挂钩必须有一个消息循环线程。
钩子程序过程中应小于在下面的注册表项LowLevelHooksTimeout值指定的数据录入的时间消息:
HKEY_CURRENT_USER \\控制面板\\桌面
该值以毫秒为单位。如果挂钩过程不会返回在此期间,该系统将信息传递到下一个钩子。
请注意,调试挂钩不能跟踪这种挂钩类型。
功能信息
在Winuser.h中HeaderDeclared,头文件:winuser.h
import libraryNone
最低经营systemsWindows NT 4.0的SP3的
参见
钩概述,CallNextHookEx,mouse_event,MSLLHOOKSTRUCT,钩子,WH_MOUSE_LL,WM_LBUTTONDOWN,WM_LBUTTONUP,一条WM_MOUSEMOVE消息,WM_MOUSEWHEEL,WM_RBUTTONDOWN,WM_RBUTTONUP
==英文原文==LowLevelMouseProc Function
The LowLevelMouseProc hook procedure is an application-defined or library-defined callback function used with the SetWindowsHookEx function. The system call this function every time a new mouse input event is about to be posted into a thread input queue. The mouse input can come from the local mouse driver or from calls to the mouse_event function. If the input comes from a call to mouse_event, the input was "injected". However, the WH_MOUSE_LL hook is not injected into another process. Instead, the context switches back to the process that installed the hook and it is called in its original context. Then the context switches back to the application that generated the event.
The HOOKPROC type defines a pointer to this callback function. LowLevelMouseProc is a placeholder for the application-defined or library-defined function name.
Syntax
LRESULT CALLBACK LowLevelMouseProc( int nCode,
WPARAM wParam,
LPARAM lParam
);
Parameters
nCode
[in] Specifies a code the hook procedure uses to determine how to process the message. If nCode 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. This parameter can be one of the following values.
HC_ACTION
The wParam and lParam parameters contain information about a mouse message.
wParam
[in] Specifies the identifier of the mouse message. This parameter can be one of the following messages: WM_LBUTTONDOWN , WM_LBUTTONUP , WM_MOUSEMOVE , WM_MOUSEWHEEL , WM_MOUSEHWHEEL , WM_RBUTTONDOWN , or WM_RBUTTONUP .
lParam
[in] Pointer to an MSLLHOOKSTRUCT structure.
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, and the hook procedure did not process the message, it is highly recommended that you call CallNextHookEx and return the value it returns; otherwise, other applications that have installed WH_MOUSE_LL hooks will not receive hook notifications and may behave incorrectly as a result. If the hook procedure processed the message, it may return a nonzero value to prevent the system from passing the message to the rest of the hook chain or the target window procedure.
Remarks
An application installs the hook procedure by specifying the WH_MOUSE_LL hook type and a pointer to the hook procedure in a call to the SetWindowsHookEx function.
This hook is called in the context of the thread that installed it. The call is made by sending a message to the thread that installed the hook. Therefore, the thread that installed the hook must have a message loop.
The hook procedure should process a message in less time than the data entry specified in the LowLevelHooksTimeout value in the following registry key:
HKEY_CURRENT_USER\\Control Panel\\Desktop
The value is in milliseconds. If the hook procedure does not return during this interval, the system will pass the message to the next hook.
Note that debug hooks cannot track this type of hook.
Function Information
HeaderDeclared in Winuser.h, include Windows.h
Import libraryNone
Minimum operating systemsWindows NT 4.0 SP3
See Also
Hooks Overview , CallNextHookEx , mouse_event , MSLLHOOKSTRUCT , SetWindowsHookEx , WH_MOUSE_LL , WM_LBUTTONDOWN , WM_LBUTTONUP , WM_MOUSEMOVE , WM_MOUSEWHEEL , WM_RBUTTONDOWN , WM_RBUTTONUP
==原始网址==http://msdn.microsoft.com/en-us/library/ms644986(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 9:20:36