I was wondering how this function in MHS actually works. It executes my injected code without issues, but when I attempt this with my own code, the target process either crashes or just exits.
I'm trying call a game function that is responsible for sending packets, and, for that I allocate memory in the process for my buffer, write to it, allocate and write my code, execute code with CreateRemoteThread and finally freeing. I've already used this method in a different game and it worked flawlessly.
Care to enlighten me?