IProviderSyncServices::DeserializeSyncKnowledge
Creates an ISyncKnowledge object and initializes it by using serialized data.
HRESULT DeserializeSyncKnowledge(
const BYTE *pbKnowledge,
DWORD cbKnowledge,
IReplicaKeyMap *pReplicaKeyMap,
ISyncKnowledge **ppKnowledge);
Parameters
- pbKnowledge
[in, size_is(cbKnowledge)] The serialized knowledge data.
- cbKnowledge
[in] The number of bytes in pbKnowledge.
- pReplicaKeyMap
[in, unique] A replica key map that is used to initialize the newly created knowledge object. If this value is NULL, pbKnowledge must contain a serialized replica key map. If this value is not NULL, pbKnowledge must not contain a serialized replica key map.
- ppKnowledge
[out] Returns the newly created knowledge object.
Return Value
S_OK
E_OUTOFMEMORY
E_POINTER
SYNC_E_INVALID_OPERATION when this object is not initialized.
SYNC_E_DESERIALIZATION when the serialized data is not valid.
SYNC_E_ID_FORMAT_MISMATCH when the ID format schema that is contained in pbKnowledge differs from the ID format schema that is used to initialize this object.
Remarks
The proper IReplicaKeyMap Interface object is required to deserialize a knowledge object. When the IReplicaKeyMap object was serialized along with the knowledge data, it is deserialized along with the knowledge data and NULL must be specified for pReplicaKeyMap. When the IReplicaKeyMap object is not serialized along with the knowledge data, it must be created in some other way and specified for pReplicaKeyMap.
See Also
Reference
IProviderSyncServices Interface
ISyncKnowledge::Serialize
ISyncKnowledge2::SerializeWithOptions