HOOK

24/12/2004 - 11:24 por Paco Garcia | Informe spam
Hola a todos.

Estoy intentando implementar un Hook y no se porque no funciona


hHook = SetWindowsHookEx( WH_GETMESSAGE , HookCallGetMsgProc, NULL,
GetCurrentThreadId());



LRESULT CALLBACK HookCallGetMsgProc(int nCode, WPARAM wParam, LPARAM
lParam )
{
LPMSG cwps = (LPMSG)lParam;

if (nCode < 0) // do not process message
return CallNextHookEx((HHOOK)WH_GETMESSAGE, nCode, wParam, lParam);

if( cwps->message == WM_INITDIALOG )
{
MessageBox(0,"eeeee","eeeeeeeee",0);
}
return CallNextHookEx((HHOOK)WH_GETMESSAGE, nCode, wParam, lParam);
}

¿por qué no entra en el if ?

Un saludo y felices fiestas.

Paco García
 

Preguntas similares