Kết quả 1 đến 1 của 1
-
04-03-11, 03:53 AM #1
- Ngày tham gia
- Mar 2011
- Bài viết
- 1
- Thanks
- 0
- Thanked 0 Times in 0 Posts
[Help] Souce key lock F5,F6,F7,ect..
Hi good morning to the entire community!
Anyone can help me? I'm looking for a source to lock the keys F5, F6, F7ect .. keyboard.
On another forum I found the following:
HHOOK g_hHookKbdLL = NULL;
LRESULT CALLBACK KeyHookLL(int nCode, WPARAM wp, LPARAM lp);
BOOL APIENTRY DllMain(HINSTANCE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
g_hHookKbdLL = SetWindowsHookEx(WH_KEYBOARD_LL,KeyHookLL, hModule, 0);
break;
case DLL_THREAD_ATTACH:
break;
case DLL_THREAD_DETACH:
break;
case DLL_PROCESS_DETACH:
UnhookWindowsHookEx(g_hHookKbdLL);
g_hHookKbdLL = NULL;
break;
}
return TRUE;
}
LRESULT CALLBACK KeyHookLL(int nCode, WPARAM wp, LPARAM lp)
{
KBDLLHOOKSTRUCT *pkh = (KBDLLHOOKSTRUCT *) lp;
if (nCode==HC_ACTION)
{
if(pkh->vkCode==VK_F1) // Bloquear F1
{
return 1;
}
}
return CallNextHookEx(g_hHookKbdLL, nCode, wp, lp);
}
My OS is: windows xp sp3.
Greetings, thank you very much for reading my message.
Sorry for the language, not read or write in Vietnamese, so I use google to translate the text, I'm from Argentina =)Khách viếng thăm hãy cùng leooo007 xây dựng diễn đàn CLBGAMESVN vững mạnh nhé!
Các Chủ đề tương tự
-
Cách Lock Ip
Bởi jbminhtan trong diễn đàn Hỏi Đáp/ Yêu CầuTrả lời: 13Bài viết cuối: 17-07-10, 10:44 PM