IWMPMediaCollection2::getStringCollectionByQuery 方法
[与此页面关联的功能(Windows 媒体播放器 SDK)是旧版功能。 它已被 MediaPlayer 取代。 MediaPlayer 已针对Windows 10和Windows 11进行了优化。 如果可能,Microsoft 强烈建议新代码使用 MediaPlayer 而不是 Windows 媒体播放器 SDK。 如果可能,Microsoft 建议重写使用旧 API 的现有代码以使用新 API。]
方法 getStringCollectionByQuery
返回 IWMPStringCollection 接口,该接口提供对与查询条件匹配的指定属性的所有字符串值集的访问权限。
语法
public IWMPStringCollection getStringCollectionByQuery(
System.String bstrAttribute,
IWMPQuery pQuery,
System.String bstrMediaType,
System.String bstrSortAttribute,
System.Boolean fSortAscending
);
Public Function getStringCollectionByQuery( _
ByVal bstrAttribute As System.String, _
ByVal pQuery As IWMPQuery, _
ByVal bstrMediaType As System.String, _
ByVal bstrSortAttribute As System.String, _
ByVal fSortAscending As System.Boolean _
) As IWMPStringCollection
Implements IWMPMediaCollection2.getStringCollectionByQuery
parameters
-
bstrAttribute [in]
-
作为属性名称的 System.String 。
-
pQuery [in]
-
WMPLib.IWMPQuery 接口,该接口是定义用于检索字符串集合的条件的查询。
-
bstrMediaType [in]
-
作为媒体类型的 System.String 。 必须包含以下值之一:“audio”、“video”、“photo”、“playlist”或“other”。
-
bstrSortAttribute [in]
-
System.String,它是用于排序的属性名称。 零长度字符串 (“”) 表示不应用排序。
-
fSortAscending [in]
-
System.Boolean 值,指示字符串值集是否必须按升序排序。
返回值
检索到的字符串值集的 WMPLib.IWMPStringCollection 接口。
备注
使用 IWMPQuery 的 复合查询不区分大小写。
当 pQuery 参数指定的复合查询包含基于 MediaType 属性生成的条件时,将忽略该条件。 始终使用 bstrMediaType 参数的值。 例如,如果复合查询包含条件“MediaType 等于音频”,而 bstrMediaType 参数的值为“video”,则生成的播放列表将仅包含视频项。
要求
要求 | 值 |
---|---|
版本 |
Windows 媒体播放器 11. |
命名空间 |
WMPLib |
程序集 |
|
另请参阅
反馈
提交和查看相关反馈