Click here to Skip to main content
16,016,134 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Question about table Pin
Hamid_RT6-Oct-06 8:35
Hamid_RT6-Oct-06 8:35 
QuestionDirectShow: Knowing video buffer alignment of output frame inside DMO Pin
Johniteq5-Oct-06 23:01
Johniteq5-Oct-06 23:01 
AnswerRe: DirectShow: Knowing video buffer alignment of output frame inside DMO Pin
Johniteq5-Oct-06 23:33
Johniteq5-Oct-06 23:33 
NewsProblem with Batch Scripts and CreateProcess() Pin
neilsolent5-Oct-06 22:40
neilsolent5-Oct-06 22:40 
GeneralRe: Problem with Batch Scripts and CreateProcess() Pin
S Douglas6-Oct-06 13:46
professionalS Douglas6-Oct-06 13:46 
GeneralRe: Problem with Batch Scripts and CreateProcess() Pin
neilsolent7-Oct-06 8:41
neilsolent7-Oct-06 8:41 
GeneralRe: Problem with Batch Scripts and CreateProcess() Pin
S Douglas7-Oct-06 9:12
professionalS Douglas7-Oct-06 9:12 
GeneralRe: Problem with Batch Scripts and CreateProcess() Pin
neilsolent7-Oct-06 9:32
neilsolent7-Oct-06 9:32 
Thanks again for your comments. Here's some answers to your questions:

So you want the output from the perl script written to the log file right?

= Yes. Whatever the program - that is launched by CreateProcess() - does, I want all stdout (and stderr) to go the logfile child.out. If the launched program is a batch script, this includes the output from any new processes (such as Perl) that the script may launch.

If you run the perl script from the command line does it do what its suppose to?

= Well, there is no Perl script here, I am just getting Perl to return its version statement (-v flag). But yes, Perl does correctly return the version statement if I run the batch script manually. If I replace the batch script with a shell script (bash.exe instead of cmd.exe) it works just fine - the output from Perl goes to child.out. It seems that it only doesn't work if the program launched with CreateProcess() is a batch script.

What is the perl script doing? Any reason it has to be done from a scipt and not part of your C++ App?

= That is not really relevant, because the main C++ program - that runs CreateProcess() - is supposed to allow the user to run ANY program or script he/she likes. I was just testing that it out with a sample batch script, when I came across this weird problem. I can't know in advance what programs the user may wish to run, and I can't ask them to kindly not launch any new processes from a batch script !! Smile | :)

For any of the command line commands redirecting the output from the screen to a file is >Path.To.File ie dir >C:\MyLog.log

= Yes, but I am not sure how that is relevant here? The output from the "dir" call DOES goes to child.log as it stands. It is just odd that the output from the Perl call does not. I have concluded that the difference is that Perl.exe is a new process, whereas dir is not. There must be something strange with the startup parameters in the CreateProcess() call, but I just can't think what..

I hope this makes sense, and I hope you can work out what I could be doing wrong, because I am totally stumped!!

Dead | X|


cheers,
Neil

QuestionData types in Visual C++ Pin
Eikthrynir5-Oct-06 22:33
Eikthrynir5-Oct-06 22:33 
AnswerRe: Data types in Visual C++ Pin
Link20065-Oct-06 23:24
Link20065-Oct-06 23:24 
AnswerRe: Data types in Visual C++ Pin
toxcct6-Oct-06 0:00
toxcct6-Oct-06 0:00 
AnswerRe: Data types in Visual C++ Pin
Gary R. Wheeler6-Oct-06 3:04
Gary R. Wheeler6-Oct-06 3:04 
GeneralRe: Data types in Visual C++ Pin
Eikthrynir6-Oct-06 6:42
Eikthrynir6-Oct-06 6:42 
AnswerRe: Data types in Visual C++ Pin
Hamid_RT6-Oct-06 19:31
Hamid_RT6-Oct-06 19:31 
QuestionToo many WM_MOUSEWHEEL events issue Pin
Tnarol5-Oct-06 22:02
Tnarol5-Oct-06 22:02 
QuestionFtpCommand not defined in Visual Studio Pin
codepanter5-Oct-06 21:51
codepanter5-Oct-06 21:51 
AnswerRe: FtpCommand not defined in Visual Studio Pin
benjymous5-Oct-06 21:59
benjymous5-Oct-06 21:59 
GeneralRe: FtpCommand not defined in Visual Studio Pin
codepanter6-Oct-06 0:51
codepanter6-Oct-06 0:51 
GeneralRe: FtpCommand not defined in Visual Studio Pin
David Crow6-Oct-06 2:43
David Crow6-Oct-06 2:43 
AnswerRe: FtpCommand not defined in Visual Studio Pin
Hamid_RT5-Oct-06 22:04
Hamid_RT5-Oct-06 22:04 
QuestionTo compare two Images to find out the mismatch between them Pin
Dinu_IP5-Oct-06 21:33
Dinu_IP5-Oct-06 21:33 
AnswerRe: To compare two Images to find out the mismatch between them Pin
Sarath C5-Oct-06 22:02
Sarath C5-Oct-06 22:02 
AnswerRe: To compare two Images to find out the mismatch between them Pin
Hamid_RT6-Oct-06 8:30
Hamid_RT6-Oct-06 8:30 
Questioncolor the text of radio button Pin
vasmvr5-Oct-06 21:06
vasmvr5-Oct-06 21:06 
AnswerRe: color the text of radio button Pin
prasad_som5-Oct-06 21:18
prasad_som5-Oct-06 21:18 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.