Skip to main content
gamedev.net
🔒 Locked

hooking messagebox...

Started by moore52 Apr 22, 2003 at 4:50 AM 4 replies 1.3k views
Original Post
moore52
moore52
I''ve written a speech engine (MS speech api) and i want it to read any messagebox that appears in any program. How can i hook MessageBoxA to do my procedure before MessageBoxA? Could anyone give example (source)?
YodaTheCoda
YodaTheCoda
well first yuo muist create a hooker funciton
then yuo must atach it to yuor program
make sure yiou do gthis bvefore creating yiour opengl!
oh and itr doesnt weork in cobol or asembelry. only visual c++.
keep oup ther goodf programing!@
YodaTheCoda
YodaTheCoda
oh! and dontlook at that bit by my name itys a bug with the server!
moore52
moore52
Well, i know what i have to do, but i dont know how...

First, how write my own hooker function?
Second, how to hook it to any api?
Could anyone give source code/link?

PS:
Im want it works both in win98 and xp...
Tyson
Tyson
Try using "CBT" hooks. MS designed these hooks so that speech programs would have a place to hook into for just such a purpose. I googled them and came up with the following links:

Good example of what you want to do:
http://freespace.virgin.net/james.brown7/tutorials/msgbox.htm

Winamp Hook example is here:
http://www.beesknees.freeserve.co.uk/articles/hooks.html

If you want to convert from VB some info is here:
http://www.mvps.org/vbnet/index.html?code/hooks/messageboxhook.htm

There is tons of info everywhere on this stuff. Just say google!

============================
A guy, some jolt, and a whole lot of code

[edited by - Tyson on April 22, 2003 7:25:23 AM]

[edited by - Tyson on April 22, 2003 7:27:03 AM]
============================A guy, some jolt, and a whole lot of code :)
PixolMaster
PixolMaster
quote:
Original post by YodaTheCoda
oh! and dontlook at that bit by my name itys a bug with the server!


ROFL! And so the wrath of pouya lives on...

--- Alex Broadwin
--- Domini Nocti Games

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.