Reputation: 288
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);
Upvotes: 3
Views: 1790
Reputation: 111150
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
Upvotes: 2