Reputation: 21
I am trying to launch the FTPS exe through createprocess function. This FTPS exe does the following: Connects to the server using username and password I pass as arguments Then tries to cd to the output directory and put my file in that directory.
FYI, I am passing a script file in the command arguments. cd and put commands are composed in the script file.
Once I passed wrong filename. In the console, it says "File Not found", but I am not able to log this in my code. Is there any way to fetch these errors from the console? As in this case, even though no FTP happened, createprocess was successful.
Upvotes: 1
Views: 76
Reputation: 1394
Have a look at this sample from MSDN. It says -
The example in this topic demonstrates how to create a child process using the CreateProcess function from a console process. It also demonstrates a technique for using anonymous pipes to redirect the child process's standard input and output handles. Note that named pipes can also be used to redirect process I/O.
Upvotes: 1