OK, I just read the documentation on ExitProcess and realized that it doesn't take a handle as a parameter. So apparently it can be used only to close your own program (??). I'm a bonehead. Maybe the CloseHandle function will do it.
But I really don't know what I'm talking about, so hopefully somebody with a clue will give you a better answer.