IWMPMediaCollection::getMediaAtom 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 getMediaAtom method returns the index of a specified attribute within the set of available attributes.

Syntax

public System.Int32 getMediaAtom(
  System.String bstrItemName
);

Public Function getMediaAtom( _
  ByVal bstrItemName As System.String _
) As System.Int32
Implements IWMPMediaCollection.getMediaAtom

Parameters

bstrItemName [in]

The System.String that is the name of the item for which the index should be retrieved.

Return value

The System.Int32 that is the index.

Remarks

The index number retrieved with this method can be passed to the IWMPMedia.getItemInfoByAtom to access attribute values. This technique is generally more efficient when working with large playlists than accessing an attribute value by name through IWMPMedia.getItemInfo.

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
Interop.WMPLib.dll (Interop.WMPLib.dll.dll)

See also

IWMPMedia.getItemInfo (VB and C#)

IWMPMedia.getItemInfoByAtom (VB and C#)

IWMPMediaCollection Interface (VB and C#)