4.3 EnumHistory Call Example

The client initiates a connection to the server through standard DCOM calls, as specified in [MS-DCOM].

The client sets an index value to zero, which will be used to move through the history entries starting at the first one.

The client calls the EnumHistory method and provides the following parameters:

  • An empty buffer with room for 100 WCHARs.

  • A pointer to a DWORD, which the server can fill in with the Major Version Number of the history file being enumerated.

  • A pointer to a DWORD, which the server can fill in with the Minor Version Number of the history file being enumerated.

  • A pointer to a FILETIME structure that the server can fill in with the file time of the current history file being enumerated.

  • An index value that represents which history file to enumerate.

If the call is successful, the client reads the default location of the history files from the buffer passed in and processes the rest of the information returned in the two DWORDs and the FILETIME parameters.

If the call was successful, the client then increments the Index value and makes another call to the EnumHistory function to get the next entry.

If the call returned the ERROR_NO_MORE_ITEMS error code, then the client concludes that it has processed all the history entries and has successfully finished.