Solved

Communicating between two services

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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

A Bare Metal Image backup allows for the restore of an entire system to a similar or dissimilar hardware. They are highly useful for migrations and disaster recovery. Bare Metal Image backups support Full and Incremental backups. Differential backup…
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.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

829 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