免费视频淫片aa毛片_日韩高清在线亚洲专区vr_日韩大片免费观看视频播放_亚洲欧美国产精品完整版

打開(kāi)APP
userphoto
未登錄

開(kāi)通VIP,暢享免費(fèi)電子書(shū)等14項(xiàng)超值服

開(kāi)通VIP
通過(guò)api和鍵盤(pán)鉤子徹底屏蔽任務(wù)條和開(kāi)始菜單


關(guān)鍵詞:通過(guò)api和鍵盤(pán)鉤子徹底屏蔽任務(wù)條和開(kāi)始菜單
 

在一些碰到過(guò)的多媒體軟件編制過(guò)程中通常需要徹底屏蔽任務(wù)條,通常的辦法是調(diào)用ShowWindow(h,SW_hide)來(lái)隱藏任務(wù)條,但是不能屏蔽開(kāi)始菜單,通過(guò)鍵盤(pán)的win功能鍵還是可以打開(kāi)開(kāi)始菜單,所以配合鍵盤(pán)鉤子,來(lái)屏蔽開(kāi)始菜單。



library HIDE;

{ Important note about DLL memory management: ShareMem must be the
  first unit in your library's USES clause AND your project's (select
  Project-View Source) USES clause if your DLL exports any procedures or
  functions that pass strings as parameters or function results. This
  applies to all strings passed to and from your DLL--even those that
  are nested in records and classes. ShareMem is the interface unit to
  the BORLNDMM.DLL shared memory manager, which must be deployed along
  with your DLL. To avoid using BORLNDMM.DLL, pass string information
  using PChar or ShortString parameters. }

uses
  SysUtils,
  Classes,
  windows,
  messages;

var
hHk :HHOOK;
type
  PKBDLLHOOKSTRUCT = ^KBDLLHOOKSTRUCT;
  KBDLLHOOKSTRUCT = record
    vkCode: DWORD;
    ScanCode: DWORD;
    Flags: DWORD;
    Time: DWORD;
    dwExtraInfo: DWORD;
  end;
{$R *.res}
function ycxsks( yc:Boolean): Boolean;stdcall; //隱藏-顯示任務(wù)條
var
h:THandle;
begin
if yc = True then
  begin
    h:=FindWindow('Shell_TrayWnd',nil);
    ShowWindow(h,SW_hide); //隱藏任務(wù)條
  end
else
  begin
    h:=FindWindow('Shell_TrayWnd',nil);
    ShowWindow(h,SW_SHOW); //顯示任務(wù)條
  end;
Result:=true;
end;

function keyHookProc(nCode: Integer;WParam: WPARAM;LParam: LPARAM): LRESULT;stdcall;
//調(diào)用鍵盤(pán)鉤子,屏蔽左右win功能鍵
var
p: PKBDLLHOOKSTRUCT;
y: integer;
begin
if nCode<0 then
  Result:= CallNextHookEx(hHk,nCode,WParam,LParam)
else
  begin
    y := 0;
    case WParam of
    WM_KEYDOWN,WM_SYSKEYDOWN: //按鍵后判斷所按鍵
      begin
        p:=PKBDLLHOOKSTRUCT(Lparam); 
        if p^.vkCode = VK_LWIN then
          y := 1;
        if p^.vkCode = VK_RWIN then
          y := 1;
      end;
    WM_KEYUP,WM_SYSKEYUP: //松開(kāi)按鍵后判斷所按鍵
      begin
        p:=PKBDLLHOOKSTRUCT(Lparam);
        if p^.vkCode = VK_LWIN then
          y := 1;
        if p^.vkCode = VK_RWIN then
          y := 1;
      end;
    end;
    if y=1 then
      Result:=1 //如果為WIN功能鍵則屏蔽
    else
      Result:= CallNextHookEx(hHk,nCode,WParam,LParam); //其他鍵放下一個(gè)鉤子
  end
end;

function Enablehide:Boolean;stdcall;export; //外部調(diào)用
begin
if hHk = 0 then
  begin
    hHk := SetWindowsHookEx(13,@keyHookProc,HInstance,0);
    Result := True;
  end
else
  Result := False;
ycxsks(true);
end;

function Disablehide:Boolean; stdcall; export; //外部調(diào)用
begin
if hHk <> 0 then
  begin
    UnHookWindowsHookEx(hHk);
    hHk := 0;
    Result := True;
  end
else
  Result := False;
ycxsks(False);
end;

exports
Enablehide,
Disablehide;
end.



 

本站僅提供存儲(chǔ)服務(wù),所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請(qǐng)點(diǎn)擊舉報(bào)
打開(kāi)APP,閱讀全文并永久保存 查看更多類似文章
猜你喜歡
類似文章
delphi 低級(jí)鍵盤(pán)鉤子
學(xué)用鉤子函數(shù) - Qi
屏蔽F1的練習(xí)(hook)
Delphi中DLL的創(chuàng)建和使用
在游戲中切出外掛delphi代碼(hook)
C# 區(qū)分鍵盤(pán)和紅外線掃描槍輸入 模擬掃描槍
更多類似文章 >>
生活服務(wù)
分享 收藏 導(dǎo)長(zhǎng)圖 關(guān)注 下載文章
綁定賬號(hào)成功
后續(xù)可登錄賬號(hào)暢享VIP特權(quán)!
如果VIP功能使用有故障,
可點(diǎn)擊這里聯(lián)系客服!

聯(lián)系客服