IWMPMedia::getItemInfo method
[The feature associated with this page, Windows Media Player SDK, is a legacy feature. It has been superseded by MediaPlayer. MediaPlayer has been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use MediaPlayer instead of Windows Media Player SDK, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]
The getItemInfo method returns the value of the specified attribute for the media item.
Syntax
public System.String getItemInfo(
System.String bstrItemName
);
Public Function getItemInfo( _
ByVal bstrItemName As System.String _
) As System.String
Implements IWMPMedia.getItemInfo
Parameters
-
bstrItemName [in]
-
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
Requirement | Value |
---|---|
Version |
Windows Media Player 9 Series or later |
Namespace |
WMPLib |
Assembly |
|