473,395 Members | 1,484 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

No process is associated with this object error

I have the following code and when it hits the WaitForIdleInput() line,
it gives me the exception "No process is associated with this object".
I've searched the groups and read a ton of posts about this error, but
no suggestions have fixed it. What can I try? Thanks.

ProcessStartInfo si = new ProcessStartInfo(appPath + "lame", "
--abr 64 " + source + " " + destination);
si.UseShellExecute = false;
si.RedirectStandardOutput = true;
System.Diagnostics.Process oProcess = new Process();
oProcess.StartInfo = si;
oProcess.WaitForInputIdle();
if (!oProcess.HasExited)
oProcess.WaitForExit();

Jul 12 '06 #1
2 25932

vtxr1300 wrote:
I have the following code and when it hits the WaitForIdleInput() line,
it gives me the exception "No process is associated with this object".
I've searched the groups and read a ton of posts about this error, but
no suggestions have fixed it. What can I try? Thanks.

ProcessStartInfo si = new ProcessStartInfo(appPath + "lame", "
--abr 64 " + source + " " + destination);
si.UseShellExecute = false;
si.RedirectStandardOutput = true;
System.Diagnostics.Process oProcess = new Process();
oProcess.StartInfo = si;
oProcess.WaitForInputIdle();
if (!oProcess.HasExited)
oProcess.WaitForExit();
Nevermind, I think I figured it out. For some reason, all the code I
saw never included the oProcess.Start portion. I put that in and then
it would start the process, but eventually cause an exception on the
WaitForInputIdle line. I commented that out and it's working now. Can
anyone shed some light on why the WaitForInputIdle caused a problem?
The exception said something about not having a GUI interface. Thanks.

Jul 12 '06 #2
"vtxr1300" <ca********@hotmail.comwrote:
I have the following code and when it hits the WaitForIdleInput() line,
it gives me the exception "No process is associated with this object".
I've searched the groups and read a ton of posts about this error, but
no suggestions have fixed it. What can I try? Thanks.

ProcessStartInfo si = new ProcessStartInfo(appPath + "lame", "
--abr 64 " + source + " " + destination);
si.UseShellExecute = false;
si.RedirectStandardOutput = true;
System.Diagnostics.Process oProcess = new Process();
oProcess.StartInfo = si;
I see you never call "oProcess.Start()". You'll want to start the
process, I expect :)
oProcess.WaitForInputIdle();
BTW, this waits for a GUI message loop to start in the given
application. A program like lame (I presume it's a command-line mp3
encoder) won't have a message loop.
if (!oProcess.HasExited)
oProcess.WaitForExit();
-- Barry

--
http://barrkel.blogspot.com/
Jul 12 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

77
by: Charles Law | last post by:
Hi guys I have a time critical process, running on a worker thread. By "time critical", I mean that certain parts of the process must be completed in a specific time frame. The time when the...
18
by: jas | last post by:
Hi, I would like to start a new process and be able to read/write from/to it. I have tried things like... import subprocess as sp p = sp.Popen("cmd.exe", stdout=sp.PIPE)...
2
by: Fei Yuan | last post by:
Please forgive me re-posting this question since I wasn't clear in my original post. ---- Starting an external process needs to pass it a ProcessStartInfo() object. ProcessStartInfo has a...
7
by: Samantha | last post by:
Hello , I am developping a program for Win98 plateform, and I am stucking with a problem, hope you can help me. I have a program running 2 process : - One process running the Xcopy.exe -...
3
by: Dean Slindee | last post by:
The code below is being used to launch WinWord.exe from a VB.NET program. Word launches, but displays this error message: "Word has experienced an error trying to open the file. Try these...
2
by: Terry Olsen | last post by:
Using the following code, I get the error "No process is associated with this object" when calling the WinZip.WaitForExit() method. After I click the "Break" or "Continue" button on the dialog,...
1
by: BenS | last post by:
Good Morning and Happy Wednesday! I've got a web service that exposes a method that takes an string input parameter that specifies an executable on the server that starts a process. These...
16
by: Caroline | last post by:
I am building a web application to gather user information then launch a process to calculate results. The process is a 3rd Party executable. I cannot get the process to start. Is there a...
2
by: =?Utf-8?B?U3RldmVU?= | last post by:
I am trying to get the exit code of an application (IE) after the process closes. On my system I keep getting an exception error. "No process is associated with the object." The Process class is...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.