Recent

Author Topic: Get external application to control by TProcess.  (Read 1046 times)

andersonscinfo

  • Full Member
  • ***
  • Posts: 132
Get external application to control by TProcess.
« 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

jamie

  • Hero Member
  • *****
  • Posts: 6128
Re: Get external application to control by TProcess.
« Reply #1 on: July 06, 2020, 09:27:26 pm »
Only to a certain degree.

what kind of control was you looking for ?
The only true wisdom is knowing you know nothing

andersonscinfo

  • Full Member
  • ***
  • Posts: 132
Re: Get external application to control by TProcess.
« Reply #2 on: July 06, 2020, 09:42:36 pm »
handle, processid, and terminate.

Att

dsiders

  • Hero Member
  • *****
  • Posts: 1077
Preview Lazarus 3.99 documentation at: https://dsiders.gitlab.io/lazdocsnext

andersonscinfo

  • Full Member
  • ***
  • Posts: 132
Re: Get external application to control by TProcess.
« Reply #4 on: July 06, 2020, 10:36:39 pm »

Thank you all.

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11445
  • FPC developer.
Re: Get external application to control by TProcess.
« Reply #5 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