Click here to Skip to main content
15,897,891 members
Home / Discussions / C#
   

C#

 
GeneralDrawing one point Pin
Kiki9931-Mar-05 2:58
Kiki9931-Mar-05 2:58 
GeneralRe: Drawing one point Pin
S. Senthil Kumar31-Mar-05 3:04
S. Senthil Kumar31-Mar-05 3:04 
GeneralRe: Drawing one point Pin
Kiki9931-Mar-05 3:29
Kiki9931-Mar-05 3:29 
GeneralWeb Services - c# application Pin
wakkerjack31-Mar-05 1:51
wakkerjack31-Mar-05 1:51 
GeneralRe: Web Services - c# application Pin
Kodanda Pani31-Mar-05 2:09
Kodanda Pani31-Mar-05 2:09 
GeneralMemmory mapping in C# Pin
Themis31-Mar-05 1:01
Themis31-Mar-05 1:01 
GeneralQuery Engine Error Pin
dotnetquery31-Mar-05 0:26
dotnetquery31-Mar-05 0:26 
GeneralProblem reading process.standardout Pin
CoffeeZombie31-Mar-05 0:11
CoffeeZombie31-Mar-05 0:11 
I'm getting a weird problem while reading the standard output from a process I've created while its running. The console output from the process is A, B, C, D, E but for some reason I am getting the output from standard out as A, B, C, E, D. Has anyone encountered this before?

I'm using a separate thread to read standard out and push the results to a Queue which is then read by the main application and displayed in a text window.

Writing to the Queue in the thread:
ConsoleLine = null;
while( (ConsoleLine MyProcess.StandardOutput.ReadLine()) != null )
{
ConsoleLine += System.Environment.NewLine;
lock( m_OutputQueue.SyncRoot )
{
m_OutputQueue.Enqueue( ConsoleLine );
}
ConsoleLine = null;
}


Reading from the Queue and updating application:
do
{
while( (StdStreamReader.m_OutputQueue.Count>0) && (i<5) )
{
// get output from queue
ConsoleLine = StdStreamReader.m_OutputQueue.Dequeue() as string;
//process output
if( globals.ProcessBuildOutput( ConsoleLine ) )
{
bErrors = true;
}
i++;
}
// let the app do some housekeeping
Application.DoEvents();
//Give the process some room to breath
System.Threading.Thread.Sleep( 100 );
}while( !MyProcess.HasExited );

GeneralRe: Problem reading process.standardout Pin
Sebastian Schneider31-Mar-05 0:43
Sebastian Schneider31-Mar-05 0:43 
GeneralRe: Problem reading process.standardout Pin
Sebastian Schneider31-Mar-05 0:48
Sebastian Schneider31-Mar-05 0:48 
QuestionHow to obtain the server name of the one machine or the office land online SQL SERVER200 0 Pin
prochf31-Mar-05 0:07
prochf31-Mar-05 0:07 
AnswerRe: How to obtain the server name of the one machine or the office land online SQL SERVER200 0 Pin
prochf31-Mar-05 20:12
prochf31-Mar-05 20:12 
GeneralNeed code of email verification in win form Pin
oohungoo30-Mar-05 22:48
oohungoo30-Mar-05 22:48 
GeneralRe: Need code of email verification in win form Pin
Dave Kreskowiak31-Mar-05 5:48
mveDave Kreskowiak31-Mar-05 5:48 
GeneralRe: Need code of email verification in win form Pin
oohungoo31-Mar-05 22:27
oohungoo31-Mar-05 22:27 
GeneralRe: Need code of email verification in win form Pin
Dave Kreskowiak1-Apr-05 2:03
mveDave Kreskowiak1-Apr-05 2:03 
Questionhow convert matlab to C# windows application Pin
audaialghzawi30-Mar-05 21:58
audaialghzawi30-Mar-05 21:58 
Generalpropertygrid Pin
ingwaar30-Mar-05 19:29
ingwaar30-Mar-05 19:29 
GeneralRe: propertygrid Pin
spif200130-Mar-05 20:13
spif200130-Mar-05 20:13 
GeneralRe: propertygrid Pin
the last free name30-Mar-05 20:50
the last free name30-Mar-05 20:50 
GeneralRe: propertygrid Pin
ingwaar30-Mar-05 21:10
ingwaar30-Mar-05 21:10 
QuestionHow do you add a TreeView to a DataGrid? Pin
whather30-Mar-05 18:17
whather30-Mar-05 18:17 
GeneralTextbox event Pin
chettu30-Mar-05 17:42
chettu30-Mar-05 17:42 
GeneralRe: Textbox event Pin
S. Senthil Kumar30-Mar-05 19:10
S. Senthil Kumar30-Mar-05 19:10 
QuestionHow to start SQL Server 2000 Pin
rroobb30-Mar-05 17:27
rroobb30-Mar-05 17:27 

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.