Solved

Communicating between two services

Posted on 2014-10-28
2
195 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 27

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

Manage your data center from practically anywhere

The KN8164V features HD resolution of 1920 x 1200, FIPS 140-2 with level 1 security standards and virtual media transmissions at twice the speed. Built for reliability, the KN series provides local console and remote over IP access, ensuring 24/7 availability to all servers.

Question has a verified solution.

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

If you get continual lockouts after changing your Active Directory password, there are several possible reasons.  Two of the most common are using other devices to access your email and stored passwords in the credential manager of windows.
An article on effective troubleshooting
This video Micro Tutorial explains how to clone a hard drive using a commercial software product for Windows systems called Casper from Future Systems Solutions (FSS). Cloning makes an exact, complete copy of one hard disk drive (HDD) onto another d…
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…

733 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