Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8159229
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T17:50:35+00:00 2026-06-06T17:50:35+00:00

i am creating a process using System.DIagnostics.Process in c# i have created a class

  • 0

i am creating a process using System.DIagnostics.Process in c#
i have created a class CCProcess inherited from the Process class
the problem is that ErrorDataRecieved OR OutputDataReceived are not being fired..
herez my code

public CCProcess(string executablePath, string[] parameters, CCProcessInfo processInfo)
        {
            this.ProcessInfo = processInfo;
            this.OutputMessages = new List<ProcessOutputMessage>();
            this.ProcessId = Guid.NewGuid().ToString();

            base.EnableRaisingEvents = true;
            this.StartInfo = new ProcessStartInfo(executablePath)
            {
                Arguments = string.Join(" ", parameters.Select(s => string.Format("\"{0}\"", s))),
                CreateNoWindow = true,
                ErrorDialog = false,
                RedirectStandardError = true,
                RedirectStandardInput = true,
                RedirectStandardOutput = true,
                StandardErrorEncoding = Encoding.UTF8,
                StandardOutputEncoding = Encoding.UTF8,
                WindowStyle = ProcessWindowStyle.Hidden,
                UseShellExecute = false
            };

            this.ErrorDataReceived += (sender, e) =>
            {
                this.OutputMessages.Add(new ProcessOutputMessage() { Message = e.Data, Type = OutputType.Error });
                if (this.ErrorData_Recieved != null&&!string.IsNullOrEmpty(e.Data))
                {
                    this.ProcessInfo.LastResponseFromProcess = DateTime.Now;
                    this.ErrorData_Recieved(e.Data);
                }
            };

            this.OutputDataReceived += (sender, e) =>
            {
                this.OutputMessages.Add(new ProcessOutputMessage() { Message = e.Data, Type = OutputType.Output });
                if (OutputData_Recieved != null && !string.IsNullOrEmpty(e.Data))
                {
                    this.ProcessInfo.LastResponseFromProcess = DateTime.Now;
                    OutputData_Recieved(e.Data);
                }
            };
        }

what am i doing wrong?
the code provided is the constructor of the class CCProcess

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T17:50:37+00:00Added an answer on June 6, 2026 at 5:50 pm

    oooh i hate this.. posting question here and then answering them.. anyways
    i was missing a bery basic thing
    Process.BeginOutputReadLine()
    wasted 2 hours because of this
    more about this here
    http://msdn.microsoft.com/en-us/library/system.diagnostics.process.beginoutputreadline

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm creating new processes using System.Diagnostics.Process class from my application. I want this processes
When using python-daemon , I'm creating subprocesses likeso: import multiprocessing class Worker(multiprocessing.Process): def __init__(self,
I am creating an insert process in php but I have a problem in
I'm creating a program in C# using System.Speech.Recognition that recognizes voice commands and translates
Am trying to execute ssis package using dtexec utility from c# app(Creating New Process,
I have a CSV file that was extracted from a ticketing system (I have
I'm printing a document by creating a System.Diagnostics.Process object and then setting the StartInfo
I'm in the process of creating my own custom ModelBinder that inherits from DefaultModelBinder,
I'm using a System.Diagnostic.Process to call another .exe. I'm creating an application which purpose
Java Socket Server I have a Java process that is creating a listener on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.