?
Solved

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

Posted on 2006-07-02
3
Medium Priority
?
771 Views
Last Modified: 2012-06-21
Hi,
How can i send message to service application?
0
Comment
Question by:MohammadrezaH
[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
3 Comments
 
LVL 17

Accepted Solution

by:
TheRealLoki earned 500 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

Enroll in August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
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…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

777 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