Originally posted by lsimon
CreateProcess fails with GetLastError = 87 message The parameter is incorrect.
Which parameter? I've tried specifying the filename as app name and as the command line and still get the same error. Running VC++ 6.0 in WIN98.
code sample follows:
(See attached test code for full test program.)
char szInExec[] = "C:\\testbat.bat";
Are batch files considered executable files? This may be your problem -- CreateProcess supposedly works only on executable files, not batch files. Maybe someone else can shed more light on this.
Declaring and Initializing the startinfo was what was required. The batch file starts fine. The attached file contains the debugged version with the printfs' cleaned up.
* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.