![]() I don't know how this is handled in Windwos Vista and later though. IIRC a service is only allowed to have a graphical user interface OR have network access, so this might be a problem if your service needs a GUI (which you should avoid anyway, see this question). Example: procedure M圜lass.HandleCommunication (AContext : TIdContext) It is called whenever the client decides to send something. Just implement the HandleCommunication method. ![]() COM Interfaces COM clients communicate with objects through COM interfaces. ![]() In addition, the Delphi interface to the COM API is in ActiveX.pas and ComSvcs.pas. These classes are found in the AxCtrls, OleCtrls, and OleServer units. Server.OnDisconnect := HandleDisconnection Delphi implements objects conforming to the COM spec using a set of classes called the Delphi ActiveX framework (DAX). Server.DefaultPort := SameFreePortNumberAsInClient For the client (in your case the desktop application) it's basically varįor the server (would be the service in your case) var Especially if you only need to send string messages. Using Indy you can relatively easy create a TCP connection between your apps.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |