钩子教程 - 原理(二十八) : 结构体 -- CWPSTRUCT / DEBUGHOOKINFO / EVENTMSG

原文地址:http://www.zdexe.com/program/201004/602.html

结构4:CWPSTRUCT Structure

The CWPSTRUCT structure defines the message parameters passed to a WH_CALLWNDPROC hook procedure, CallWndProc.

  CWPSTRUCT 结构定义了传递给WH_CALLWNDPROC钩子子程CallWndProc的消息参数。

Syntax

typedef struct {
    LPARAM lParam;
    WPARAM wParam;
    UINT message;
    HWND hwnd;
} CWPSTRUCT, *PCWPSTRUCT;

lParam  / wParam : Specifies additional information about the message. The exact meaning depends on the message value. 

  指定消息的附加信息。附加的意义取决于message的值。

message : Specifies the message. 

  指定消息

hwnd : Handle to the window to receive the message. 

  接收消息的窗体的句柄。

--------------------------------------------------------------------------------------------------------------------------------------

结构5:DEBUGHOOKINFO Structure

The DEBUGHOOKINFO structure contains debugging information passed to a WH_DEBUG hook procedure, DebugProc.

  DEBUGHOOKINFO结构包含有传递给WH_DEBUG钩子子程DebugProc的调试信息。

Syntax

typedef struct {
    DWORD idThread;
    DWORD idThreadInstaller;
    LPARAM lParam;
    WPARAM wParam;
    int code;
} DEBUGHOOKINFO, *PDEBUGHOOKINFO;

Members成员

idThread

Handle to the thread containing the filter function. 包含过滤方法的线程的句柄。

idThreadInstaller

Handle to the thread that installed the debugging filter function. 安装调试过滤方法的线程的句柄。

lParam / wParam

Specifies the value to be passed to the hook in the lParamparameter of the DebugProc callback function. 指定在DebugProc回调函数的lParam/ wParam 参数中,要传递给钩子的值。

code

Specifies the value to be passed to the hook in the nCodeparameter of the DebugProc callback function. 指定在DebugProc回调函数的nCode 参数中,要传递给钩子的值。

-------------------------------------------------------------------------------------------------------

结构6:EVENTMSG Structure

The EVENTMSG structure contains information about a hardware message sent to the system message queue. This structure is used to store message information for the JournalPlaybackProc callback function.

  该结构包含有关于硬件的消息,该消息被发送给系统的消息队列。该结构用来为JournalPlaybackProc回调函数存储消息的信息。

Syntax语法

typedef struct {
    UINT message;
    UINT paramL;
    UINT paramH;
    DWORD time;
    HWND hwnd;
} EVENTMSG, *PEVENTMSG;

 

message : Specifies the message. 

  指定消息。

paramH / paramH : Specifies additional information about the message. The exact meaning depends on the message value. 

  指定消息的附加信息。附加的意义取决于message的值。

time : Specifies the time at which the message was posted. 

  消息被传递时的时间 。

hwnd : Handle to the window to which the message was posted. 

  消息被传给的窗口的句柄。

 

posted @ 2016-05-17 15:09  C/C++/Python/Java  阅读(1373)  评论(0编辑  收藏  举报