Solved

Communicating between two services

Posted on 2014-10-28
2
166 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 25

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

Too many email signature changes to deal with?

Are you constantly being asked to update your organization's email signatures? Do they take up too much of your time? Wouldn't you love to be able to manage all signatures from one central location, easily design them and deploy them quickly to users. Well, you can!

Join & Write a Comment

Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
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). …
Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…

744 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