Windows Media Player 11 SDK IWMPStringCollection2.getItemInfoByType (VB and C#) 

Windows Media Player SDK banner art

Previous Next

IWMPStringCollection2.getItemInfoByType (VB and C#)

The getItemInfoByType method returns the value corresponding to the specified string collection item index, name, language, and attribute index.

[Visual Basic]
Function getItemInfoByType(
  lCollectionIndex As Integer,
  bstrType As String,
  bstrLanguage As String,
  lAttributeIndex As Integer
) As Object

[C#]
object getItemInfoByType (
  int lCollectionIndex,
  string bstrType,
  string bstrLanguage,
  int lAttributeIndex
);

Parameters

lCollectionIndex

The System.Int32 that is the zero-based index of the string collection item from which to get the attribute.

bstrType

The System.String that is the attribute name.

bstrLanguage

The System.String that indicates the language. If the value is set to null or to 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".

lAttributeIndex

A System.Int32 that is the zero-based index of the attribute.

Return Value

A System.Object that is the string collection item.

Remarks

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

By passing the value "ChildList" in the bstrType parameter, you can retrieve a new string collection that contains the children of one of the items in the parent string collection. For instance, if the parent collection contains a list of AlbumIDs, you can use this method to obtain a child string collection that contains all the tracks for one of the albums. This approach is faster and more efficient than calling the IWMPMediaCollection2.getStringCollectionByQuery method twice; once to get a collection of AlbumIDs, and a second time to get a collection of tracks for a particular AlbumID. To use ChildList in the way just described, the parent string collection must be obtained from a media collection through IWMPLibraryServices, and not by using the AxWindowsMediaPlayer.mediaCollection property.

When using ChildList, pass the value "ChildList" in the bstrType parameter, and the value 0 in the lAttributeIndex parameter. You can then cast the object that is returned to an IWMPStringCollection2 interface to access the child list.

To use this method, you must have read access to the library. For more information, see Library Access.

Requirements

Version: Windows Media Player 11.

Namespace: WMPLib

Assembly: Interop.WMPLib.dll (automatically generated by Visual Studio)

See Also

Previous Next