Freigeben über


WindowsUpdateManager Class

Definition

Interface used for monitoring update activity via callbacks, and retrieving update history.

public ref class WindowsUpdateManager sealed
/// [Windows.Foundation.Metadata.Activatable(Windows.Management.Update.IWindowsUpdateManagerFactory, 65536, "Windows.Management.Update.WindowsUpdateContract")]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Management.Update.WindowsUpdateContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class WindowsUpdateManager final
/// [Windows.Foundation.Metadata.Activatable(Windows.Management.Update.IWindowsUpdateManagerFactory, 65536, "Windows.Management.Update.WindowsUpdateContract")]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Management.Update.WindowsUpdateContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.Foundation.Metadata.Activatable(Windows.Management.Update.IWindowsUpdateManagerFactory2, 131072, "Windows.Management.Update.WindowsUpdateContract")]
class WindowsUpdateManager final
[Windows.Foundation.Metadata.Activatable(typeof(Windows.Management.Update.IWindowsUpdateManagerFactory), 65536, "Windows.Management.Update.WindowsUpdateContract")]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Management.Update.WindowsUpdateContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class WindowsUpdateManager
[Windows.Foundation.Metadata.Activatable(typeof(Windows.Management.Update.IWindowsUpdateManagerFactory), 65536, "Windows.Management.Update.WindowsUpdateContract")]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Management.Update.WindowsUpdateContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.Foundation.Metadata.Activatable(typeof(Windows.Management.Update.IWindowsUpdateManagerFactory2), 131072, "Windows.Management.Update.WindowsUpdateContract")]
public sealed class WindowsUpdateManager
function WindowsUpdateManager(clientId)
function WindowsUpdateManager(clientId, providerIdFilter)
Public NotInheritable Class WindowsUpdateManager
Inheritance
Object Platform::Object IInspectable WindowsUpdateManager
Attributes

Windows requirements

Requirements Description
Device family
Windows Desktop Extension SDK (introduced in 10.0.23504.0)
API contract
Windows.Management.Update.WindowsUpdateContract (introduced in v1.0)

Constructors

Name Description
WindowsUpdateManager(String, String[])
WindowsUpdateManager(String)

Constructs a new WindowsUpdateManager object.

Properties

Name Description
IsScanning

Gets a value indicating whether the WindowsUpdateManager is actively scanning for updates.

IsWorking

Gets a value indicating whether the WindowsUpdateManager is actively working on updates.

LastSuccessfulScanTimestamp

Gets a value indicating the last successful scan timestamp from WindowsUpdateManager.

ProviderIds

Methods

Name Description
GetApplicableSoftwareUpdates()
GetApplicableUpdates()

Retrieves a list of all applicable updates currently known to the WindowsUpdateManager.

GetMostRecentCompletedUpdates(Int32)

Retrieves information about the most recently completed updates.

GetMostRecentCompletedUpdatesAsync(Int32)

Asynchronously retrieves information about the most recently completed updates.

GetProvider(String)
PerformScan(WindowsUpdateManagerScanOptions)
StartScan(Boolean)

Initiates a new scan for updates on the device.

Events

Name Description
ActionCompleted

Raised when an action has been completed for an update.

AttentionRequiredReasonChanged

Raised when the attention required reason changed for an update.

ProgressChanged

Raised when the progress changes for an update.

ScanCompleted

Raised when a scan for updates completes.

ScanningStateChanged

Raised when the scanning state changes.

WorkingStateChanged

Raised when the working state changes.

Applies to