IUpdateServiceManager::AddScanPackageService method (wuapi.h)
Registers a scan package as a service with Windows Update Agent (WUA) and then returns an IUpdateService interface.
HRESULT AddScanPackageService( [in] BSTR serviceName, [in] BSTR scanFileLocation, [in] LONG flags, [out] IUpdateService **ppService );
A descriptive name for the scan package service.
The path of the Microsoft signed scan file that has to be registered as a service.
Determines how to remove the service registration of the scan package.
For possible values, see UpdateServiceOption.
A pointer to an IUpdateService interface that contains service registration information.
Returns S_OK if successful. Otherwise, returns a COM or Windows error code. This method can also return the following error codes.
||A parameter value is invalid.|
||This method cannot be called from a remote computer.|
||The computer could not access the update site.|
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.
|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]|