Export (0) Print
Expand All

IUpdateServiceManager::AddScanPackageService method

Registers a scan package as a service with Windows Update Agent (WUA) and then returns an IUpdateService interface.

Syntax


HRESULT AddScanPackageService(
  [in]   BSTR bstrServiceName,
  [in]   BSTR bstrScanFileLocation,
  [in]   LONG flags,
  [out]  IUpdateService **ppService
);

Parameters

bstrServiceName [in]

A descriptive name for the scan package service.

bstrScanFileLocation [in]

The path of the Microsoft signed scan file that has to be registered as a service.

flags [in]

Determines how to remove the service registration of the scan package.

For possible values, see UpdateServiceOption.

ppService [out]

A pointer to an IUpdateService interface that contains service registration information.

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_INVALID_OPERATION

The computer could not access the update site.

 

Remarks

You can use the ID of the service in searches by passing the ID as the ServiceID property of the IUpdateSearcher interface.

To free resources, remove the service after it is no longer needed. Use the RemoveService method to remove the service.

Do not call the RegisterServiceWithAU method for the service that the AddScanPackageService method registers.

The service that is returned by AddScanPackageService is in the collection of services that the Services property of the IUpdateServiceManager interface returns. This service has the special IsScanPackageService property.

An error is returned by WinVerifyTrust if the Authorization Cab is not signed.

This method returns WU_E_INVALID_OPERATION if the object that implements the interface has been locked down.

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]

Product

Use Windows Update or a Windows Update Services Server to retrieve the update on Windows XP.

Header

Wuapi.h

IDL

Wuapi.idl

Library

Wuguid.lib

DLL

Wuapi.dll

See also

IUpdateServiceManager

 

 

Community Additions

ADD
Show:
© 2014 Microsoft