473,624 Members | 2,469 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

wait for a process end ...

I have created a process with ShellExecuteEx( )
I want my main process to wait untill this process end.
how could I do that ?
Nov 17 '05 #1
2 3038
>I have created a process with ShellExecuteEx( )
I want my main process to wait untill this process end.
how could I do that ?


Lloyd,

Have a look at the WaitForXXX APIs. At the simplest level, you can
just WaitForSingleOb ject on the process handle returned from SEEx.

Dave
--
MVP VC++ FAQ: http://www.mvps.org/vcfaq
Nov 17 '05 #2
great, thanks !

"David Lowndes" <da****@mvps.or g> wrote in message
news:ji******** *************** *********@4ax.c om...
I have created a process with ShellExecuteEx( )
I want my main process to wait untill this process end.
how could I do that ?


Lloyd,

Have a look at the WaitForXXX APIs. At the simplest level, you can
just WaitForSingleOb ject on the process handle returned from SEEx.

Dave
--
MVP VC++ FAQ: http://www.mvps.org/vcfaq

Nov 17 '05 #3

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

Similar topics

1
3039
by: Markus Franz | last post by:
Hi. I created a little script: for currenturl in sys.argv: pid = os.fork() if pid == 0: signal.alarm(10) do_something() # placeholder for the download and print routine
1
1011
by: metsymani | last post by:
In my web application, I have a search screen coded in ASP.Net. The Search process takes lot of time. So, I need to show a wait page informing the user that "Search is in progress. Please wait" along with an animated gif. I have placed a div in the search page which contains the message and animated gif. I hide the div by making "display: none" in the onload function of the body tag. On click of the Search button(type = Submit), I call a...
11
2927
by: Michi Henning | last post by:
Hi, I'm calling Monitor.Wait() from a console event handler. It's not working -- the call to Wait() immediately causes the process to exit. Is it impossible for some reason to call Wait() from an event handler? Small code example attached. Thanks,
4
17074
by: Peter | last post by:
I am using CreateProcessWithLogonW to run an external application, the problem I am having is that the C# program does not wait until the external program finishes running before continuing. The external program is a console application and it does not interact with users, how can I make my C# program wait until the program initiated by CreateProcessWithLogonW API completes running before continuing? here's my API code. bool ret =...
18
50954
by: Coder | last post by:
Howdy everybody! How do I do the following... while (myVary != true){}; Obviously I do not want to use 100% of the processor to stay in this infinite loop till myVar == true. But wait do I do? Thanks yal!
4
9159
by: colson | last post by:
I know how to create a new process using System.Diagnostics.Process and wait for the process to end using WaitForExit(). How do I wait for multiple processes? Is there an equivalent to WaitForMultipleObjects under .NET? Thanks
0
1707
by: NvrBst | last post by:
I want to send a bunch of keys to an external window using PostMessage. I send a "KEYDOWN" message (then have to wait for the program to produce the CHAR message) then send the "KEYUP" message. Sometimes I have to only wait 1ms, others I have to wait up to 10ms. Always waiting 10ms for the long messages makes the typing looks slower... Is there a way to find out when the "CHAR" message was processed in the external window? IE, If I...
1
4036
by: meihome | last post by:
I have a pretty long process (40 seconds) script. It is kicked off from one controller action from web browser. The problem is, the Rails does not wait until the process is done. It actually stops the process at about 5 seconds, and goes to the next step. def _run_script (my_id) system ("my_long_running_script.sh") redirect_to :action =>'edit', :id => my_id end
22
11743
by: Jason Zheng | last post by:
This may be a silly question but is possible for os.wait() to lose track of child processes? I'm running Python 2.4.4 on Linux kernel 2.6.20 (i686), gcc4.1.1, and glibc-2.5. Here's what happened in my situation. I first created a few child processes with Popen, then in a while(True) loop wait on any of the child process to exit, then restart a child process: import os from subprocess import Popen
2
1563
by: vijayasb | last post by:
Hi, I have a requirement to calculate or get process wait time and process ready time.By using GetProcessTimes API we can get user time, kernel time , creation time and exit time of a process. Using kernel and user time we can calculate CPU usage of a process. I need information to calculate or retrieve wait and ready time of a process.Please help me in getting this info.I need it very urgently. Thanks, Viju
0
8240
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8175
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8482
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6111
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5565
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4177
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2610
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1791
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1487
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.