title: Create Process As User after loading user profile
body: <p>I have service that runs as system, i want to spawn new process in some user TS session with the user privileges.</p>
  
  <p>I'm calling LogonUser, LoadUserProfile, CreateEnvironmentBlock, CreateProcessAsUser and spwan the process in the user TS session.</p>
  
  <p>The process (cmd.exe) run in the user TS session, but when i'm trying to run GUI application i get the following error message:</p>
  
  <p>Exception EAccessViolation in module ntdll.dll at 00022272.</p>
  
  <p>Access violation at address 77D22272 in module 'ntdll.dll'. Write of address 0000000C.</p>
  
  <p>Have I missed something? </p>
  
  <p>Any help would be greatly appreciated !</p>
  
  <p>Thanks,
  Lior </p>