Posted on 2003-03-14
Medium Priority
Last Modified: 2010-04-03
Hello !!!

Can someone show me a source or explain me how to hook a Function ? For example: I want to hook the RegOpenKeyEx in all the system wide. How to do ? (without madCollection)

Thanx a lot !!!
Question by:teste123
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
  • 3
  • 2

Expert Comment

ID: 8135934

> without madCollection


That's a very complicated subject. You have to change the import tables of all running modules (+ the modules that are starting after "you set up the hook").
I'd recommend to use a component like madCollection (no, I do not get money!), because coding this is very time-intensive and has to be absolutely bug-free (if you don't want to annoy your customers with blue screens).

Sorry for my bad answer! I guess that's what you didn't want to hear.


Author Comment

ID: 8136198
Yes, it wanst what i want to listen *cryes a lot* because i am a poor guy. I gain only R$400,00 here in Brazil programming. But now because of the war, 1 dollar = almost R$4,00 , and i dont have that mutch money. Thats why. I want something free... Madshi, are you reading ? I found a BUG in madCodeHook when hooking the system_wide. May you register me plzzzz ? Then i eport you the bug and give you my program when i finish it for free. Do something plzzz this program will be very important. I promess i ill put many thanx to you.. I do anything (but pay i cant)... *cryes a lot* or just show me another lib that does that. I will be very happy. Thanks a lot
LVL 20

Accepted Solution

Madshi earned 400 total points
ID: 8141933
Hi Markus, thanks...  :-)

teste123, is your program freeware or commercial? If it's freeware you can use my collection for free anyway. If you make money by using my collection, isn't it fair if I get some money, too?

Anyway, you found a bug? Please try the latest beta version, it makes system wide API hooking quite easy. It also contains countless bugfixes in comparison to the last official version:


Here are some demos which show how to use the new system wide logic:


You can write an email to me, perhaps we can find a special kind of agreement about commercial/freeware/paying.

Of course you can also try other (totally free) API hooking sources. E.g. a quick google search on "API hooking" will already give you some good links.

P.S: You can also get my collection by getting into the experts-exchange delphi top15. I'm giving my collection to the top15 experts for free...   :-)

Regards, Madshi.

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


Author Comment

ID: 8144119
Ahhh thanx madshi. My program will be totally free =P
Yes, the beta version corrected the bug !

Ps.: Madshi, you are very good with delphi. May i know your age ?

Ty =P

Author Comment

ID: 8144136
Madshi.. one more question.
How are you going to know if someone is using your lib but in an illegal using ?
LVL 20

Expert Comment

ID: 8144397
>> My program will be totally free

My components were always free for non-commercial usage.

>> May i know your age ?


>> How are you going to know if someone is using your lib but in an illegal using ?

Telepathy. I feel if someone uses my stuff illegally...  (just joking, of course :-)

Featured Post

Independent Software Vendors: 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

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
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…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses
Course of the Month8 days, 15 hours left to enroll

765 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