Fix SetState and document CreateProcess