473,395 Members | 1,689 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.

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
WaitForInputIdle/WaitForSingleObject in this situation. Please advise how I
can be notified once the IE is completed reading the file. Many thanks!

STARTUPINFO si;
PROCESS_INFORMATION pi;

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

// Start the child process.
if( !CreateProcess( strBrowser, // No module name (use command line).
"random.html", // 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_INFORMATION structure.
)
{
// ErrorExit( "CreateProcess failed." );
}

// Wait until child process exits.
WaitForSingleObject( pi.hProcess, INFINITE ); // it would only be
notified when the IE is killed.
//WaitForInputIdle(pi.hProcess, INFINITE);
DeleteFile(random.html);
Jul 19 '05 #1
1 3818

"yyii" <yy**@mail.hongkong.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
WaitForInputIdle/WaitForSingleObject 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.programmer.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
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
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...
2
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
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...
10
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...
2
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 =...
22
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...
2
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...
3
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...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
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.