Solved

How do I detect calls made to the USER32.dll by other applications but my own

Posted on 2003-10-30
4
198 Views
Last Modified: 2010-04-05
If I wanted to detect calls made to the User32.dll by another application, how would I do this?

Lets say I am waiting for a specific call to the dll but do not know from where it would come.
If this API call is directed at this dll I want to be able to listen for calls like the CallNextHookEx or the FindWindow call.

If this call is made I want to be able to catch it before the dll reacts to it. If I catch it I want to be able to kill this call and not allow it to go through.

I know that I have to create a hook but I there is anyone out there that can use an example of how this is to be done I would be ever so happy!!

Thank you.
Horatio
0
Comment
Question by:HoratioH
4 Comments
 
LVL 6

Accepted Solution

by:
GloomyFriar earned 125 total points
ID: 9658590
Here is one link for you.
http://www.codeproject.com/system/hooksys.asp

I've developed similar programm. But the programm hooks API from kernel.dll and only for one application.
But i think it can be registered as global hook.
0
 
LVL 20

Assisted Solution

by:Madshi
Madshi earned 125 total points
ID: 9797653
Hi Horatio,

you might want to check this one out:

http://help.madshi.net/madCodeHook.htm

This package is free for non-commercial purpose (only). It can do system wide API hooking on all win32 OSs. Several demos are also included. The demos are available for download here:

http://madshi.net/MCHDemos.zip
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question