Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2003-10-30
4
Medium Priority
?
205 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 6

Accepted Solution

by:
GloomyFriar earned 500 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 500 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Suggested Courses

636 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