Bearbeiten

Freigeben über


IUpdateDownloaderEx::Download2 method (wuapi.h)

Important

Some information relates to a prerelease product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Starts a synchronous download of the content files that are associated with the updates.

Syntax

HRESULT Download2(
  DownloadType    downloadType,
  IDownloadResult **retval
);

Parameters

downloadType

A value from the DownloadType specifying the type of download to perform, full download or downloading only the update bootstrapper.

Note

Attempting to download the update bootstrapper for an update that does not contain one will fail with the error code WU_E_NOT_SUPPORTED.

retval

An IDownloadResult interface that contains result codes for the download.

Return value

An HRESULT including one of the following values:

Value Description
S_OK Success.
WU_E_INVALID_OPERATION The computer cannot access the update site.
WU_E_NO_UPDATE The Windows Update Agent (WUA) does not have updates in the collection.
WU_E_NOT_INITIALIZED The Windows Update Agent (WUA) is not initialized.
WU_E_NOT_SUPPORTED The update bootstrapper download was attempted on an update that doesn't contain one.

Remarks

This method returns WU_E_INVALID_OPERATION if the object that is implementing the interface is locked down.

This method returns WU_E_NO_UPDATE if the Updates property of the IUpdateDownloader interface is not set. This method also returns WU_E_NO_UPDATE if the Updates property is set to an empty collection.

This method returns SUS_E_NOT_INITIALIZED if the download job does not contain updates.

Requirements

Requirement Value
Minimum supported client Windows 11 Build 26100
Header wuapi.h