Recent

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

andersonscinfo

  • Full Member
  • ***
  • Posts: 112
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: 3540
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: 112
Re: Get external application to control by TProcess.
« Reply #2 on: July 06, 2020, 09:42:36 pm »
handle, processid, and terminate.

Att

dsiders

  • Sr. Member
  • ****
  • Posts: 375
Lazarus 2.1 (SVN) / FPC 3.0.4 / FPC 3.2.0 / x86-win64 / Windows 8.1

andersonscinfo

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

Thank you all.

marcov

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 8733
  • 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