The problem is that it does not work , I got tired of trying different configurations (from google ) but nothing , it is business as simepre .
Someone could help me to know that keys are not locked?
Source :
Expand|Select|Wrap|Line Numbers
- 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);
- }
Sorry for my language , I'm from Argentina.