GetNextChange method

Gets the next change record stored in the change log.

Syntax

HRESULT retVal = object.GetNextChange(pbBuffer, nBufferSize, pnRecordLength);

Parameters

  • pbBuffer [in]
    Type: BYTE

    A pointer to a variable of type BYTE that specifies the first byte of a caller-allocated buffer in which to store the record.

  • nBufferSize [in]
    Type: long

    A long integer that specifies the size of the caller-allocated buffer, in bytes.

  • pnRecordLength [out]
    Type: long

    A pointer to a variable of type long that receives the size of the record, in bytes.

Return value

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

This method has two uses.

  • Get a change record
  • Determine the size of the buffer to allocate for the next record.

Change records vary in length and have no maximum length. IHTMLChangeLog::GetNextChange always gets the value for pnRecordLength, even if the method fails. If your buffer is too small, and this method returns S_FALSE, use the value in pnRecordLength to reallocate your buffer so that it is large enough for the next record, and then call IHTMLChangeLog::GetNextChange again.

If no further changes are pending, this method sets pnRecordLength to zero.