ISyncFilter::Serialize
When overridden by a derived class, serializes the filter to an array of bytes.
HRESULT Serialize(
BYTE * pbSyncFilter,
DWORD * pcbSyncFilter);
Parameters
- pbSyncFilter
[in, out, unique, size_is(*pcbSyncFilter)] The byte array that receives the filter data.
- pcbSyncFilter
[in, out] Specifies the number of bytes in pbSyncFilter. Returns the number of bytes required for pbSyncFilter when pbSyncFilter is too small, or the number of bytes written to pbSyncFilter when data is written.
Return Value
S_OK.
HRESULT_FROM_WIN32(ERROR_MORE_DATA) when pbChangeBatch is too small. In this case, the required number of bytes is stored in pcbChangeBatch.
Provider-determined error codes.
Remarks
The first time Sync Framework calls this method, it specifies NULL for pbSyncFilter and 0 for pcbSyncFilter. In this situation, the implementation must return the correct size for the item ID in pcbSyncFilter, and an error code of HRESULT_FROM_WIN32(ERROR_MORE_DATA).
When this method is implemented, the developer must also implement ISyncFilterDeserializer::DeserializeSyncFilter to deserialize the serialized data.
If it is not necessary to serialize the filter, this method can return E_NOTIMPL.