title: A new Thread should be created on ServiceMain?
body: <p>The MSDN says that:</p>
  
  <p>"The ServiceMain function should create a global event, call the RegisterWaitForSingleObject    function on this event, and exit. This will terminate the thread that is running the ServiceMain function, but will not terminate the service..."</p>
  
  <p>So the question is: A new Thread should be created inside the ServiceMain function to execute the service code, or I can simple set the service to RUNNING state and uses the ServiceMain thread to run the service code? If the ServiceMain thread is used to run the service code the SCM will remain locked, even if the service state is set to RUNNING?</p>