tags:

views:

27

answers:

1

hi

i read some article and msdn and blog but have some question

why we must place a global hook procedure in a DLL separate from the application installing the hook procedure

and what is different from global hook and keyloger( i write key loge without separate dll)? how key loger intercept all application keyboard message without separate dll?

finaly

what code is in dll for global hook ?

please give some step for writing global hook with detail

A: 

Windows has to load your DLL into all running processes, so they all "know" that they have to send messages to your application. That's why you need to place the hook in a separate DLL. I know this is a short answer, but hopefully it's helpful.
And, well, there are many tutorials on creating such hooks. Google will help you for sure.

rhino