title: Why is ShellExecuteEx not returning the process handle?
body: <p>I am trying to open an image with the following function:</p>
  
  <pre><code>HANDLE openFile(char *path){ // path = "C:\Users\Foo Bar\Code\Test\test.jpg"
      CoInitializeEx(NULL, COINIT_APARTMENTTHREADED | COINIT_DISABLE_OLE1DDE);
  
      SHELLEXECUTEINFOW info;
      memset(&info, 0, sizeof(info));
      info.cbSize = sizeof(info);
      info.fMask = SEE_MASK_NOCLOSEPROCESS | SEE_MASK_NOASYNC ;
      info.hwnd = NULL;
      info.lpVerb = L"open";
      info.lpFile = utf8_toWchar(path);
      info.lpParameters = NULL;
      info.lpDirectory = NULL;
      info.nShow = SW_SHOW;
      info.hInstApp = NULL;
  
      if (!ShellExecuteExW(&info)){
          System_printLastErrorString(); //never gets here
      }
      //free((void*)info.lpFile);
      CoUninitialize();
  
      return info.hProcess; //this is always NULL
  }
  </code></pre>
  
  <p>The problem is that <code>info.hProcess</code> is always <code>NULL</code> despite the fact that the default image editing program is not open and is opened a bit later.</p>
  
  <p>How do I fix this?</p>
  
  <p>Side Note: I dont know if this is relevant, but the calling program is a Qt Application.</p>