Windows Media Player 11 SDK IWMPMedia3.getItemInfoByType (VB and C#)
Previous | Next |
IWMPMedia3.getItemInfoByType (VB and C#)
The getItemInfoByType method returns the value of the attribute corresponding to the specified attribute type and index.
[Visual Basic] Function getItemInfoByType( bstrType As String, bstrLanguage As String, lIndex As Integer ) As Object [C#] object getItemInfoByType ( string bstrType, string bstrLanguage, int lIndex );
Parameters
bstrType
A System.String that is the attribute type.
bstrLanguage
A System.String that is the language. If the value is set to null or a zero-length string (""), the current locale string is used. Otherwise, the value must be a valid RFC 1766 language string such as "en-us".
lIndex
A System.Int32 that is the attribute index.
Return Value
A System.Object that is the value of the attribute. The type to cast this object to depends on the type of the attribute.
Remarks
This method returns the metadata for an individual digital media item or a media item that is part of a playlist.
This method supports attributes with multiple values and attributes with complex values. The getItemInfo method does not support attributes with multiple values and attributes with complex values.
The attributeCount property gets the number of attribute names available for a given media item. Index numbers can then be used with the getAttributeName method to determine the name of each available attribute. Individual attribute names can be passed to the name parameter of getItemInfoByType.
The getAttributeCountByType method returns the number of attributes that correspond to a particular attribute name for a given media item. Index numbers can then be passed to the index parameter of getItemInfoByType. This is useful when a media item has been categorized under multiple genres, for example.
If the media item came from a library that was retrieved by calling IWMPLibrary.mediaCollection, the set of available attributes will differ from those which can be queried from the local library retrieved by calling AxWindowsMediaPlayer.mediaCollection. For example, the attributes available from the local library retrieved by using IWMPLibrary will be a subset of the attributes available from the local library retrieved by using AxWindowsMediaPlayer. The set of attributes available from other sources (remote libraries, portable devices, or CDs is defined by the other sources.
Before calling this method, you must have read access to the library. For more information, see Library Access.
Requirements
Version: Windows Media Player 9 Series or later
Namespace: WMPLib
Assembly: Interop.WMPLib.dll (automatically generated by Visual Studio)
See Also
- IWMPMedia3 Interface (VB and C#)
- IWMPMedia.attributeCount (VB and C#)
- IWMPMedia.getAttributeName (VB and C#)
- IWMPMedia.getItemInfo (VB and C#)
- IWMPMedia3.getAttributeCountByType (VB and C#)
Previous | Next |