IWMPStringCollection2::getItemInfo 方法

[与此页面关联的功能(Windows 媒体播放器 SDK)是旧版功能。 它已被 MediaPlayer 取代。 MediaPlayer 已针对Windows 10和Windows 11进行了优化。 如果可能,Microsoft 强烈建议新代码使用 MediaPlayer 而不是 Windows 媒体播放器 SDK。 如果可能,Microsoft 建议重写使用旧 API 的现有代码以使用新 API。]

getItemInfo 方法返回与指定的字符串集合项索引和名称对应的字符串。

语法

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

参数

lCollectionIndex [in]

System.Int32,指定要从中获取属性的字符串集合项的从零开始的索引。

bstrItemName [in]

作为属性名称的 System.String

返回值

作为字符串集合项的名称的 System.String 。 对于基础值为 System.Boolean 的属性,它将返回字符串“true”或“false”。

备注

若要检索具有多个值的属性和具有复杂值的属性,请使用 getItemInfoByType 方法。

若要使用此方法,需要对库的读取访问权限。 有关详细信息,请参阅 库访问

要求

要求
版本
Windows 媒体播放器 11.
命名空间
WMPLib
程序集
Interop.WMPLib.dll (Interop.WMPLib.dll.dll)

另请参阅

IWMPStringCollection2 接口

IWMPStringCollection2.getItemInfoByType (VB 和 C#)