title: How should a Windows Service return information from a custom command
body: <p>I have a windows service running as part of my application.</p>
  
  <p>If I wish to communicate with it via the service handle I can issue custom commands (eg, 'start worker'). Ultimately, this will be a call to the Win32 <a href="http://msdn.microsoft.com/en-us/library/ms682108.aspx" rel="nofollow noreferrer">ControlService()</a> function. What is the best way to return a block of data from such a command?</p>
  
  <p>Specifically, I want to return a 'default URL' (ie a string) my service will respond on via other protocols like http.</p>
  
  <p>A solution that is straightforward to implement in a C# (.net 2.0) service would be preferred.</p>