Solved

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

Posted on 2003-10-30
4
203 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 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

695 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