I am not entirely sure that I understand what you are asking, but hopefully the following will help:
MDObject::PutData() will build a DataChunk containing the value of the object formatted for the V part of the KLV.
MDObject::ReadValue() will set the value of an MDObject from a DataChunk of the format written by PutData().
So:
Code:
// Build an MDObject suitable for LastModifiedDate property of the Preface (of data type TimeStamp)
MDObjectPtr First = new MDObjectPtr(LastModifiedDate_UL);
// Set a value of noon on November the first 2010
First->SetString("2010-11-01T12:00:00.00");
// Write this into a buffer
DataChunkPtr Val = First->PutData();
// Val now contains the following bytes: 0x07, 0xda, 0x0b, 0x01, 0x0c, 0x00, 0x00, 0x00
// This is the year (0x07da == 2010), month (0x0b = 11), day (0x01 = 1), hour (0x0c = 12) etc.
// Make another object of the same type
MDObjectPtr Second = new MDObjectPtr(LastModifiedDate_UL);
// Set the second object from the data chunk
Second->ReadValue(Val);
// Print "2010-11-01T12:00:00.00"
cout << Second->GetString();