Hi,
I am trying to add new identification into header metadata and update the LastModifiedDate. But it doesn't work, please help me. Thanks!
Code:
int main(int argc, char *argv[])
{
...
MasterPartition->ReadMetadata();
MetadataPtr HMeta = MasterPartition->ParseMetadata();
MDObjectPtr Idens=HMeta[Identifications_UL];
if(Idens) cout<<"Idens size: "<< Idens->size()<<endl;
MDObjectPtr LMD=HMeta[LastModifiedDate_UL];
printf("%s = %s\n", LMD->Name().c_str(), LMD->GetString().c_str());
HMeta->SetTime();
//Not changed!!??Why?
LMD=HMeta[LastModifiedDate_UL];
printf("%s = %s\n", LMD->Name().c_str(), LMD->GetString().c_str());
UInt8 ProductGUID_Data[16] = { 0x84, 0x55, 0x23, 0xe2, 0x16, 0x8c, 0xc2, 0x30, 0x85, 0xcb, 0xef, 0x78, 0x9c, 0xde, 0xef, 0x42 };
...
MDObjectPtr Ident = new MDObject(Identification_UL);
Ident->SetString(CompanyName_UL, CompanyName);
...
Ident->SetValue(ProductUID_UL, DataChunk(16,ProductUID->GetValue()));
HMeta->UpdateGenerations(Ident);
Idens=HMeta[Identifications_UL];
//Not changed!!??Why?
if(Idens) cout<<"Idens size: "<< Idens->size()<<endl;
...
}