AddService Method
Collapse the table of content
Expand the table of content

IUpdateServiceManager::AddService method

Registers a service with Windows Update Agent (WUA).

Syntax


HRESULT AddService(
  [in]  BSTR           serviceID,
  [in]  BSTR           authorizationCabPath,
  [out] IUpdateService **retval
);

Parameters

serviceID [in]

An identifier for a service to be registered.

authorizationCabPath [in]

The path of the Microsoft signed local cabinet file that has the information that is required for a service registration.

retval [out]

An IUpdateService interface that represents an added service.

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 codeDescription
E_INVALIDARG

A parameter value is invalid.

E_ACCESSDENIED

This method cannot be called from a remote computer.

WU_E_DS_SERVICEEXPIRED

The Authorization Cab has expired.

WU_E_DS_INVALIDOPERATION

The state of Automatic Updates could not be changed.

 

Remarks

This method returns WU_E_DS_INVALIDOPERATION if the requested change in the state of Automatic Updates is contrary to the specifications in the Authorization Cab. An error is returned by WinVerifyTrust if the Authorization Cab has not been signed.

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

 

 

Show:
© 2016 Microsoft