public IList<int> GetItemIds(Session session, string itemId, int[] propertyIds, out string[] itemIds)
{
TraceState("GetItemId", itemId);
// no properties for the root.
if (String.IsNullOrEmpty(itemId))
{
throw ComUtils.CreateComException(ResultIds.E_INVALIDITEMID);
}
// select all available properties if none provided.
IList<DaProperty> properties = GetAvailableProperties(session, itemId);
if (propertyIds == null || propertyIds.Length == 0)
{
propertyIds = new int[properties.Count];
for (int ii = 0; ii < propertyIds.Length; ii++)
{
propertyIds[ii] = properties[ii].PropertyId;
}
}
itemIds = new string[propertyIds.Length];
int[] results = new int[propertyIds.Length];
for (int ii = 0; ii < propertyIds.Length; ii++)
{
results[ii] = ResultIds.E_INVALID_PID;
// must return E_INVALID_PID for standard properties.
if (propertyIds[ii] <= PropertyIds.EuInfo)
{
continue;
}
// supported properties must return E_FAIL.
for (int jj = 0; jj < properties.Count; jj++)
{
if (properties[jj].PropertyId == propertyIds[ii])
{
results[ii] = ResultIds.E_FAIL;
break;
}
}
}
return results;
}