Hi,
I'm trying to find out if there's a global hook that I can hook to and receive messages about an application that is about to be run so that I can block or let pass the execution.
Thanks
Printable View
Hi,
I'm trying to find out if there's a global hook that I can hook to and receive messages about an application that is about to be run so that I can block or let pass the execution.
Thanks
You mean like the way virus scanners do?
yeah, like that.
Well, since you say application, that means it has to have a window. Create a global hook with WH_CBT that displays a notifification whenever HCBT_ACTIVATE or HCBT_CREATEWND messages occur. From this point, you can choose to allow the program to run or terminate it by finding the FileModuleName (not sure if thats the correct one, but you get my jist) and terminating the process.