views:

69

answers:

2

I've been teaching myself how to use messages with Window's APIs, and have actually been doing very well learning them. Problem is, I can't figure out how to receive a message from another application to start code within mine.

Essentially, what I want to do is allow others using a commercial application to click the save button (on the commercial application), and have my application stop the save message, prompt the user, and from that either cancel the save to allow them to continue, or allow the save (which I know how to do now through messages).

I just need to know how to catch a message, and stop it. If anyone can point me to an API call, or function, or just documentation that may help, please do.

+1  A: 

I think you'll need to attach your own application to the running process the same way a debugger would... Unless the commercial application has a custom method of plugging into their architecture to do this.

The next question is... do you want to proceed down this path.

Kieveli
Yes... You somehow made this sound even MORE interesting. I think I would like to continue down that path.
Sivvy
Kieveli
+3  A: 

Check out Detours by Microsoft Research. It's possible, but not simple. Also, look into how client-side game cheats are performed. I will not link any of them here, but they are out there. That's essentially what you want to do.

JP Alioto
Thanks for the help... Detours seems like it would work quite well for what I need, though I'm the type that kinda likes to re-invent the wheel for the purposes of learning. Any ideas of how to do the same without third party programming? This is one of the few things to interest me in a while, and I would love to learn more.
Sivvy
It used to come with docs and source code when you download it so you could see exactly what they were doing. There's a publication on the site (look at the bottom for a PDF link) that goes into the concept-level stuff.
JP Alioto
http://www.cheatengine.org/ The tutorial is even fun =)
Kieveli