I'm trying to edit the memory of a process I've attached to using DebugActiveProcess, and if I run WaitForDebugEvent and immediately call ContinueDebugEvent, everything is fine and the process continues, but if I add a WriteProcessMemory between these 2 calls, the process freezes and doesn't continue until the debugger is closed (with DebugSetProcessKillOnExit set to false).
I'm pretty sure I'm skipping a pretty large step. I thought maybe I needed to use ResumeThread on the threads caught by the CREATE_THREAD_DEBUG event, but that doesn't seem to be it. Any ideas are appreciated!