Solved

Handling Message

Posted on 1998-05-27
1
138 Views
Last Modified: 2010-04-06
My question is next.
I have a procedure in which I create proces. This proces call oracle loader program which loads data in the oracle database. So this can take a lot of time. But when I create a proces I don't won't to wait until this process isn't over.
When I chose another table to fill with data I again call this process with different parameters. And so it can be many times. So several process running at the same time.
And now a question.

How can I determine which process is finished and when, because I need a time. This time is needed to update to oracle database.
0
Comment
Question by:p_uros
1 Comment
 
LVL 1

Accepted Solution

by:
ssite earned 100 total points
ID: 1348041
If you don't need the exact milisecond, here's what I would do :

Whenever you use createprocess, the final parameter is the process information :

use proc.hProcess and you know the process id of the process you ran.

Store all these in an array or list and then use a timer to check every second or two, which process ID's are still alive. You use GetExitCodeProcess(processarray[index], @Exitcode)

if ExitCode is not STILL_ACTIVE, the process finished in the time between the last check and now. Don't forget a flag to prevent you from doing the timer event twice at the same time.

Hope this helps.


0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Need to grow your business through quality cloud solutions? With everything required to build a cloud platform and solution, you may feel like the distance between you and the cloud is quite long. Help is here. Spend some time learning about the Con…

914 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now