⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cpkeyblockhookreg.pas

📁 键盘钩子程序及控件, C++ Builder 和DELPHI可用
💻 PAS
字号:
{*****************************************************************************
 * UnitName:  CPKeyBlockHookReg
 * Version:   1.5
 * Created:   10/06/2004
 * Updated:   29/03/2005
 * Purpose:   NT Keyboard Blocking Hook Registration Unit.
 * Developer: BITLOGIC Software
 * Email:     development@bitlogic.co.uk
 * WebPage:   http://www.bitlogic.co.uk
 *****************************************************************************}

{*****************************************************************************

  29/03/2005 Updated to Version 1.5
  
  CPKeyBlockHook.pas Updated:
  Changed TKeyNames.KeyChar to WideChar for supporting Unicode characters and
  Foreign Keyboard Layouts with dead key character keys.

  KeyBlockHook.dll Updated:
  Fixed pMMF.BlockKeys.HK_ALT_F4 in HookSystemKeyboard_Proc which was prevented
  ALT + F4 (Close Window) from being Blocked.

  29/01/2005 Updated to Version 1.4

  Hard-coded DeallocateHwnd within the unit and also updated the DeallocateHwnd
  procedure which I think could be the cause of some AV's when using the Hook
  within a WinNT Service.

  Added function UpdateHook: boolean;

  The Function UpdateHook will notify the Hook of any changes made to the published
  properties (BlockKeys,DisableKeyboard,BlockSystemKeys,HookInjected). This will allow
  you to update the settings without having to stop and start the Hook. To use this
  function you simply set the new properties then call UpdateHook.
  
  23/11/2004 Updated to Version 1.3

  Added a new HookInjected boolean parameter to the HookStart procedure which
  will enable or disable the hooking of Injected Keys sent via the Windows
  function calls to keyb_event.

  05/07/2004 Updated to Version 1.2

  The Hook DLL is now automatically loaded with the Start_KeyHook function and
  unloaded with the Stop_KeyHook function. The loading of the DLL was removed
  from the TCPKeyHook.OnCreate event to prevent problems if the DLL was missing.

  Added Boolean Blocked to TKeyHookedEvent to indicate if the Key was blocked
  by the Hook. 

  30/06/2004 Updated to Version 1.1

  The Hook DLL is now loaded dynamically using the LoadLibrary function and
  functions into the DLL are obtained by GetProcAddress. This was implemented
  to prevent error message if DLL could not be found.

  Added new property (HookLibLoaded: Boolean) to indicate if the DLL and functions
  successfully loaded. The Keyboard Hook will not start if this is False.

  Added new property (LicenceCode: string) for the DLL Licence check. For trial
  use this property can be left blank. Licenced users should set this property
  with your Licence Code for non-trial use.

*****************************************************************************}

unit CPKeyBlockHookReg;

interface

uses classes, cpkeyblockhook;

procedure Register;

implementation

procedure Register;
begin
 RegisterComponents('BITLOGIC', [TCPKeyBlockHook]);
end;

end.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -