7398       Конференция Delphi SoobCha           письмо # 7399 7400  


Тема: Re: запуск чужого процесса
Дата: Sat, 12 Apr 2008 15:50:52 +0300
Кому: Delphi@soobcha.org
Content-Type: text/plain; charset=koi8-r

     Xammep said the following on 11.04.2008 3:37:

> пишется программа (GUI интерфейс для досовской утилиты), нужно в ней
> запустить программу с параметрами (например 'unrar -x -s')
>
> какой ф-цией воспользоваться чтоб знать что дочерняя программа уже
> завершена и т.д.?
>
ExecuteProcess из sysutils не подходит?

30.12.78 ExecuteProcess

Synopsis: Execute another process (program).

Declaration: function ExecuteProcess(const Path: AnsiString;
const ComLine: AnsiString) : Integer
function ExecuteProcess(const Path: AnsiString;
const ComLine: Array of AnsiString) : Integer
Visibility: default

Description: ExecuteProcess will execute the program in Path, passing it
the arguments in ComLine.
ExecuteProcess will then wait for the program to finish, and will return
the exit code of the
executed program. In case ComLine is a single string, it will be split
out in an array of strings,
taking into account common whitespace and quote rules.

Errors: In case the program could not be executed or an other error
occurs, an EOSError (1461) exception
will be raised.
See also: EOSError (1461)


--
Best regards, Phantom
http://phantom.atspace.com/indexru.html
http://phantom.co.nr (redirect)
icq # 370238994


  7398 7400  
 
???Mail.ru ??? ?????
╘ 2000-2006 Сообщество Чайников