ResUtilStopService function

Stops a service identified by a handle. The PRESUTIL_STOP_SERVICE type defines a pointer to this function.

Syntax


DWORD WINAPI ResUtilStopService(
  _In_ SC_HANDLE hServiceHandle
);

typedef DWORD (WINAPI *PRESUTIL_STOP_SERVICE)(
    _In_ SC_HANDLE hServiceHandle
);

Parameters

hServiceHandle [in]

Handle of the service to stop.

Return value

If the operation succeeds, the function returns ERROR_SUCCESS.

If the operation fails, the function returns a system error code. The following is a possible error code.

ERROR_TIMEOUT

Service did not stop after a reasonable number of retries.

Remarks

The ResUtilStopService utility function closes the handle specified in hServiceHandle when it stops the service.

Requirements

Minimum supported client

None supported

Minimum supported server

Windows Server 2008 Enterprise, Windows Server 2008 Datacenter

Header

ResApi.h

Library

ResUtils.lib

DLL

ResUtils.dll

 

 

Show: