IUpdateServer.GetUpdates(ApprovedStates, DateTime, DateTime, UpdateCategoryCollection, UpdateClassificationCollection)

Retrieves a collection of updates based on the specified criteria.

public UpdateCollection GetUpdates(ApprovedStatesapprovedStates,
DateTimefromSyncDate,
DateTimetoSyncDate,
UpdateCategoryCollectioncategories,
UpdateClassificationCollectionupdateClassifications);
Public Function GetUpdates( _
  ByVal approvedStates As ApprovedStates, _
  ByVal fromSyncDate As DateTime, _
  ByVal toSyncDate As DateTime, _
  ByVal categories As UpdateCategoryCollection, _
  ByVal updateClassifications As UpdateClassificationCollection _
) As UpdateCollection
Implements IUpdateServer.GetUpdates

Parameters

  • approvedStates
    Include updates that match the specified approved state. You can specify one or more states. For example, specify ApprovedStates.Approved to include only the updates that are approved.
  • fromSyncDate
    Start date and time that is used to search for updates. Updates that are synchronized on or after this date and time are included in the collection. To avoid filtering updates based on a start date, specify DateTime.MinValue. You must specify the date in Coordinated Universal Time.
  • toSyncDate
    End date and time that is used to search for updates. Updates synchronized on or before this date and time are included in the collection. To avoid filtering updates based on an end date, specify DateTime.MaxValue. You must specify the date in Coordinated Universal Time.
  • categories
    An UpdateCategoryCollection collection that contains the product categories for which you want to retrieve updates. For example, the Windows XP family. This parameter can be null.
  • updateClassifications
    An UpdateClassificationCollection collection that contains the classification of updates for which you want to retrieve updates. For example, Critical Updates. This parameter can be null.

Return Value

An UpdateCollection collection of the most recent revision of any update that matches the given criteria.

Exceptions

Exception type Condition
System.ArgumentOutOfRangeException fromSyncDate cannot be greater than toSyncDate.

Remarks

To retrieve all updates, call IUpdateServer.GetUpdates().

Requirements

Server Requires Windows Server 2003 or Windows 2000 Server SP4 and later.
Namespace

Defined in Microsoft.UpdateServices.Administration.

Assembly

Requires Microsoft.UpdateServices.Administration (in Microsoft.UpdateServices.Administration.dll).

.NET Framework

Requires .NET Framework 1.1.