Lazarus

Programming => General => Topic started by: andersonscinfo on July 06, 2020, 08:48:48 pm

Title: Get external application to control by TProcess.
Post by: andersonscinfo on July 06, 2020, 08:48:48 pm
Hello, I would like to know if it is possible to control an application running with TProcess, detail is that it was not my app that ran it initially.

Lazarus stable, fpc stable, S.O win 7
Title: Re: Get external application to control by TProcess.
Post by: jamie on July 06, 2020, 09:27:26 pm
Only to a certain degree.

what kind of control was you looking for ?
Title: Re: Get external application to control by TProcess.
Post by: andersonscinfo on July 06, 2020, 09:42:36 pm
handle, processid, and terminate.

Att
Title: Re: Get external application to control by TProcess.
Post by: dsiders on July 06, 2020, 09:53:57 pm
handle, processid, and terminate.

Att

https://www.freepascal.org/docs-html/current/fcl/process/tprocess.html
Title: Re: Get external application to control by TProcess.
Post by: andersonscinfo on July 06, 2020, 10:36:39 pm

Thank you all.
Title: Re: Get external application to control by TProcess.
Post by: marcov on July 07, 2020, 08:51:10 am
Hello, I would like to know if it is possible to control an application running with TProcess, detail is that it was not my app that ran it initially.

Lazarus stable, fpc stable, S.O win 7

Afaik no. TProcess wraps ExecuteProcess/execve, and the various preparations for it.   Maybe you could reuse some code for handling the pipes, but even those depend on how they are prepared.
TinyPortal © 2005-2018