Click to See Complete Forum and Search --> : Hook a function?


AltPluzF4
January 18th, 2008, 05:02 AM
For example, if I had a simple application that holds an activex control, and I know the activex control uses a function (MessageBox), how could I hook the activex control so that I can check the values?
If the control sends MessageBox with a title of "error", I want to replace it with my own MessageBox, but if it doesn't have a title of "error" I want to just let it send the MessageBox normally.

How could I go about doing this?
Thanks for any suggestions.

krush_ter
January 22nd, 2008, 05:31 AM
Hi,

API hooking.
http://www.codeguru.com/cpp/w-p/system/misc/article.php/c5667/

fred100
January 22nd, 2008, 05:49 AM
Hi,

API hooking.
http://www.codeguru.com/cpp/w-p/system/misc/article.php/c5667/

Deprecated
Use Detours.