网站首页  词典首页

请输入您要查询的函数:

 

术语 journalplaybackproc
释义 JournalPlaybackProc
语法:
LRESULT CALLBACK JournalPlaybackProc( int code,
WPARAM wParam,
LPARAM lParam
);
JournalPlaybackProc功能
该JournalPlaybackProc挂钩过程是一个应用程序定义或库定义的回调函数中调用SetWindowsHookEx函数使用。通常,应用程序使用此函数来播放的鼠标和键盘消息系列以前JournalRecordProc挂钩过程记录下来。只要一JournalPlaybackProc安装钩子程序,定期鼠标和键盘输入被禁用。
在HOOKPROC类型定义一个指向这个回调函数。 JournalPlaybackProc是一个应用程序的占位符定义或库定义的函数的名称。
参数
代码
[in]指定的代码程序,使用挂钩,以决定如何处理该消息。如果代码小于零,钩子程序必须通过信息,CallNextHookEx函数没有进一步的处理,并应归还CallNextHookEx返回的值。此参数可以是下列值之一。
HC_GETNEXT
挂钩过程必须将目前的鼠标或键盘的信息,EVENTMSG结构指出lParam参数的。
HC_NOREMOVE
一个应用程序有所谓的PeekMessage函数与wRemoveMsg设置为PM_NOREMOVE,表明该邮件是不是从后PeekMessage处理邮件队列中删除。
HC_SKIP
挂钩过程必须准备复制下一个鼠标或键盘的信息,EVENTMSG结构指向lparam的。在收到HC_GETNEXT代码,挂钩过程必须复制信息的结构。
HC_SYSMODALOFF
阿系统模式对话框已经被摧毁。挂钩过程必须恢复播放的消息。
HC_SYSMODALON
阿系统模式对话框显示。直到对话框被破坏,挂钩过程必须停止播放的消息。
wParam
此参数没有使用。
lparam的
[in]指向一个EVENTMSG结构,代表了信息正在处理钩子程序。此参数仅适用代码参数HC_GETNEXT。
返回值
为了处理收到的信息系统等,返回值必须是时间,时钟滴答,该系统应等待。 (这个值可以计算通过计算成员之间的时间在当前和以往不同的输入信息。)为处理该消息立即返回值应为零。返回值是只会在钩子代码HC_GETNEXT,否则,它将被忽略。
备注
阿JournalPlaybackProc挂钩过程应该复制输入的信息,lParam参数。该消息必须是以前录制的使用JournalRecordProc挂钩过程,这不应该修改的消息。
检索反复相同的消息,钩子程序可以调用设置为HC_GETNEXT没有设置为HC_SKIP干预代码调用代码参数几次。
如果代码是HC_GETNEXT和返回值大于零,系统休眠由返回值指定的毫秒数。当系统仍在继续,它调用钩子程序重新设置为HC_GETNEXT检索相同的邮件代码。从这个新的调用JournalPlaybackProc返回值应该是零,否则,系统会回去睡觉了由返回值指定的毫秒数,再次呼吁JournalPlaybackProc,等等。该系统将显示为没有响应。
与大多数其他全球钩子程序,JournalRecordProc和JournalPlaybackProc钩一直呼吁程序在线程的情况下,设置此挂钩。
挂钩过程后,返回控制系统,该消息继续进行处理。如果代码是HC_SKIP,钩子程序必须准备返回其下一代呼吁下记录事件消息。
安装通过指定WH_JOURNALPLAYBACK钩子类型和在调用指针挂钩过程的SetWindowsHookEx函数的JournalPlaybackProc挂钩过程。
如果用户按Ctrl + Esc或按Ctrl + Alt +德尔在杂志播放,系统停止播放,unhooks杂志播放程序,岗位WM_CANCELJOURNAL信息,日志应用程序。
如果挂钩过程返回一个范围内的信息WM_KEYFIRST的WM_KEYLAST,适用下列条件:
该EVENTMSG结构paramL成员指定的是按键的虚拟键码。
该EVENTMSG结构paramH成员指定的扫描码。
没有办法指定的重复计数。这次活动是始终代表一个关键事件。
功能信息
在Winuser.h中HeaderDeclared,头文件:winuser.h
import libraryNone
最低操作系统Windows 95,Windows NT 3.1
参见
钩概述,CallNextHookEx,EVENTMSG,JournalRecordProc,PeekMessage,钩子,WM_CANCELJOURNAL
==英文原文==JournalPlaybackProc Function
The JournalPlaybackProc hook procedure is an application-defined or library-defined callback function used with the SetWindowsHookEx function. Typically, an application uses this function to play back a series of mouse and keyboard messages recorded previously by the JournalRecordProc hook procedure. As long as a JournalPlaybackProc hook procedure is installed, regular mouse and keyboard input is disabled.
The HOOKPROC type defines a pointer to this callback function. JournalPlaybackProc is a placeholder for the application-defined or library-defined function name.
Syntax
LRESULT CALLBACK JournalPlaybackProc( int code,
WPARAM wParam,
LPARAM lParam
);
Parameters
code
[in] Specifies a code the hook procedure uses to determine how to 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. This parameter can be one of the following values.
HC_GETNEXT
The hook procedure must copy the current mouse or keyboard message to the EVENTMSG structure pointed to by the lParam parameter.
HC_NOREMOVE
An application has called the PeekMessage function with wRemoveMsg set to PM_NOREMOVE, indicating that the message is not removed from the message queue after PeekMessage processing.
HC_SKIP
The hook procedure must prepare to copy the next mouse or keyboard message to the EVENTMSG structure pointed to by lParam. Upon receiving the HC_GETNEXT code, the hook procedure must copy the message to the structure.
HC_SYSMODALOFF
A system-modal dialog box has been destroyed. The hook procedure must resume playing back the messages.
HC_SYSMODALON
A system-modal dialog box is being displayed. Until the dialog box is destroyed, the hook procedure must stop playing back messages.
wParam
This parameter is not used.
lParam
[in] Pointer to an EVENTMSG structure that represents a message being processed by the hook procedure. This parameter is valid only when the code parameter is HC_GETNEXT.
Return Value
To have the system wait before processing the message, the return value must be the amount of time, in clock ticks, that the system should wait. (This value can be computed by calculating the difference between the time members in the current and previous input messages.) To process the message immediately, the return value should be zero. The return value is used only if the hook code is HC_GETNEXT; otherwise, it is ignored.
Remarks
A JournalPlaybackProc hook procedure should copy an input message to the lParam parameter. The message must have been previously recorded by using a JournalRecordProc hook procedure, which should not modify the message.
To retrieve the same message over and over, the hook procedure can be called several times with the code parameter set to HC_GETNEXT without an intervening call with code set to HC_SKIP.
If code is HC_GETNEXT and the return value is greater than zero, the system sleeps for the number of milliseconds specified by the return value. When the system continues, it calls the hook procedure again with code set to HC_GETNEXT to retrieve the same message. The return value from this new call to JournalPlaybackProc should be zero; otherwise, the system will go back to sleep for the number of milliseconds specified by the return value, call JournalPlaybackProc again, and so on. The system will appear to be not responding.
Unlike most other global hook procedures, the JournalRecordProc and JournalPlaybackProc hook procedures are always called in the context of the thread that set the hook.
After the hook procedure returns control to the system, the message continues to be processed. If code is HC_SKIP, the hook procedure must prepare to return the next recorded event message on its next call.
Install the JournalPlaybackProc hook procedure by specifying the WH_JOURNALPLAYBACK hook type and a pointer to the hook procedure in a call to the SetWindowsHookEx function.
If the user presses CTRL+ESC OR CTRL+ALT+DEL during journal playback, the system stops the playback, unhooks the journal playback procedure, and posts a WM_CANCELJOURNAL message to the journaling application.
If the hook procedure returns a message in the range WM_KEYFIRST to WM_KEYLAST, the following conditions apply:
The paramL member of the EVENTMSG structure specifies the virtual key code of the key that was pressed.
The paramH member of the EVENTMSG structure specifies the scan code.
There's no way to specify a repeat count. The event is always taken to represent one key event.
Function Information
HeaderDeclared in Winuser.h, include Windows.h
Import libraryNone
Minimum operating systemsWindows 95, Windows NT 3.1
See Also
Hooks Overview , CallNextHookEx , EVENTMSG , JournalRecordProc , PeekMessage , SetWindowsHookEx , WM_CANCELJOURNAL
==原始网址==http://msdn.microsoft.com/en-us/library/ms644982(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:24:37