?
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
?
204 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

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…
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…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses
Course of the Month8 days, 14 hours left to enroll

764 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