title: Passing an input to the process created by CreateProcess()
body: <p>like in the title I was wondering whether is it possible to pass an input by use of redirection operators in CreateProcess(). I tried something like the following:</p>
  
  <p><code>CreateProcess(NULL, "%ComSpec% /c c:\\somebatch.bat", NULL, NULL, ...);</code></p>
  
  <p>where <code>somebatch.bat</code> contained <code>c:\app.exe &lt; c:\input.txt</code> and it didn't pass the input, just launched the <code>app.exe</code>. On the output it said that:</p>
  
  <p><code>c:\working_directory&gt; c:\app.exe &lt; c:\input.txt</code></p>
  
  <p><code>c:\working_directory&gt;Not enough storage is available to process this command.</code></p>
  
  <p>(messing with irpcstack didn't help)</p>
  
  <p>Are you guys aware of any magic trick that would allow me to do what I want without messing with the <code>hStdInput</code> pipe, which saying frankly I wanted to avoid. Cheers.</p>