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

  • SEARCH
  • Home
  • 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 3597336
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T20:06:18+00:00 2026-05-18T20:06:18+00:00

Process cExe = new Process(); cExe .StartInfo.FileName = cexe.exe; cExe .EnableRaisingEvents = true; cExe

  • 0
Process cExe = new Process();
cExe .StartInfo.FileName = "cexe.exe";
cExe .EnableRaisingEvents = true;
cExe .Exited += this.cExited;

And this is the exited method

private void cExited(object o, EventArgs e)
{
    MessageBox.Show(/* SHOW FILE NAME HERE */);
}

How would i get the information about the process from the exited method? which of the variables (o, e) give me this data and what type are they meant to be?

  • 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-05-18T20:06:19+00:00Added an answer on May 18, 2026 at 8:06 pm

    While working with .Net Base Class Library, you will find that each event passes two parameters.

    First is always of type System.Object and other is of type (or descendant of) System.EventArgs.

    The first argument that is object sender can be safely cast into type of class that raised that event. In your case that is of type System.Diagnostics.Process.

    Example:

    private void cExited(object o, EventArgs e)
    {
        Process p = (Process)o;
        // Use p here
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Process cExe = new Process(); cExe .StartInfo.FileName = cexe.exe; cExe .EnableRaisingEvents = true; cExe
Process process = new Process(); ProcessStartInfo psi = new ProcessStartInfo(@C:/PsExec.exe); psi.UseShellExecute = false; psi.RedirectStandardOutput
Process.Start(IExplore.exe); Does this always work, on every machine ? If not, how to do
Process myProcess = new Process(); ProcessStartInfo remoteAdmin = new ProcessStartInfo(Environment.GetFolderPath(Environment.SpecialFolder.System) + @\iisreset.exe /restart); remoteAdmin.UserName
class Process implements Runnable{ private ThreadProcessing MIDlet; public Process(ThreadProcessing MIDlet){ this.MIDlet = MIDlet; System.out.println(Thread
why Process.WaitForExit doesn't wait? static void Main(string[] args) { while (true) { try {
Process p = Runtime.getRuntime().exec(command); is = p.getInputStream(); byte[] userbytes = new byte[1024]; is.read(userbytes); I
Process[] processlist = Process.GetProcesses(); foreach (Process proc in processlist) { Console.Write(proc.MainModule.FileName); } it give
Process p; String line; String path; String[] params = new String [3]; params[0] =
I want to attach to a process(a.exe) as soon as it is spawned, is

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.