473,401 Members | 2,146 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,401 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 3068
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.