Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Delphi: Passing a parameter to a running service to act on

Tags:

service

delphi

We have a service (written in C#) running to check somethings every 10 minutes and if something new happened, then send an email to someone special.

We also have other Delphi program and want to pass a parameter to the service to act on and send email immediately (I mean regardless than 10 minutes interval).

How to do that while service is running ?

note: There is no way to migrate to C# we have to do that in Delphi.

like image 525
Omid Avatar asked Jan 28 '26 02:01

Omid


2 Answers

There's also a possibility to use ControlService API to send the service a user-defined control code. (The service has to be written to respond to that specific control code.)

like image 186
Ondrej Kelle Avatar answered Jan 29 '26 14:01

Ondrej Kelle


You need to use some form of inter process communication (IPC). There are many possibilities. Most commonly used for such a scenario are named pipes and TCP/sockets.

like image 20
David Heffernan Avatar answered Jan 29 '26 15:01

David Heffernan