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

C#

 
GeneralRe: Problem with HasExited and WaitForExit() Pin
Luc Pattyn8-Feb-08 11:46
sitebuilderLuc Pattyn8-Feb-08 11:46 
GeneralRe: Problem with HasExited and WaitForExit() Pin
DaveyM698-Feb-08 11:54
professionalDaveyM698-Feb-08 11:54 
GeneralRe: Problem with HasExited and WaitForExit() Pin
Guffa8-Feb-08 12:41
Guffa8-Feb-08 12:41 
GeneralRe: Problem with HasExited and WaitForExit() Pin
engsrini8-Feb-08 13:20
engsrini8-Feb-08 13:20 
GeneralRe: Problem with HasExited and WaitForExit() Pin
mav.northwind8-Feb-08 20:07
mav.northwind8-Feb-08 20:07 
GeneralRe: Problem with HasExited and WaitForExit() Pin
PIEBALDconsult9-Feb-08 4:36
mvePIEBALDconsult9-Feb-08 4:36 
GeneralRe: Problem with HasExited and WaitForExit() Pin
danielhasdibs11-Feb-08 3:43
danielhasdibs11-Feb-08 3:43 
GeneralRe: Problem with HasExited and WaitForExit() Pin
Martin#11-Feb-08 23:50
Martin#11-Feb-08 23:50 
Hello,

Just an addintional info.

As the Process class implements IDisposable you should call Dispose() to free the memory.
You could use an using-block for that reason.
using(System.Diagnostics.Process WordProcess = new System.Diagnostics.Process())
{
    WordProcess = System.Diagnostics.Process.Start(psi);
    ...
}

I don't think there is a need to call the "Kill" method after "HasExited" is "true".
Same with "EnableRaisingEvents", only needed if you want to handle the "Exited" event.

P.S.: Strange, that WaitForExit is not working here.

All the best,

Martin

GeneralWindows Mobile GPS Application Issue Pin
Simerjots8-Feb-08 6:55
Simerjots8-Feb-08 6:55 
GeneralRe: Windows Mobile GPS Application Issue Pin
Gareth H8-Feb-08 9:00
Gareth H8-Feb-08 9:00 
GeneralRe: Windows Mobile GPS Application Issue Pin
Simerjots8-Feb-08 9:15
Simerjots8-Feb-08 9:15 
GeneralRe: Windows Mobile GPS Application Issue Pin
Simerjots8-Feb-08 14:20
Simerjots8-Feb-08 14:20 
General[Message Deleted] Pin
bruze8-Feb-08 5:42
bruze8-Feb-08 5:42 
GeneralRe: How to voice xml wave file srored in folder using c# aspx. Pin
Bert delaVega8-Feb-08 5:59
Bert delaVega8-Feb-08 5:59 
GeneralRe: [Message Deleted] Pin
engsrini8-Feb-08 13:38
engsrini8-Feb-08 13:38 
QuestionMobile app, auto-upgrade through web service Pin
JGentsch8-Feb-08 4:03
JGentsch8-Feb-08 4:03 
AnswerRe: Mobile app, auto-upgrade through web service Pin
JGentsch8-Feb-08 4:42
JGentsch8-Feb-08 4:42 
GeneralRe: Mobile app, auto-upgrade through web service Pin
led mike8-Feb-08 4:45
led mike8-Feb-08 4:45 
GeneralChanging Form Colors from XML Pin
s3rro8-Feb-08 3:57
s3rro8-Feb-08 3:57 
GeneralRe: Changing Form Colors from XML Pin
led mike8-Feb-08 4:35
led mike8-Feb-08 4:35 
GeneralRe: Changing Form Colors from XML Pin
s3rro8-Feb-08 4:45
s3rro8-Feb-08 4:45 
GeneralRe: Changing Form Colors from XML Pin
led mike8-Feb-08 6:51
led mike8-Feb-08 6:51 
GeneralRe: Changing Form Colors from XML Pin
Gareth H8-Feb-08 9:03
Gareth H8-Feb-08 9:03 
GeneralRe: Changing Form Colors from XML Pin
Bert delaVega8-Feb-08 7:24
Bert delaVega8-Feb-08 7:24 
QuestionMessage Closed Pin
8-Feb-08 3:50
bruze8-Feb-08 3:50 

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.