title: CreateProcess succeeds, but GetExitCodeProcess returns C0000142
body: <p>I'm trying to start a user-mode process from a service using CreateProcessAsUser() API similar to <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/aa379608%28v=vs.85%29.aspx" rel="noreferrer">this code</a>. My code works fine in 99% of the time, except at times that API succeeds, I get the process handle from the <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/ms684873%28v=vs.85%29.aspx" rel="noreferrer">PROCESS_INFORMATION</a> struct but the process itself doesn't appear in the interactive user session that I was intending it to run in.</p>
  
  <p>The interesting thing is that if I call <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/ms683189%28v=vs.85%29.aspx" rel="noreferrer">GetExitCodeProcess</a>() on the process handle it succeeds with return code 0xC0000142. Any idea why?</p>