We are trying to develop an application that send messages to a service, but we only have send message between two applications. We are developing in Delphi 7, Windows XP.
We need the service send back a message to the application, depending on the result of the action that the application sent to do to the service.
Well, some people said that it's impossible to send a message from an application to a service. So, we decided to make two services, and now we have to send messages from one service to another one. Now, the point is: how to send a message from a service to another one?
You cannot send window messages to a service. For one, services do not have a UI of their own, let alone windows. And second, even if you add your own hidden window to the service (actually, Delphi-based services do have the hidden TApplication window), window messages are not allowed to pass over session boundaries (services run in a separate session than user-mode applications).
There are many IPC (interprocess communications) mechanisms that work with services - named pipes, mailslots, TCP/IP and UDP sockets, just to name a few. You will have to use one of those instead.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With