Solved

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

Posted on 2006-07-02
3
765 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
ID: 17028004
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

839 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