共用方式為


IWMPStringCollection2::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 string corresponding to the specified string collection item index and name.

Syntax

public System.String getItemInfo(
  System.Int32 lCollectionIndex,
  System.String bstrItemName
);

Public Function getItemInfo( _
  ByVal lCollectionIndex As System.Int32, _
  ByVal bstrItemName As System.String _
) As System.String
Implements IWMPStringCollection2.getItemInfo

Parameters

lCollectionIndex [in]

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

bstrItemName [in]

The System.String that is the attribute name.

Return value

The System.String that is the name of the string collection item. For attributes whose underlying value is System.Boolean, it returns the string "true" or "false".

Remarks

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

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

See also

IWMPStringCollection2 Interface

IWMPStringCollection2.getItemInfoByType (VB and C#)