At first you have to install the service. To start a service programmatically use the
OpenService function (Windows)[
^] and the
StartService function (Windows)[
^]. Note that this requires that the program is executed with sufficient priviliges.
Alternatively use the Windows PowerShell (execute shell commands from your program). See
Start-Service[
^].
The general term for data interchange between processes is IPC (
Interprocess Communications (Windows)[
^]). You should read about the available methods and choose one that matches your requirements. The CodeProject article
Windows IPC[
^] explains some methods in detail with their advantages and disadvantages and provides example code.