473,659 Members | 2,671 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to retreive the status of the child process?

Hi,

I have a problem on retreiving the status of the child process. I want to
open IE and load local file. Just after it is loaded, I need to delete that
local file. It seems that I can't use the function
WaitForInputIdl e/WaitForSingleOb ject in this situation. Please advise how I
can be notified once the IE is completed reading the file. Many thanks!

STARTUPINFO si;
PROCESS_INFORMA TION pi;

ZeroMemory( &si, sizeof(si) );
si.cb = sizeof(si);

// Start the child process.
if( !CreateProcess( strBrowser, // No module name (use command line).
"random.htm l", // Command line.
NULL, // Process handle not inheritable.
NULL, // Thread handle not inheritable.
FALSE, // Set handle inheritance to FALSE.
0, // No creation flags.
NULL, // Use parent's environment block.
NULL, // Use parent's starting directory.
&si, // Pointer to STARTUPINFO structure.
&pi ) // Pointer to PROCESS_INFORMA TION structure.
)
{
// ErrorExit( "CreateProc ess failed." );
}

// Wait until child process exits.
WaitForSingleOb ject( pi.hProcess, INFINITE ); // it would only be
notified when the IE is killed.
//WaitForInputIdl e(pi.hProcess, INFINITE);
DeleteFile(rand om.html);
Jul 19 '05 #1
1 3829

"yyii" <yy**@mail.hong kong.com> wrote in message
news:bi******** **@news.ctimail .com...
Hi,

I have a problem on retreiving the status of the child process. I want to
open IE and load local file. Just after it is loaded, I need to delete that local file. It seems that I can't use the function
WaitForInputIdl e/WaitForSingleOb ject in this situation. Please advise how I can be notified once the IE is completed reading the file. Many thanks!


You need a group for Windows programming, this group is about the C++
language, and there is no C++ language issue in your post. Try
news:comp.os.ms-windows.program mer.win32 for instance, and try learning some
netiquette before posting again.

john
Jul 19 '05 #2

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

Similar topics

1
3041
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
2
2307
by: Ishwar Rattan | last post by:
Here is a piece code (according to blurb on os.wait, the lower order 7 bits of exit status of process should contain the signal number of signal that terminated the process..) and signal number should be 8 (SIGFPE), similar logic in C-code produces expected result. Any pointers? -ishwar ----
2
11345
by: Stu | last post by:
I am running a simple c program on Solaris 2.8 that calls a ksh shell script x which contains an exit statement of 58 (exit 58). cat xxx.c #include <stdio.h> #include <errno.h> int
3
4515
by: Wizou | last post by:
i'm using .NET 2.0, and i've made a lot of tests i've come to the conclusion that TCP servers (tcplistener), started by a father process, are somewhat inherited by child processes if using UseShellExecute = false why is that ? try it ! even if the TcpListener is started *after* the childProcess.Start, the TCP server is still registered in netstat -ao and connectable with telnet, even if the father process stopped (or
10
4008
by: Charles Law | last post by:
For some reason, when I click the X to close my MDI parent form, the action appears to be re-directed to one of the MDI child forms, and the parent remains open. I am then unable to close the application. What should happen, is that the main MDI form should close, taking the child forms with it. There is code to loop through the child forms, remove the controls on each of them, and then close the form, but this code should execute only...
2
1981
by: sunil | last post by:
Hi All, I am tring to debug the following program.I written this program in HP-Unix and I am using the GDB as a debugger. #include <stdio.h> #include<unistd.h> int main() { int pid; pid = fork();
22
11744
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
3447
by: Karthik Gurusamy | last post by:
Hi, Wondering if there is a way to measure a child process's cpu usage (sys and user) when the child is still running. I see os.times() working fine in my system (Linux 2.6.9-42.7.ELsmp), but it gives valid data only after the child has exited. When the child is alive, os.times() data for child is zero for both child-sys and child-user cpu. My script (process P1) launches child process P2 (using
3
1280
by: sara | last post by:
Hi - I have a little system in Access 2003 to enter and track Problems - Help Desk type situation. I have a Main table tblTickets and a Child table tblTicketActions tblTickets has a TicketKey (autonumber) and tlbTicketActions has that field to connect the two tables. (It also has its own autonumber key).
0
8428
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...
1
8535
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8629
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...
0
7360
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6181
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
5650
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
4176
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
1982
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1739
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.