Link to home
Start Free TrialLog in
Avatar of Codestone
Codestone

asked on

System wide hooking and IShellExecuteHook.execute

Hi All,

I am trying to find a way to do the following:

Get notified by windows when a new application starts to launch and either allow or deny the application to start.

IShellExecuteHook seems to be what i need to acheive this (from what I can understand) - see http://windowssdk.msdn.microsoft.com/en-us/library/ms632981.aspx

This is great BUT according to the MS KB (http://support.microsoft.com/default.aspx?scid=kb;en-us;319524):  "Global hooks are not supported in the .NET Framework"

My problems are these then:  

1) I no longer have a copy of VB6 available (which I could do it with) so I am stuck with VB.net 2005 (dotnet v2).
2) DotNet does not support Global Hooks.
3) I don't understand C.

What I'm after then is either:
A) A smartass response that will tell me a way to do it with dotnet 2005 (which is impossible so far as I know - except for keyboard and mouse hooks).
B) A C++ exe that will hook into windows, pass the launching applications path and processname to my Windows Service and receive a boolean reponse of whether or not to allow it to start.

Thank you all for any help you can give.

James.



ASKER CERTIFIED SOLUTION
Avatar of cookre
cookre
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial