agrippa1994 / DX9-Overlay-API

Overlay API for DirectX 9 based games.
MIT License
127 stars 26 forks source link

Cannot inject to other process without quitting injected process. #12

Closed evilC closed 10 years ago

evilC commented 10 years ago

A bit vague for now until I work out what is going on, all I can really give is a sequence of events and the unexpected behavior I experience.

Start gfxtest, run script with PROC_NAME pointing to gfxtest - see hello world, all OK. Quit script, text disappears from gfxtest. Edit script, change PROC_NAME to point to game (MWO). Re-run script, Hello World is injected into gfxtest !?!?! Quit script AND gfxtest. Re-run script, text is injected into game.

So it seems that once you inject a dx app, even if you destroy all overlays. you cannot inject another app until the injected one quits.

I guess we maybe need some kind of quit routine to sever contact with the dx application?

No real biggie, but it would be nice for developers to be able to more easily flick between testing stuff out in a simple app such as gfxtest and the full game, especially when developing stuff for multiplayer games.

JohnnyCrazy commented 10 years ago

This is propably caused by the DLL Injection: The DLL will be injected into the first process, and I think it will remain there till you quit the process (Thats why you can't delete the DLL while a process, in which you injected it, is running)

IDK if DLL ejecting is possible, but I will look at it on the weekend

evilC commented 10 years ago

I cannot be sure about this, but I suspect me messing around with this has caused some problems.

All my chrome windows are now experiencing quite bad corruption within them.

I just captured in with a screenshot:

Imgur

Do you reckon this could be caused by a bug in the software?

Gonna reboot now to see if it goes away.

JohnnyCrazy commented 10 years ago

Pretty sure this isn't related to our software. Our software just hooks the DirectX used by the process, nothing global is happening

evilC commented 10 years ago

Stopped on reboot. Actually, thinking about it, it is more likely to be the LoL installer I had running, I think it messed with AIR and stuff.

Cheers, will wait and see if you get any joy. No real biggie - for MWO I can just idle in testing grounds for as long as I like so I do not really need to switch apps.