I'm doing this in VB right now, but I won't mind a solution using other language, I could probably just port the code.
Though I'm able to retrieve their values, I'm having trouble updating the Custom Attributes.
my code is pretty much like this: (initialization codes omitted)
status = LL_ListObjects(session, parentVol, parentID, "DTree", vbNullString, LL_PERM_READ, files)
status = LL_GetNumberOfObjects(session, parentVol, parentID, fileCount)
For i = 0 To fileCount - 1
status = LL_TableGetInteger(files, i, "ID", fileID)
status = LL_TableGetInteger(files, i, "VolumeID", fileVol)
creationDate = GetMsoFileCreationDate(filePath)
lYear = year(creationDate)
lMonth = month(creationDate)
lDay = day(creationDate)
lHour = hour(creationDate)
lMinute = minute(creationDate)
lSecond = second(creationDate)
'ContributedDate is a custom attribute
status = LL_TableSetDateEx(files, i, "ContributedDate", lYear, lMonth, lDay, lHour, lMinute, lSecond)
Next i
i also tried something like:
status = LL_GetObjectInfo(session, fileVol, fileID, objInfo)
status = LL_ValueSetFieldDateEx(objInfo, "ContributedDate", lYear, lMonth, lDay, lHour, lMinute, lSecond)
status = LL_UpdateObjectInfo(session, fileVol, fileID, objInfo)
also didn't reflected the update.
I have no clue.
Though I'm able to retrieve their values, I'm having trouble updating the Custom Attributes.
my code is pretty much like this: (initialization codes omitted)
status = LL_ListObjects(session, parentVol, parentID, "DTree", vbNullString, LL_PERM_READ, files)
status = LL_GetNumberOfObjects(session, parentVol, parentID, fileCount)
For i = 0 To fileCount - 1
status = LL_TableGetInteger(files, i, "ID", fileID)
status = LL_TableGetInteger(files, i, "VolumeID", fileVol)
creationDate = GetMsoFileCreationDate(filePath)
lYear = year(creationDate)
lMonth = month(creationDate)
lDay = day(creationDate)
lHour = hour(creationDate)
lMinute = minute(creationDate)
lSecond = second(creationDate)
'ContributedDate is a custom attribute
status = LL_TableSetDateEx(files, i, "ContributedDate", lYear, lMonth, lDay, lHour, lMinute, lSecond)
Next i
i also tried something like:
status = LL_GetObjectInfo(session, fileVol, fileID, objInfo)
status = LL_ValueSetFieldDateEx(objInfo, "ContributedDate", lYear, lMonth, lDay, lHour, lMinute, lSecond)
status = LL_UpdateObjectInfo(session, fileVol, fileID, objInfo)
also didn't reflected the update.
I have no clue.