网站首页  词典首页

请输入您要查询的函数:

 

术语 journalrecordproc
释义 JournalRecordProc
语法:
LRESULT CALLBACK JournalRecordProc( int code,
WPARAM wParam,
LPARAM lParam
);
JournalRecordProc功能
该JournalRecordProc挂钩过程是一个应用程序定义或库定义的回调函数中调用SetWindowsHookEx函数使用。函数记录信息系统从系统消息队列中删除。后来,一个应用程序可以使用JournalPlaybackProc钩子程序来播放的消息。
在HOOKPROC类型定义一个指向这个回调函数。 JournalRecordProc是一个应用程序的占位符定义或库定义的函数的名称。
参数
代码
[in]指定如何处理消息。如果代码小于零,钩子程序必须通过信息,CallNextHookEx函数没有进一步的处理,并应归还CallNextHookEx返回的值。此参数可以是下列值之一。
HC_ACTION
lParam参数是一个EVENTMSG结构,其中包含从系统队列中删除邮件信息的指针。挂钩过程必须记录复制到一个缓冲区或文件的结构的内容。
HC_SYSMODALOFF
阿系统模式对话框已经被摧毁。挂钩过程必须恢复记录。
HC_SYSMODALON
阿系统模式对话框显示。直到对话框被破坏,挂钩过程必须停止录制。
wParam
此参数没有使用。
lparam的
[in]指向一个EVENTMSG结构,它包含的信息被记录下来。
返回值
返回值将被忽略。
备注
阿JournalRecordProc挂钩过程必须复制,但是不能修改的消息。挂钩过程后,返回控制系统,该消息继续进行处理。
安装通过指定WH_JOURNALRECORD钩子类型和在调用指针挂钩过程的SetWindowsHookEx函数的JournalRecordProc挂钩过程。
阿JournalRecordProc挂钩过程并不需要住在一个动态链接库。阿JournalRecordProc挂钩过程可以住在应用程序本身。
与大多数其他全球钩子程序,JournalRecordProc和JournalPlaybackProc钩一直呼吁程序在线程的情况下,设置此挂钩。
一个已安装了JournalRecordProc挂钩过程应留意VK_CANCEL应用虚拟键码(即推行,因为在大多数按Ctrl + Break键键盘组合)。这个虚拟的关键代码应解释为一个信号,即用户希望停止期刊录音应用。应用程序应该响应结束记录的顺序和消除JournalRecordProc挂钩过程。清除是重要的。它可以防止被锁定,由挂钩过程内悬挂系统日志的应用。
这是一个信号,停止期刊记录的作用意味着,按Ctrl + Break组合键本身不能被记录下来。由于按Ctrl + C组合键也没有这样一个日志信号的作用,它可以被记录下来。其他的有两个,不能记录:CTRL + ESC键和Ctrl + Alt + Del组合键组合。这两个组合键导致系统停止所有日志活动(记录或播放),删除所有日志挂钩,并张贴WM_CANCELJOURNAL信息,日志应用程序。
功能信息
在Winuser.h中HeaderDeclared,头文件:winuser.h
import libraryNone
最低操作系统Windows 95,Windows NT 3.1
参见
钩概述,CallNextHookEx,EVENTMSG,JournalPlaybackProc,钩子,WM_CANCELJOURNAL
==英文原文==JournalRecordProc Function
The JournalRecordProc hook procedure is an application-defined or library-defined callback function used with the SetWindowsHookEx function. The function records messages the system removes from the system message queue. Later, an application can use a JournalPlaybackProc hook procedure to play back the messages.
The HOOKPROC type defines a pointer to this callback function. JournalRecordProc is a placeholder for the application-defined or library-defined function name.
Syntax
LRESULT CALLBACK JournalRecordProc( int code,
WPARAM wParam,
LPARAM lParam
);
Parameters
code
[in] Specifies 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_ACTION
The lParam parameter is a pointer to an EVENTMSG structure containing information about a message removed from the system queue. The hook procedure must record the contents of the structure by copying them to a buffer or file.
HC_SYSMODALOFF
A system-modal dialog box has been destroyed. The hook procedure must resume recording.
HC_SYSMODALON
A system-modal dialog box is being displayed. Until the dialog box is destroyed, the hook procedure must stop recording.
wParam
This parameter is not used.
lParam
[in] Pointer to an EVENTMSG structure that contains the message to be recorded.
Return Value
The return value is ignored.
Remarks
A JournalRecordProc hook procedure must copy but not modify the messages. After the hook procedure returns control to the system, the message continues to be processed.
Install the JournalRecordProc hook procedure by specifying the WH_JOURNALRECORD hook type and a pointer to the hook procedure in a call to the SetWindowsHookEx function.
A JournalRecordProc hook procedure does not need to live in a dynamic-link library. A JournalRecordProc hook procedure can live in the application itself.
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.
An application that has installed a JournalRecordProc hook procedure should watch for the VK_CANCEL virtual key code (which is implemented as the CTRL+BREAK key combination on most keyboards). This virtual key code should be interpreted by the application as a signal that the user wishes to stop journal recording. The application should respond by ending the recording sequence and removing the JournalRecordProc hook procedure. Removal is important. It prevents a journaling application from locking up the system by hanging inside a hook procedure.
This role as a signal to stop journal recording means that a CTRL+BREAK key combination cannot itself be recorded. Since the CTRL+C key combination has no such role as a journaling signal, it can be recorded. There are two other key combinations that cannot be recorded: CTRL+ESC and CTRL+ALT+DEL. Those two key combinations cause the system to stop all journaling activities (record or playback), remove all journaling hooks, and post a WM_CANCELJOURNAL message to the journaling application.
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 , JournalPlaybackProc , SetWindowsHookEx , WM_CANCELJOURNAL
==原始网址==http://msdn.microsoft.com/en-us/library/ms644983(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:28:54