Hooking up ShellExecute with SetWindowsHookEx()

  • Thread starter bugs bunny via .NET 247
  • Start date
B

bugs bunny via .NET 247

Does anyone have actually used SetWindowsHookEx() to hook upShellExecute() so as to find what application was started bywindows or which folder is currently browsed by explorer. I knowone thing and that is ... Windows uses ShellExecute() to doalmost every task.
I need some implementation help. I want to trigger an userdefined function when suppose Notepad is opened or in simplecase a messagebox that says Notepad has started.
If anyone has a better solution, other than setting a hook toShellExecute pls. inform. Any kind of help will always beappreciated. Pls. keep the implementation in vb.net or C#.
 
K

Ken Tucker [MVP]

Hi,

Maybe this will help
http://msdn.microsoft.com/msdnmag/issues/02/10/CuttingEdge/

Ken
--------------
Does anyone have actually used SetWindowsHookEx() to hook up ShellExecute()
so as to find what application was started by windows or which folder is
currently browsed by explorer. I know one thing and that is ... Windows uses
ShellExecute() to do almost every task.
I need some implementation help. I want to trigger an user defined function
when suppose Notepad is opened or in simple case a messagebox that says
Notepad has started.
If anyone has a better solution, other than setting a hook to ShellExecute
pls. inform. Any kind of help will always be appreciated. Pls. keep the
implementation in vb.net or C#.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top