Delen via


ISyncChangeBatchBase::Serialize

Serializes the change batch to an array of bytes.

HRESULT Serialize(
  BYTE * pbChangeBatch,
  DWORD * pcbChangeBatch);

Parameters

  • pbChangeBatch
    [in, out, unique, size_is(*pcbChangeBatch)] The byte array that receives the change batch data.
  • pcbChangeBatch
    [in, out] Specifies the number of bytes in pbChangeBatch. Returns the number of bytes required for pbChangeBatch when pbChangeBatch is too small, or the number of bytes written to pbChangeBatch when data is written.

Return Value

  • S_OK.

  • E_POINTER.

  • E_OUTOFMEMORY.

  • HRESULT_FROM_WIN32(ERROR_MORE_DATA) when pbChangeBatch is too small. In this case, the required number of bytes is stored in pcbChangeBatch.

  • SYNC_E_INVALID_OPERATION when the last group added to the batch was not ended.

Serialization Format

The serialized change batch data returned in pbChangeBatch is the same as that returned by ISyncChangeBatchBase2::SerializeWithOptions when targetFormatVersion is SYNC_SERIALIZATION_VERSION_V1.

See Also

Reference

ISyncChangeBatchBase Interface