Search
Module:
Directory

   Desktop Functions:

   Smart Device Functions:


Show Recent Changes
Subscribe (RSS)
Misc. Pages
Comments
FAQ
Helpful Tools
Playground
Suggested Reading
Website TODO List
Download Visual Studio Add-In

HookType (Enums)
 
.
Summary
Summary

C# Definition:

    /// <summary>
    /// Enumerates the valid hook types passed as the idHook parameter into a call to SetWindowsHookEx.
    /// </summary>
    public enum HookType : int
    {
public enum HookType : int
{
    /// <summary>
    /// Installs a hook procedure that monitors messages generated as a result of an input event in a dialog box,
    /// message box, menu, or scroll bar. For more information, see the MessageProc hook procedure.
    /// </summary>
    WH_MSGFILTER = -1,
    /// <summary>
    /// Installs a hook procedure that records input messages posted to the system message queue. This hook is
    /// useful for recording macros. For more information, see the JournalRecordProc hook procedure.
    /// </summary>
    WH_JOURNALRECORD = 0,
    /// <summary>
    /// Installs a hook procedure that posts messages previously recorded by a WH_JOURNALRECORD hook procedure.
    /// For more information, see the JournalPlaybackProc hook procedure.
    /// </summary>
    WH_JOURNALPLAYBACK = 1,
    /// <summary>
    /// Installs a hook procedure that monitors keystroke messages. For more information, see the KeyboardProc
    /// hook procedure.
    /// </summary>
    WH_KEYBOARD = 2,
    /// <summary>
    /// Installs a hook procedure that monitors messages posted to a message queue. For more information, see the
    /// GetMsgProc hook procedure.
    /// </summary>
    WH_GETMESSAGE = 3,
    /// <summary>
    /// Installs a hook procedure that monitors messages before the system sends them to the destination window
    /// procedure. For more information, see the CallWndProc hook procedure.
    /// </summary>
    WH_CALLWNDPROC = 4,
    /// <summary>
    /// Installs a hook procedure that receives notifications useful to a CBT application. For more information,
    /// see the CBTProc hook procedure.
    /// </summary>
    WH_CBT = 5,
    /// <summary>
    /// Installs a hook procedure that monitors messages generated as a result of an input event in a dialog box,
    /// message box, menu, or scroll bar. The hook procedure monitors these messages for all applications in the
    /// same desktop as the calling thread. For more information, see the SysMsgProc hook procedure.
    /// message box, menu, or scroll bar. The hook procedure monitors these messages for all applications in the same desktop as the calling thread. For more information, see the SysMsgProc hook procedure.
    /// </summary>
    WH_SYSMSGFILTER = 6,
    /// <summary>
    /// Installs a hook procedure that monitors mouse messages. For more information, see the MouseProc hook
    /// procedure.
    /// </summary>
    WH_MOUSE = 7,
    /// <summary>
    ///
    /// </summary>
    WH_HARDWARE = 8,
    /// <summary>
    /// Installs a hook procedure useful for debugging other hook procedures. For more information, see the
    /// DebugProc hook procedure.
    /// </summary>
    WH_DEBUG = 9,
    /// <summary>
    /// Installs a hook procedure that receives notifications useful to shell applications. For more information,
    /// see the ShellProc hook procedure.
    /// </summary>
    WH_SHELL = 10,
    /// <summary>
    /// Installs a hook procedure that will be called when the application's foreground thread is about to become
    /// idle. This hook is useful for performing low priority tasks during idle time. For more information, see the
    /// ForegroundIdleProc hook procedure.
    /// </summary>
    WH_FOREGROUNDIDLE = 11,
    /// <summary>
    /// Installs a hook procedure that monitors messages after they have been processed by the destination window
    /// procedure. For more information, see the CallWndRetProc hook procedure.
    /// </summary>
    WH_CALLWNDPROCRET = 12,
    /// <summary>
    /// Installs a hook procedure that monitors low-level keyboard input events. For more information, see the
    /// LowLevelKeyboardProc hook procedure.
    /// </summary>
    WH_KEYBOARD_LL = 13,
    /// <summary>
    /// Installs a hook procedure that monitors low-level mouse input events. For more information, see the
    /// LowLevelMouseProc hook procedure.
    /// </summary>
    WH_MOUSE_LL = 14
    }
}

VB Definition:

Enum HookType as Integer
     WH_JOURNALRECORD = 0
     WH_JOURNALPLAYBACK = 1
     WH_KEYBOARD = 2
     WH_GETMESSAGE = 3
     WH_CALLWNDPROC = 4
     WH_CBT = 5
     WH_SYSMSGFILTER = 6
     WH_MOUSE = 7
     WH_HARDWARE = 8
     WH_DEBUG = 9
     WH_SHELL = 10
     WH_FOREGROUNDIDLE = 11
     WH_CALLWNDPROCRET = 12
     WH_KEYBOARD_LL = 13
     WH_MOUSE_LL = 14
End Enum

User-Defined Types:

None.

Notes:

For the details about each of the values visit http://msdn.microsoft.com/en-us/library/windows/desktop/ms644990(v=vs.85).aspx

Tips & Tricks:

Please add some!

Sample Code:

Please add some!

Alternative Managed API:

Do you know one? Please contribute it!

Documentation
SetWindowsHookEx related documentation on MSDN
 

Please edit this page!

Do you have...

  • helpful tips?
  • corrections to the existing content?
  • additional languages you want to include?

Select "Edit This Page" on the right hand toolbar and edit it!

 
Access PInvoke.net directly from VS:
Terms of Use
Edit This Page
Find References
Show Printable Version
Revisions