3.38.4.10 IUpdateSearcher::QueryHistory (Opnum 19)

The IUpdateSearcher::QueryHistory (opnum 19) method retrieves a collection of history events.

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

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.

If the startIndex value is less than 0x00000000 or greater than or equal to the number of items in the collection, the server MUST return an error.

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

The server MUST return an IUpdateHistoryEntryCollection instance containing the following history entries, sorted by date in descending order:

  • Only history entries starting from the given startIndex.

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

This method SHOULD derive these history entries from the HistoryList ADM element.