3

I wonder what techniques xfire and/or Steam uses to overlay into games. I'm trying to do something similar and I really would like to know what is the least intrusive way, I.e. won't alert any anti-cheat systems. I don't need any kind of information from the game (no wall-hack BS). I would basically just like to display a rectangle with custom contents in the game.

PS. I have seen some examples by googling but most of them seem very old. Are they still good options?

3 Answers 3

4

xfire and fraps use directx functions hooks as far as i know
so that they can execute their own (drawing) code when a certain function is called

once you have located the function(s) you need and hooked them, you also need a handle to the directx device so that you can use it to do your own drawing
the directx endscene function is probably the most used

google for "trampoline hook c++" and go from there

there are numerous approaches, some widely known and relatively easy, others harder to find and implement
and that's because people go to lengths to find new techniques as anti-cheat software doesn't like when you mess around with (important or potentially exploitable) functions as it is considered hacking...

oh and i know this is an older question but i came here by using google myself and it's likely that more people do so at least it has an answer now

1

A few days back, I had asked this question. This might help you too. Read Alan's reply and the links he's mentioned : How to overlay graphics on Windows games?

1

Well as I haven't saw the examples I can't tell they're good for use.

I think I won't give you solution but maybe I point you right direction. You are probably using windows as a platform and every window is having it's handle. So if you could obtain this handle maybe you could draw directly into game.

How to obtain handle

You should now be able to act, as if your program is the game itself. However I didn't try this and it may lead you to number of problems.

The other way if you want to just draw stuff is just take as an example something that is doing similliar things. What about FRAPS or other FPS measuring utilities. They are all drawing FPS number on your screen. It should be good idea to look on open source apps out there and find any which does in it part what you need. It will be then just a bit of breaking down the code.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.