StringCollection.getItemInfoByType 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 getItemInfoByType method retrieves the value corresponding to the specified StringCollection index, name, language, and attribute index.

Syntax

retVal = StringCollection.getItemInfoByType(
  index,
  name,
  language,
  attributeIndex
)

Parameters

index [in]

Number (long) specifying the zero-based index of the StringCollection item from which to get the attribute.

name [in]

String containing the attribute name.

language [in]

String containing the language. If the value is set to null or the empty string ("") the current locale string is used. Otherwise, the value must be a valid RFC 1766 language string such as "en-us".

attributeIndex [in]

Number (long) containing the zero-based index of the value to retrieve from the attribute.

Return value

This method returns a Number, String, MetadataPicture object, or MetadataText object as indicated in the following table.

Attribute Return value
SyncState Number (unsigned long)
WM/Lyrics_Synchronised MetadataText object
WM/Picture MetadataPicture object
WM/UserWebURL MetadataText object
All other attributes String

For attributes whose underlying value is Boolean, this method returns the string "true" or "false".

Remarks

This method supports attributes with multiple values, and attributes with complex values. The getItemInfo method does not support attributes with multiple or complex values.

To use this method, read access to the library is required. For more information, see Library Access.

Requirements

Requirement Value
Version
Windows Media Player 11.
DLL
Wmp.dll

See also

MetadataPicture Object

MetadataText Object

StringCollection.getItemInfo

StringCollection Object