CFileItemList list; ... // some code to add items to the list int index = 0; // the index of the item we want to get the property of CString propName = "Size"; // the name of the property we want to retrieve CString propValue = list.GetProperty(index, propName); // retrieve the property value
CFileItemList list; ... // some code to add items to the list int index = 2; // the index of the item we want to get the property of CString propName = "DateModified"; // the name of the property we want to retrieve CTime propValue = list.GetProperty(index, propName); // retrieve the property valueThis example is similar to the first one, but instead of retrieving a string property, we are retrieving a date/time property. We set the index variable to 2, which represents the third item in the list, and the propName variable to "DateModified". We then call the GetProperty method on the list object, passing in the index and propName variables. This time, the method returns a CTime object that represents the date and time the file was last modified. The package library that implements CFileItemList is not specified in this request, so it is impossible to determine which one is being used.