Share via


IUpdateServiceManager::RemoveService method

Removes a service registration from Windows Update Agent (WUA).

Syntax

HRESULT RemoveService(
  [in] BSTR serviceID
);

Parameters

  • serviceID [in]
    An identifier for the service to be unregistered.

Return value

Returns S_OK if successful. Otherwise, returns a COM or Windows error code. This method can also return the following error codes.

Return code Description
E_INVALIDARG

A parameter value was invalid.

E_ACCESSDENIED

This method cannot be called from a remote computer.

WU_E_DS_NEEDWINDOWSSERVICE

The Windows Update service could not be removed.

WU_E_DS_INVALIDOPERATION

The state of Automatic Updates could not be changed. This error is returned if you try to delete the service.

WU_E_DS_UNKNOWNSERVICE

Attempt to register or remove an unknown service.

 

Requirements

Minimum supported client

Windows XP, Windows 2000 Professional with SP3 [desktop apps only]

Minimum supported server

Windows Server 2003, Windows 2000 Server with SP3 [desktop apps only]

Header

Wuapi.h

IDL

Wuapi.idl

Library

Wuguid.lib

DLL

Wuapi.dll

See also

IUpdateServiceManager