hi..
I build program to launch application(launch application can as local profile or can as network credentials) using Advapi32 "CreateProcessWithLogonW".
but I got the problem, I can't capture message of standard output(Stdout) and Standard Error(stderr).
could everyone help me how to capture message and the code?

thanks

Wich parameter are you using lpApplicationName or lpCommandLine to launch the application?

If you use the lpCommandLine, you can write some thing like
"C:\Path\program.Exe >>Output.txt 2>&1" to find the stdout and the stderr in a file called Output.txt in the same folder.

Yes, it is a little tricky. Please read here about command line redirections

Hope this helps