title: Using Named Pipes to communicate from Windows Service to GUI Frontend in Delphi
body: <p>I'm using Russell Libby's Pipes.PAS unit to facilitate communicating between two programs using named pipes. I have made a working example using one server (VCL program with GUI) and one client (also VCL) that can be started multiple times, and I can communicate back and forth between these.</p>
  
  <p>However, when I run the same server code in a Windows service, I can see the client connecting in the service (I log to a text file), but when the service broadcasts a message to be read by the client(s), nothing happens on the client side.</p>
  
  <p>Are there any special things that need to be done in order for the Named Pipe to work from a Windows Service to a Frontend GUI program?</p>
  
  <p>I construct the Server Pipe as follows:</p>
  
  <pre><code>  Pipe:=TPipeServer.Create(Self);
    Pipe.Name:='Pipe';
    Pipe.OnPipeMessage:=PipePipeMessage;
    Pipe.OnPipeConnect:=PipePipeConnect;
    Pipe.OnPipeDisconnect:=PipePipeDisconnect;
    Pipe.PipeName := 'Service';
    Pipe.Active:=TRUE;
  </code></pre>
  
  <p>and the client side:</p>
  
  <pre><code>  Pipe:=TPipeClient.Create(NIL);
    Pipe.Name:='Pipe';
    Pipe.MemoryThrottle:=10240000;
    Pipe.PipeName := 'Service';
    Pipe.OnPipeMessage:=PipePipeMessage;
  </code></pre>
  
  <p>but I never get the code at PipePipeMessage executed.</p>
  
  <p>Am I missing something? Like I said, the server side code in Connected gets executed, so there is a connection set up...</p>