Other Languages - CreateProcess - Asked By gungun saini on 20-Nov-11 11:53 PM

Hello All,

        I run a process using createProcess in vc++. I need output also for i want to access RedirectStandardInput,RedirectStandardOutput,RedirectStandardError . I did not create object of Process.i dont want to use <System.dll> and namespace in my project .when i used this appliction became framework dependent. i want to remove framework dependency.


Anil Kumar replied to gungun saini on 21-Nov-11 08:06 AM
Hi Gungun,

You most probably forgot to set the UNICODE define or a wrong. UNICODE is defined.

Thank you

Anil Kumar replied to gungun saini on 21-Nov-11 08:07 AM
Upload the coding also, we could look into it to rectify the error.
Thank you
Anil Kumar replied to gungun saini on 21-Nov-11 08:14 AM
Also, some important point to keep in mind:

 You must set UseShellExecute to false if you want to set RedirectStandardInput,RedirectStandardOutput,RedirectStandardError to true. Also refer to the article for the better understanding of the situation:

Thank you

Sam replied to gungun saini on 04-Dec-11 07:26 PM
Are you saying you want to use CreateProcess directly using the Windows API without .Net? If so, then have you see:


Is that the type of thing you are looking for? I know that that sample is not written very well but it works.