title: How to use CreateProcessWithLogonW in c++?
body: <p>Below is my code. The function is called, but it does not work. It dont call the exe. Why?</p>
  
  <pre><code>int Createprocesslogon()
  {
  STARTUPINFOW su_info;
  ZeroMemory(&amp;su_info, sizeof(STARTUPINFOW));
  su_info.cb = sizeof(STARTUPINFOW);
  
  PROCESS_INFORMATION pi;
  ZeroMemory(&amp;pi, sizeof(PROCESS_INFORMATION));
  CreateProcessWithLogonW(L"xxx", L"localhost", L"123456", 0, L"C:\\Program Files\\app\\IECapt.exe" ,L" --url=http://www.facebook.com/ --out=test.png --min-width=1024", 0, NULL, NULL, &amp;su_info, &amp;pi);
  
  cout &lt;&lt; "testt";
  
  return 0;
  }
  </code></pre>