I do this:
if (!CreateProcessA(NULL, lArgs, NULL, NULL, FALSE,
CREATE_NEW_CONSOLE, NULL, NULL, &StartupInfo, &ProcessInfo))
{
free(lArgs);
return GetLastError();
}
But I don't know how to obtain the input from the console.
Am I oblige to write a file for it ?
EDIT 1: there is no trouble, it works (and the code is both C and C++). this create a console, what I am looking for is: How do I obtain in this scope the user input from this new console ? lArgs contains the parameters/command line I pass to this new console.
EDIT 2: (I don't have any trouble. it works fine.) The child process is a console and I am trying to obtain the user input in the console (child process) to the parent process.
EDIT 3: The child process is just a console as in "CREATE_NEW_CONSOLE". The command line is given to the console with lArgs. This command runs a program of which the result is displayed in this new console. If I use _popen (I don't want to) instead of createprocess this displayed result is returned by _popen, but with createprocess, it just seems to be lost.