title: ShellExecute not working or am I doing something wrong?
body: <p>So, shortly, I need to launch a program with launch options, in my case - Steam.
  In the beginnings of my little program I've used system() to launch it, now I want to launch it with <code>ShellExecute()</code>, but it does nothing. Any help will be appreciated.</p>
  
  <p>My code:</p>
  
  <pre><code>#include &lt;Windows.h&gt;
  #define STEAM_DIRECTORY "D:\\Programs\\Steam\\steam.exe"
  
  int main()
  {
      ....
      string arguments = "- login " + login[num - 1] + " " + pass[num - 1];
      ShellExecute(NULL, (LPCWSTR)"open", (LPCWSTR)STEAM_DIRECTORY, (LPCWSTR)arguments.c_str(), NULL, SW_SHOWMINIMIZED);
  }
  </code></pre>
  
  <p>What I've used before:</p>
  
  <pre><code>#define STEAM_DIRECTORY "\"D:\\Programs\\Steam\\steam.exe\""
  
  int main()
  {
      ....
      string runsteam_arg = STEAM_DIRECTORY;
      runsteam_arg = runsteam_arg + " -login " + login[num - 1] + " " + pass[num - 1];
      system(runsteam_arg.c_str());
  }
  </code></pre>
  
  <p>Edit: What I need to run in the end:</p>
  
  <pre><code>"D:\Programs\Steam\steam.exe" -login xxxx xxxx     
  </code></pre>
  
  <p>And one more thing, can somebody explain what <code>CoInitializeEx()</code> does? I'm new to Windows API.</p>