Share via


Windows Media Player 11 SDK IWMPMedia.getItemInfo (VB and C#) 

Windows Media Player SDK banner art

Previous Next

IWMPMedia.getItemInfo (VB and C#)

The getItemInfo method returns the value of the specified attribute for the media item.

[Visual Basic]
Function getItemInfo(
  bstrItemName As String
) As String

[C#]
string getItemInfo (
  string bstrItemName
);

Parameters

bstrItemName

A System.String that is the name of the attribute. For information about the attributes supported by Windows Media Player, see the Attribute Reference.

Return Value

A System.String that is the value of the specified attribute.

Remarks

This method returns the metadata for an individual media item or a media item that is part of a playlist.

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 getItemInfo.

To retrieve attributes with multiple values and attributes with complex values, use the getItemInfoByType method.

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 IWMPCore. 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

Previous Next