Hello,
maybe I missunderstood. "We would like to create a process of a shell-like application which takes it command via STDIN and prints out the results via STDOUT" this is your "console".
Think this is the way "Pocket CMD v 8.00 " calls "cild processes". See below this works. Or what is your parent proccess?
Code
- int wmain(int argc, wchar_t *argv[])
- {
- // Assume we can do STDIN and STDOUT
- ...
- PROCESS_INFORMATION pi;
- if (CreateProcess(_T("ndcucfg.exe"), NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, &pi))
- {
- // Now ndcucfg goes to STDIN and STDOUT until we terminate ndcucfg
- WaitForSingleObject(pi.hProcess, INFINITE);
- }
- ...
- return 0;
- }