Click here to Skip to main content
15,892,674 members
Home / Discussions / C#
   

C#

 
GeneralRe: AutoFit an Image Pin
confusedme30-Sep-07 20:01
confusedme30-Sep-07 20:01 
GeneralRe: AutoFit an Image Pin
Christian Graus30-Sep-07 21:00
protectorChristian Graus30-Sep-07 21:00 
Questionvalidate date.... plz help Pin
P_Elza30-Sep-07 18:36
P_Elza30-Sep-07 18:36 
QuestionCapturing stdout from a processes started in C# Pin
Ray Mitchell30-Sep-07 18:00
Ray Mitchell30-Sep-07 18:00 
AnswerRe: Capturing stdout from a processes started in C# Pin
Luc Pattyn1-Oct-07 1:11
sitebuilderLuc Pattyn1-Oct-07 1:11 
GeneralRe: Capturing stdout from a processes started in C# Pin
Ray Mitchell1-Oct-07 9:00
Ray Mitchell1-Oct-07 9:00 
GeneralRe: Capturing stdout from a processes started in C# Pin
Luc Pattyn1-Oct-07 9:26
sitebuilderLuc Pattyn1-Oct-07 9:26 
GeneralRe: Capturing stdout from a processes started in C# Pin
Ray Mitchell1-Oct-07 10:46
Ray Mitchell1-Oct-07 10:46 
Hi Luc,

Yes, at first it would seem to make sense that error messages are output to stderr, but apparently some are not. You see, when I do a simple command line redirection of only stdout into a file, the error messages do get redirected into that file. But, if I redirect stderr only, the error messages are still displayed on the screen.

I believe the reason they do it this way is because stderr is normally used for error messages concerning problems in the application itself (the C/C++ compiler in this case). However, when the compiler encounters syntax errors in the code it is compiling, that is not an application error, so the messages concerning these errors are merely produced like a report and, thus, stdout is more appropriate. At least that's how I belive they decided upon this.

Anyway, I've got a klugey work-around to my problem of the missing last line of stdout when capture is attempted in C#. I wrote a 2nd custom application in C that looks at its argc/argv, concatenates argv[1] through argv[argc-1] together, then makes a call to the "system" library function with this concatenated string as the argument. Then in my C# program I start this custom process after initializing its arguments to be cl.exe with all the cl.exe arguments I want plus a redirection string. So, my custom process ends up being the one that actually runs the compiler and does the redirection. It's admittedly klugey but at least it works properly, whereas the version that directly starts the compiler process from C# does not. I'm sure I'm simply doing something wrong in the C# version, but as of yet I don't know what it is - and I just need to move on with my task!

Ray
GeneralRe: Capturing stdout from a processes started in C# Pin
Luc Pattyn1-Oct-07 11:18
sitebuilderLuc Pattyn1-Oct-07 11:18 
Questionhow to add grammar checker Component into C# and use it ? Pin
yashar201230-Sep-07 13:25
yashar201230-Sep-07 13:25 
AnswerRe: how to add grammar checker Component into C# and use it ? Pin
Judah Gabriel Himango30-Sep-07 13:31
sponsorJudah Gabriel Himango30-Sep-07 13:31 
GeneralRe: how to add grammar checker Component into C# and use it ? Pin
yashar201230-Sep-07 16:31
yashar201230-Sep-07 16:31 
GeneralRe: how to add grammar checker Component into C# and use it ? Pin
Paul Conrad30-Sep-07 18:19
professionalPaul Conrad30-Sep-07 18:19 
QuestionProblems with UserSettings in Vista Pin
norla30-Sep-07 11:46
norla30-Sep-07 11:46 
QuestionCustom form? Pin
MasterSharp30-Sep-07 11:38
MasterSharp30-Sep-07 11:38 
AnswerRe: Custom form? Pin
Paul Conrad30-Sep-07 11:45
professionalPaul Conrad30-Sep-07 11:45 
GeneralRe: Custom form? Pin
MasterSharp30-Sep-07 12:14
MasterSharp30-Sep-07 12:14 
GeneralRe: Custom form? Pin
Christian Graus30-Sep-07 12:25
protectorChristian Graus30-Sep-07 12:25 
GeneralRe: Custom form? Pin
MasterSharp30-Sep-07 12:34
MasterSharp30-Sep-07 12:34 
GeneralRe: Custom form? Pin
Kenny McKee30-Sep-07 12:46
Kenny McKee30-Sep-07 12:46 
GeneralRe: Custom form? Pin
MasterSharp30-Sep-07 12:56
MasterSharp30-Sep-07 12:56 
GeneralRe: Custom form? Pin
Kenny McKee30-Sep-07 13:14
Kenny McKee30-Sep-07 13:14 
GeneralRe: Custom form? Pin
Paul Conrad30-Sep-07 13:06
professionalPaul Conrad30-Sep-07 13:06 
GeneralRe: Custom form? Pin
MasterSharp30-Sep-07 13:24
MasterSharp30-Sep-07 13:24 
GeneralRe: Custom form? Pin
Paul Conrad30-Sep-07 13:26
professionalPaul Conrad30-Sep-07 13:26 

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.