3.16.6.2 IUpdateSession3::QueryHistory (Opnum 17)

The IUpdateSession3::QueryHistory (Opnum 17) method retrieves relevant update history entries.

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

criteria: A string specifying criteria that select history entries. The string MUST be one of the following:

  • NULL or empty, in which case all history entries are selected.

  • "UpdateID='<id>'", where <id> is an update identifier. In this case, only history entries pertaining to this update are selected.

startIndex: The zero-based index of the first history entry to retrieve.

count: The number of entries to retrieve.

retval: An IUpdateHistoryEntryCollection containing the history entries requested. If fewer entries are available than requested in the count parameter, only the entries available are retrieved.

Return Values: The method MUST return information in an HRESULT data structure. The severity bit in the structure identifies the following conditions:

  • If the severity bit is set to 0, the method completed successfully.

  • If the severity bit is set to 1, the method failed and encountered a fatal error.

This method MUST return an error if the startIndex value is less than 0x00000000 or greater than or equal to the number of items in the collection.

Exceptions Thrown: No exceptions are thrown beyond those thrown by the underlying RPC protocol [MS-RPCE].

This method MUST return an IUpdateHistoryEntryCollection containing the following history entries, sorted by date in descending order:

  • Only history entries pertaining to the update specified in criteria, if specified.

  • Only history entries starting from the given startIndex.

  • A maximum of count history entries, starting from startIndex.

The server SHOULD derive these history entries from the HistoryList ADM element.