Solved

Communicating between two services

Posted on 2014-10-28
2
178 Views
Last Modified: 2014-10-30
Hi,

If I want to communicate between two Services with the WM_CopyData messaging system then how to get the Handle of the Service ?
I would prefer not to use Socket / Named pipes.

I use Delphi on Windows.

Regards
Allan
0
Comment
Question by:Allan_Fernandes
2 Comments
 
LVL 26

Accepted Solution

by:
Sinisa Vuk earned 500 total points
ID: 40408574
You can use custom message too - look in this article:
http://www.delphi-central.com/ipc_sendmessage.aspx

Custom message can be adopted to use WM_CopyData or just look how to find client app (using FindWindow)
This is not a fancy way - but works.

Second way is to broadcust a custom created message (RegisterWindowMessage) (send to not specific window) - but this is also not so usual way
0
 

Author Comment

by:Allan_Fernandes
ID: 40410055
Since it is a Service I will not get a result for FindWindow, that will not allow me to use the first option.

Broadcast will not be refined method either.

Please note that both the services are mine and I have the liberty to store details in a text file (eg: Handle etc) for the other service to read.
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is an article about Leadership and accepting and adapting to new challenges. It focuses mostly on upgrading to Windows 10.
Possible fixes for Windows 7 and Windows Server 2008 updating problem. Solutions mentioned are from Microsoft themselves. I started a case with them from our Microsoft Silver Partner option to open a case and get direct support from Microsoft. If s…
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …
The viewer will learn how to successfully create a multiboot device using the SARDU utility on Windows 7. Start the SARDU utility: Change the image directory to wherever you store your ISOs, this will prevent you from having 2 copies of an ISO wit…

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now