Microsoft DirectX 8.1 (C++) |
This topic applies to Windows XP Home Edition and Windows XP Professional only.
The Item property retrieves an object from the collection.
Syntax
objMetaProperties.Item(index As Long) As MetaProperty
Parameters
index
[in] Specifies the object to retrieve. This parameter must be a numerical index in the range from 0 to MetaProperties.Count minus 1, or a String specifying the MetaPropertySet and MetaPropertyType objects. See Remarks.
Error Codes
If the property fails, an error is raised and Err.Number is set to a value other than zero.
Return Values
This property returns a MetaProperty object.
Remarks
This property is the default member of the object, and you do not need to specify the property name when you retrieve it.
If the index parameter contains a string, it is interpreted in the same way as the bstr parameter of MetaPropertySets.Lookup; that is, it must contain the name of a MetaPropertySet object and the name of a MetaPropertyType object, separated by a period. The MetaProperties.Item property then retrieves the MetaProperty that matches the MetaPropertyType. This is equivalent to retrieving the MetaPropertyType object by using MetaPropertySets.Lookup, retrieving a GuideDataProvider object from the GuideStore.ActiveGuideDataProvider property, and passing those objects to MetaProperties.ItemWithTypeProviderLang.
Example Code
' Retrieve the 25th item in the collection.
Dim objMetaProperty As MetaProperty
objMetaProperty = objMetaProperties.Item(24)
' The following is equivalent, because this is the default property.
objMetaProperty = objMetaProperties(24)
See Also