Click here to Skip to main content
15,843,498 members
Home / Discussions / C#
   

C#

 
GeneralRe: Best Video Control is... Pin
Stephane Rodriguez.3-Nov-02 10:35
Stephane Rodriguez.3-Nov-02 10:35 
GeneralXML Dataset and Removing Rows... Pin
hammackj2-Nov-02 19:08
hammackj2-Nov-02 19:08 
GeneralRe: XML Dataset and Removing Rows... Pin
John Fisher4-Nov-02 9:08
John Fisher4-Nov-02 9:08 
GeneralRe: XML Dataset and Removing Rows... Pin
hammackj4-Nov-02 14:35
hammackj4-Nov-02 14:35 
GeneralC# Database question Pin
Anonymous2-Nov-02 15:57
Anonymous2-Nov-02 15:57 
GeneralRe: C# Database question Pin
ian mariano2-Nov-02 16:25
ian mariano2-Nov-02 16:25 
GeneralRe: C# Database question Pin
Munti4-Nov-02 6:48
Munti4-Nov-02 6:48 
Questionprocess id? Pin
imran_rafique2-Nov-02 15:21
imran_rafique2-Nov-02 15:21 
please see this code i want to start a process.After successful
starting i want to get its id for further processing.For that
purpose most of my processes are setup files (of some software like installers)
most of the processes execute this code successfuly but when i start
a process for example setup file of yahoo messanger installer or VCD Cutter installer
and some other software they all raise an exception(InvalidOperationException)
at last line although the process started successfully and its window appears
,and started process has its existance.

i want to get its id only(in last line of this code ).
my question is
why it raise an exception although started process has its existance?
i think its id is changed.am i right ?
if yes how to trace it id?
or it might be possible that the main process i start also start some other process and
exit itself. if thats true how to trace these processes?

int idpro;
tmpProcess = new Process();
tmpProcess.Exited += new EventHandler(this.ProcessExited);
tmpProcess.EnableRaisingEvents=true;
tmpProcess.StartInfo.FileName=strProcName;
try
{
 tmpProcess.Start();
 while(! tmpProcess.Responding)System.Windows.Forms.Application.DoEvents();
}
catch
{
//MessageBox.Show("The Process: " + strSelectedProcess + " cannot start !");
}
idpro=tmpProcess.Id;


r00d0034@yahoo.com
AnswerRe: process id? Pin
Stephane Rodriguez.2-Nov-02 20:15
Stephane Rodriguez.2-Nov-02 20:15 
GeneralRe: process id? Pin
imran_rafique3-Nov-02 16:20
imran_rafique3-Nov-02 16:20 
GeneralRe: process id? Pin
Stephane Rodriguez.3-Nov-02 19:49
Stephane Rodriguez.3-Nov-02 19:49 
GeneralRe: process id? Pin
imran_rafique4-Nov-02 16:00
imran_rafique4-Nov-02 16:00 
GeneralRe: process id? Pin
Stephane Rodriguez.4-Nov-02 19:59
Stephane Rodriguez.4-Nov-02 19:59 
GeneralHttpRequest Pin
kavehdr2-Nov-02 12:30
kavehdr2-Nov-02 12:30 
GeneralRe: HttpRequest Pin
Vasudevan Deepak Kumar5-Nov-02 4:55
Vasudevan Deepak Kumar5-Nov-02 4:55 
GeneralAssembly Pin
kavehdr2-Nov-02 8:46
kavehdr2-Nov-02 8:46 
GeneralRe: Assembly Pin
Daniel Turini2-Nov-02 9:04
Daniel Turini2-Nov-02 9:04 
GeneralRe: Assembly Pin
kavehdr2-Nov-02 9:13
kavehdr2-Nov-02 9:13 
GeneralRe: Assembly Pin
John Fisher2-Nov-02 10:22
John Fisher2-Nov-02 10:22 
GeneralRe: Assembly Pin
ian mariano2-Nov-02 10:59
ian mariano2-Nov-02 10:59 
GeneralRe: Assembly Pin
kavehdr2-Nov-02 12:32
kavehdr2-Nov-02 12:32 
GeneralRe: Assembly Pin
John Fisher2-Nov-02 14:29
John Fisher2-Nov-02 14:29 
GeneralRe: Assembly Pin
ian mariano2-Nov-02 15:17
ian mariano2-Nov-02 15:17 
GeneralHttpWebRequest Pin
kavehdr2-Nov-02 8:45
kavehdr2-Nov-02 8:45 
GeneralRe: HttpWebRequest Pin
Stephane Rodriguez.2-Nov-02 9:39
Stephane Rodriguez.2-Nov-02 9:39 

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.