views:

158

answers:

1

Hello, is there any way I can install a system-wide ShellExecute hook using C++ without having to inject a hooking module into every active process. I am using Windows 7. My purpose for this is because, I want to be able to select which browser a link is opened in when a link is opened with the default browser using ShellExecute, like this:

ShellExecute(NULL, "open", "http://stackoverflow.com", NULL, NULL, SW_SHOWNORMAL);
+2  A: 

The last parameter of SetWindowsHookEx takes a thread id -- if this is NULL the procedure will be associated with all threads in the same desktop as the calling thread or with a particular thread otherwise.

Read more: Using Hooks

dirkgently