Doesn´t recognize process ended

gardet

Newcomer
Joined
Aug 24, 2009
Messages
10
I have this application where i drop a audiofile in a textbox and it then uses besweet to encode the file. It almost works great, besweet does it work, but looks like the application doesn´t recognize it has ended. I use the follow code (that i found at microsofts homepage):

Code:
            ProcessStartInfo pInfo = new ProcessStartInfo();
            pInfo.FileName = this.besweet;
            pInfo.Arguments = "-core( -input \""+this.audiofile+"\" -output \""+this.finalaudio+
"\" -logfilea \""+this.logfile+"\" ) -azid( -c normal -L -3db )
-ota( -hybridgain ) -lame( -p --alt-preset "+this.bitrate+" )";
            Process p = Process.Start(pInfo);
            p.WaitForInputIdle();
            p.WaitForExit();
            MessageBox.Show("Code continuing...");

The messagebox never popup, i have looked in the task manager and besweet does terminate but the application dont see it.

Solution/Reason for that?
 
Did you set the EnableRaisingEvents property on the process to true? As far as I know, your application wont get the information that the process has stopped without it.
 
Back
Top