IUpdateSearcher::QueryHistory method (wuapi.h)

Synchronously queries the computer for the history of the update events.

Syntax

HRESULT QueryHistory(
  [in]  LONG                          startIndex,
  [in]  LONG                          count,
  [out] IUpdateHistoryEntryCollection **retval
);

Parameters

[in] startIndex

The index of the first event to retrieve.

[in] count

The number of events to retrieve.

[out] retval

A pointer to an IUpdateHistoryEntryCollection interface that contains matching event records on the computer in descending chronological order.

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 code Description
E_POINTER
A parameter value is invalid or NULL.
WU_E_INVALIDINDEX
An index is invalid.

Remarks

This method returns WU_E_INVALIDINDEX if the startIndex parameter is less than 0 (zero) or if the Count parameter is less than or equal to 0 (zero).

Requirements

Requirement Value
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]
Target Platform Windows
Header wuapi.h
Library Wuguid.lib
DLL Wuapi.dll

See also

IUpdateSearcher