472,796 Members | 1,480 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,796 software developers and data experts.

Hooking up ShellExecute with SetWindowsHookEx()

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#.

--------------------------------
From: bugs bunny

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

<Id>a0mua5x0N02q0V6JDtvtHQ==</Id>
Nov 21 '05 #1
1 3017
Hi,

Maybe this will help
http://msdn.microsoft.com/msdnmag/is...0/CuttingEdge/

Ken
--------------
"bugs bunny via .NET 247" <an*******@dotnet247.com> wrote in message
news:ux**************@TK2MSFTNGP15.phx.gbl...
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#.

--------------------------------
From: bugs bunny

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

<Id>a0mua5x0N02q0V6JDtvtHQ==</Id>
Nov 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Seth Gecko | last post by:
Hi I want to make an application (in C#) that can catch text written to a Richedit control in another application. Using Spy++ I can see that the message I want to intercept is called...
1
by: Greg Merideth | last post by:
Is there a way via c# to hook a system tray application into the windows keyboard que globally so that when the application is running and you press, say, control-alt-shift-f11 the system tray app...
1
by: TMP | last post by:
Below is the code snippet that I'm having problems with, the hook seems to work (hookResult returns a value other than zero) but then explorer crashes.Also I'm aware of the fact that instead of...
1
by: TMP | last post by:
Below is the code snippet that I'm having problems with, the hook seems to work (hookResult returns a value other than zero) but then explorer crashes.Also I'm aware of the fact that instead of...
2
by: Fabiano | last post by:
Please, is there a way i can hook the keyboard? I would like to hook everykey. CTRL+ALT+DEL, CTRL+ESC, and all others. The user just press some keys, and none control keys, not only at my app...
15
by: bruno | last post by:
I need some help on how write SetWindowsHookEx in vb.net 2005 to hook kb input. this is the statement: hHOOKKb = SetWindowsHookEx( _ WH_KEYBOARD, _ lpfn, _ hMod, _ dwThreadId) And this is...
2
by: kmslick | last post by:
Hello all. Not sure which group this problem best relates to, so I'm posting to both with a follow up. I started learning C# and .NET last august for a project for my employer. The project...
2
by: donald | last post by:
Hi there, I follow this http://www.codeproject.com/csharp/dateparser.asp articles to made a Hooking into the Shell. I just want to know which App has call it for example was it start run, or...
8
by: pigeonrandle | last post by:
Hi, Has anyone had any experience with hooking messages in other application windows (like SPY++). I want to listen for WM_MOVE messages, but can only seem to find examples of Keyboard and Mouse...
0
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
0
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Sept 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: lllomh | last post by:
How does React native implement an English player?
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.