8

I need IPC between a windows service and a GUI application both written in Delphi 2010. I decided to use named pipe for this. I built and installed successfully Russell Libby's TPipeServer and TPipeClient components (link). I followed other answers like this. But my service received only empty messages from the client. After many test I concluded that I was using those components erroneously, so i don't want to post any code here. So I'm looking for a valid example about how these components work in order to write/read strings in a named pipe (from client to server and viceversa). Any help is really appreciated, even using other free named pipes components or source codes. Thank you.

Edit: I need a valid way to pass security check in windows server 2008 / windows vista / windows 7

Community
  • 1
  • 1
  • 2
    The [Cromis-IPC](http://www.cromis.net/blog/downloads/cromis-ipc/) component has an example for doing some basic IPC communication between a client and a server. – LU RD Feb 21 '12 at 07:06
  • 1
    Communication using named pipes on the same computer should be easy with respect to security checks. Between different computers though, permissions will have to be implemented. – LU RD Feb 21 '12 at 14:25
  • i need example code for these components. if server and client are on a server and i RDP connected to it, need i to implement permissions on named pipe? I think not but it's better to ask. – Francesco Palladino Feb 22 '12 at 01:04
  • 1
    There is a demo in the component zip download, and also an example on the download site. I don't think you will have any problems with permissions, you might also want to read MS doc about [Named Pipe Security and Access Rights](http://msdn.microsoft.com/en-us/library/windows/desktop/aa365600(v=vs.85).aspx). – LU RD Feb 22 '12 at 09:07
  • You did't help me with Russell Libby's components but your components do their job. Answer my question to get it accepted. – Francesco Palladino Feb 23 '12 at 23:29

1 Answers1

6

The Cromis-IPC component by Iztok Kacin is a versatile IPC communication Delphi component utilizing windows named pipes. On the given link is a client/server example, and in the source code of the component is a full example.

The Cromis IPC can be used for process communication within the same computer as well as communication between computers on a network. Permissions are easy to handle when doing communication within the same computer. For a detailed description how to handle permissions, see windows doc Named Pipe Security and Access Rights.

LU RD
  • 34,438
  • 5
  • 88
  • 296