Gepending on whether the started application will stop
itself (and yours has to wait for it) or your application
should stop it after a certain of time, you should either
use ShellExecuteEx and wait for the application to finish
(checking for "STILL_ACTIVE" with "GetExitCodeProcess") or
start the application using "CreateProcess" and just kill
that process when the time is right.


Greetz,

Peter.

-----Oorspronkelijk bericht-----
Van: [email protected] [mailto:[EMAIL PROTECTED]
Francisco Javier Hernandez Segura
Verzonden: woensdag 12 maart 2008 16:08
Aan: [email protected]
Onderwerp: [delphi-en] Re: Windows processes


What i am trying to do is to open automatically some files each specific
time.
I am opening such files with Shellexecute instruction as is showed next:

var
vpchar : arrar [0..800] of char;
begin
StrPcopy(vpchar, table1filename.value);
Shellexecute(application.handle, 'open', vpchar, nil, nil, SW_NORMAL)

.....
.....

end;

When a file is opened, after certain time it should be closed and then
another file should
be opened.

Thank you !

Reply via email to