Eric Pouech pouech-eric@wanadoo.fr writes:
I agree that it would better without a new thread state But it seems that in the case of a process termination with ExitProcess(0), your proposal will never set the exit code to 0 and always return an exit code of STILL_ACTIVE.
No, the exit code is already 0 by default, so there's no need to set it again for the ExitProcess(0) case.