IWMPStringCollection2::getAttributeCountByType 方法
[与此页面关联的功能(Windows 媒体播放器 SDK)是旧版功能。 它已被 MediaPlayer 取代。 MediaPlayer 已针对Windows 10和Windows 11进行了优化。 如果可能,Microsoft 强烈建议新代码使用 MediaPlayer 而不是 Windows 媒体播放器 SDK。 如果可能,Microsoft 建议重写使用旧 API 的现有代码以使用新 API。]
getAttributeCountByType 方法返回与指定的字符串集合索引、属性名称和语言关联的属性数。
语法
public System.Int32 getAttributeCountByType(
System.Int32 lCollectionIndex,
System.String bstrType,
System.String bstrLanguage
);
Public Function getAttributeCountByType( _
ByVal lCollectionIndex As System.Int32, _
ByVal bstrType As System.String, _
ByVal bstrLanguage As System.String _
) As System.Int32
Implements IWMPStringCollection2.getAttributeCountByType
参数
-
lCollectionIndex [in]
-
System.Int32,指定要从中获取属性的字符串集合项的从零开始的索引。
-
bstrType [in]
-
作为属性名称的 System.String 。
-
bstrLanguage [in]
-
作为语言名称的 System.String 。 如果值设置为 null 或零长度字符串 (“”) ,则使用当前区域设置字符串。 否则,该值必须是有效的 RFC 1766 语言字符串,例如“en-us”。
返回值
计数为 System.Int32 。
备注
此方法用于发现与给定 StringCollection 项的特定属性名称对应的属性数。 然后,可以将索引号传递给 getItemInfoByType 方法的第四个参数。
若要使用此方法,需要对库的读取访问权限。 有关详细信息,请参阅 库访问。
要求
要求 | 值 |
---|---|
版本 |
Windows 媒体播放器 11. |
命名空间 |
WMPLib |
程序集 |
|
另请参阅
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈