System-wide ShellExecute hooks?
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);
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
精彩评论