So there is no way to tell (via GetExitCodeProcess) when NT has released all the
resources...
Wouldn't the same type of thing also occur for the WaitForSingleObject
WaitForSingleObjectEx ?
Regards
Paul McKenzie
=========================
Paul McKenzie
Jetbet II Developer
=========================
[EMAIL PROTECTED]
Ph: (04) 576-6822
T.A.B. National Office
106-110 Jackson Street
Petone
New Zealand
____________________Reply Separator____________________
Subject: RE: [DUG]: Process termination
Author: [EMAIL PROTECTED]
Date: 16/05/2001 13:50
A success from GetExitCodeProcess does not always guarantee that NT is done
with the process' resources. For example, NT may still keep the EXE file
locked for a short while.
BTW, a better function to use is WaitForSingleObject /
WaitForSingleObjectEx. Pass in the process handle. The object is
signalled
when the process is terminated.
Regards,
Dennis.
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, 16 May 2001 11:27
> To: Multiple recipients of list delphi
> Subject: [DUG]: Process termination
>
>
> Hi All
>
> When a Process is terminating and you are waiting for the process
> to complete
> its Termination, i.e. waiting on GetExitCodeProcess <> STILL_ACTIVE.
> Does anyone know if there is a temporary state ("error code") returned by
> GetExitCodeProcess, between STILL_ACTIVE and the Process Termination
fully
> Completed.
> Something like "Terminating" ???
>
> What we are doing is running the process, waiting for it to
> terminate, and then
> closing the handles for the Thread and Process, and deleting the EXE.
> Every now and then the close handle fails (The GetExitCodeProcess
> succeeds) and
> the delete fails.
>
> any help much appreciated...
>
>
> Regards
> Paul McKenzie
>
> =========================
> Paul McKenzie
> Jetbet II Developer
> =========================
> [EMAIL PROTECTED]
> Ph: (04) 576-6822
>
> T.A.B. National Office
> 106-110 Jackson Street
> Petone
> New Zealand
>
>
>
> ------------------------------------------------------------------
> ---------
> New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
> Website: http://www.delphi.org.nz
> To UnSub, send email to: [EMAIL PROTECTED]
> with body of "unsubscribe delphi"
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED]
with body of "unsubscribe delphi"(See attached file: att1.eml)
att1.eml