Solved

How to Send message to a service application or process run in other user.

Posted on 2006-07-02
3
761 Views
Last Modified: 2012-06-21
Hi,
How can i send message to service application?
0
Comment
Question by:MohammadrezaH
3 Comments
 
LVL 17

Accepted Solution

by:
TheRealLoki earned 125 total points
Comment Utility
What you are looking for is inter-process communication

You could also use sockets (e.g. TCP/IP) - I'm seeing more and more processes use this method.
Simply drop a TWSocket, or TidTCPCLient or some other TCp server socket onto your service datamodule and handle the requests from a TCP client.

There are a lot of people who use RemObjects, which supports many connection methods, encryption, etc.
http://www.remobjects.com/page.asp?id={364BA043-7A12-4453-8F96-97BDA56BC0E0}
(EE may not get this link right so copy it manually from above)

here's how to do it with WM_COPYDATA
http://www.experts-exchange.com/Programming/Programming_Languages/Delphi/Q_20280702.html?query=wm_copydata&topics=85

If you can get to grips with it, you can use COM/DCOM
I had this going fine. 1 side note was that if you connected via DCOM remotely, and the service was nt running, it would start it.
Sometimes you have to mess with DCOMCNFG.exe to get things right though.

If the service is going to be logged on as the same username as the logged on user, you can use sharedmemory
(you can do it no matter what user ison, but have to do a bit more code)
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
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…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

762 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

9 Experts available now in Live!

Get 1:1 Help Now