The ResUtilStopService utility function stops a service.
DWORD WINAPI ResUtilStopService(
  HANDLE ServiceHandle  
);
 If the operation was unsuccessful, ResUtilStopService can also return a Win32® error value.
ResUtilStopService closes the handle specified in ServiceHandle when it stops the service.
  Version: Use Windows NT Server Enterprise Edition 4.0.
  Windows CE: Unsupported.
  Header: Declared in clusapi.h.