C# Class ULib.Core.NativeSystem.Native

A class that manages a global low level keyboard hook
Afficher le fichier Open project: mind0n/hive

Méthodes publiques

Свойство Type Description
HookedKeys List

Méthodes publiques

Méthode Description
Hook ( ) : void

Installs the global hook

Native ( ) : System

Initializes a new instance of the Native class and installs the keyboard hook.

Unhook ( ) : void

Uninstalls the global hook

hookProc ( int code, int wParam, keyboardHookStruct &lParam ) : int

The callback for the keyboard hook

Private Methods

Méthode Description
CallNextHookEx ( IntPtr idHook, int nCode, int wParam, keyboardHookStruct &lParam ) : int
LoadLibrary ( string lpFileName ) : IntPtr
SetKeyStatus ( int key, bool status ) : bool
SetWindowsHookEx ( int idHook, keyboardHookProc callback, IntPtr hInstance, uint threadId ) : IntPtr
UnhookWindowsHookEx ( IntPtr hInstance ) : bool

Method Details

Hook() public méthode

Installs the global hook
public Hook ( ) : void
Résultat void

Native() public méthode

Initializes a new instance of the Native class and installs the keyboard hook.
public Native ( ) : System
Résultat System

Unhook() public méthode

Uninstalls the global hook
public Unhook ( ) : void
Résultat void

hookProc() public méthode

The callback for the keyboard hook
public hookProc ( int code, int wParam, keyboardHookStruct &lParam ) : int
code int The hook code, if it isn't >= 0, the function shouldn't do anyting
wParam int The event type
lParam keyboardHookStruct The keyhook event information
Résultat int

Property Details

HookedKeys public_oe property

The collections of keys to watch for
public List HookedKeys
Résultat List