Search code examples
delphiwindows-serviceswindows-vistadelphi-2009ipc

Delphi 2009: How to communicate between Windows service & desktop application under Vista?


How can a desktop application communicate with a Windows service under Vista/Windows2008/Windows7? The application needs to send small strings to the service and receive string responses back. Both are written in Delphi 2009. (Please provide sample code also)


Solution

  • The way to go is named pipes, you'll probably have to take a look at the communication across different Integrity levels.

    This article explores how to do this in vista. Although it's written in c++ it's just basic Windows API calls, so it should translate fast enough to Delphi.

    If you want to search for more on this subject, this communication is called Inter Process Communication, but a better search term is IPC.