title: Windows Service Status C++?
body: <p>How I can get the status of an windows service in C++?</p>
  
  <p>This is a C# example:</p>
  
  <pre><code>ServiceController sc = new ServiceController("Spooler", "Server1");
  if (sc.Status == ServiceControllerStatus.Running)
  {
      MessageBox.Show("The service is running.");
  }
  </code></pre>
  
  <p>But how do I do the equivalent in C++?</p>