获取指定属性名称的属性说明接口的实例。
语法
PSSTDAPI PSGetPropertyDescriptionByName(
[in] LPCWSTR pszCanonicalName,
[in] REFIID riid,
[out] void **ppv
);
parameters
[in] pszCanonicalName
类型: LPCWSTR
指向以 null 结尾的 Unicode 字符串的指针,该字符串标识属性。
[in] riid
类型: REFIID
对所请求属性的接口 ID 的引用。
[out] ppv
类型: void**
当此函数返回时,包含 riid 中请求的接口指针。 这通常是 IPropertyDescription、 IPropertyDescriptionAliasInfo 或 IPropertyDescriptionSearchInfo。
返回值
类型: PSSTDAPI
返回以下值之一。
| 返回代码 | 说明 |
|---|---|
|
已获取接口。 |
|
pszCanonicalName 参数为 NULL。 |
|
架构子系统缓存中不存在规范名称。 |
注解
建议使用 objbase.h 中定义的 IID_PPV_ARGS 宏打包 riid 和 ppv 参数。 此宏基于 ppv 中的 值指向的接口提供正确的 IID,消除了编码错误的可能性。
建议 pszCanonicalName 指向属性的规范名称,例如 L"System.Keywords"。 规范名称区分大小写。
除了新的规范名称,调用方还可以传递属性的旧名称。 下表包含受支持的旧名称及其对应的规范名称的完整列表。
| 属性名称 | 映射到属性 |
|---|---|
| Access | System.DateAccessed |
| 相册: | System.Music.AlbumTitle |
| AllocSize | System.FileAllocationSize |
| 孔径 | System.Photo.Aperture |
| 艺术家 | System.Music.Artist |
| Attrib | System.FileAttributes |
| 属性 | System.FileAttributes |
| AttributesDescription | System.FileAttributesDisplay |
| 音频格式 | System.Audio.Format |
| 音频样本大小 | System.Audio.SampleSize |
| BitDepth | System.Image.BitDepth |
| Bitrate | System.Audio.EncodingBitrate |
| CameraModel | System.Photo.CameraModel |
| 容量 | System.Capacity |
| 声道 | System.Audio.ChannelCount |
| ColorSpace | System.Image.ColorSpace |
| Company | System.Company |
| 压缩 | System.Video.Compression |
| 压缩 | System.Video.Compression |
| 版权信息 | System.Copyright |
| 版权信息 | System.Copyright |
| 版权信息 | System.Image.Copyright |
| 创建 | System.DateCreated |
| CSCStatus | System.OfflineStatus |
| 数据速率 | System.Video.EncodingBitrate |
| DateDeleted | System.Recycle.DateDeleted |
| DeletedFrom | System.Recycle.DeletedFrom |
| 维度 | System.Image.Dimensions |
| Directory | System.ItemFolderNameDisplay |
| 距离 | System.Photo.SubjectDistance |
| DocAppName | System.ApplicationName |
| DocAuthor | System.Author |
| DocByteCount | System.Document.ByteCount |
| DocCategory | System.Category |
| DocCharCount | System.Document.CharacterCount |
| DocComments | System.Comment |
| DocCompany | System.Company |
| DocCreatedTm | System.Document.DateCreated |
| DocEditTime | System.Document.TotalEditingTime |
| DocHiddenCount | System.Document.HiddenSlideCount |
| DocKeywords | System.Keywords |
| DocLastAuthor | System.Document.LastAuthor |
| DocLastPrinted | System.Document.DatePrinted |
| DocLastSavedTm | System.Document.DateSaved |
| DocLineCount | System.Document.LineCount |
| DocManager | System.Document.Manager |
| DocNoteCount | System.Document.NoteCount |
| DocPageCount | System.Document.PageCount |
| DocParaCount | System.Document.ParagraphCount |
| DocPresentationTarget | System.Document.PresentationFormat |
| DocRevNumber | System.Document.RevisionNumber |
| DocSlideCount | System.Document.SlideCount |
| DocSubject | System.Subject |
| DocTemplate | System.Document.Template |
| DocTitle | System.Title |
| DocWordCount | System.Document.WordCount |
| DRM 说明 | System.DRM.Description |
| 持续时间 | System.Media.Duration |
| EquipMake | System.Photo.CameraManufacturer |
| ExposureBias | System.Photo.ExposureBias |
| ExposureProg | System.Photo.ExposureProgram |
| ExposureTime | System.Photo.ExposureTime |
| FaxCallerID | System.Fax.CallerID |
| FaxCSID | System.Fax.CSID |
| FaxRecipientName | System.Fax.RecipientName |
| FaxRecipientNumber | System.Fax.RecipientNumber |
| FaxRouting | System.Fax.Routing |
| FaxSenderName | System.Fax.SenderName |
| FaxTime | System.Fax.Time |
| FaxTSID | System.Fax.TSID |
| FileDescription | System.FileDescription |
| FileSystem | System.Volume.FileSystem |
| FileType | System.Image.FileType |
| FileVersion | System.FileVersion |
| Flash | System.Photo.Flash |
| FlashEnergy | System.Photo.FlashEnergy |
| FNumber | System.Photo.FNumber |
| FocalLength | System.Photo.FocalLength |
| 帧速率 | System.Video.FrameRate |
| FrameCount | System.Media.FrameCount |
| FreeSpace | System.FreeSpace |
| 流派 | System.Music.Genre |
| ImageX | System.Image.HorizontalSize |
| ImageY | System.Image.VerticalSize |
| ISOSpeed | System.Photo.ISOSpeed |
| LightSource | System.Photo.LightSource |
| LinksUpToDate | System.Document.LinksDirty |
| LinkTarget | System.Link.TargetParsingPath |
| Lyrics | System.Music.Lyrics |
| Manager | System.Document.Manager |
| MeteringMode | System.Photo.MeteringMode |
| MMClipCount | System.Document.MultimediaClipCount |
| 名称 | System.ItemNameDisplay |
| 所有者 | System.FileOwner |
| 播放计数 | System.DRM.PlayCount |
| 播放过期 | System.DRM.DatePlayExpires |
| 播放开始 | System.DRM.DatePlayStarts |
| PresentationTarget | System.Document.PresentationFormat |
| ProductName | System.Software.ProductName |
| ProductVersion | System.Software.ProductVersion |
| Project | System.Media.Project |
| Protected | System.DRM.IsProtected |
| 级别 | System.Search.Rank |
| Rating | System.Rating |
| ResolutionX | System.Image.HorizontalResolution |
| ResolutionY | System.Image.VerticalResolution |
| 采样率 | System.Audio.SampleRate |
| 缩放 | System.Document.Scale |
| ShutterSpeed | System.Photo.ShutterSpeed |
| 大小 | System.Size |
| 软件 | System.SoftwareUsed |
| 状态 | System.Media.Status |
| 状态 | System.Status |
| 流名称 | System.Video.StreamName |
| SyncCopyIn | System.Sync.CopyIn |
| 跟踪 | System.Music.TrackNumber |
| 类型 | System.ItemTypeText |
| 视频示例大小 | System.Video.SampleSize |
| WhenTaken | System.Photo.DateTaken |
| 写入 | System.DateModified |
| Year | System.Media.Year |
示例
以下示例将作为较大程序的一部分包含,演示如何使用 PSGetPropertyDescriptionByName 检索分级属性的说明。
IPropertyDescription *pPropDesc;
HRESULT hr = PSGetPropertyDescriptionByName(L"System.Rating", IID_PPV_ARGS(&pPropDesc))
if (SUCCEEDED(hr))
{
// pPropDesc is now valid.
pPropDesc->Release();
}
要求
| 最低受支持的客户端 | Windows XP SP2、Windows Vista [仅限桌面应用] |
| 最低受支持的服务器 | Windows Server 2003 SP1 [仅限桌面应用] |
| 目标平台 | Windows |
| 标头 | propsys.h |
| Library | Propsys.lib |
| DLL | Propsys.dll (5.0 或更高版本) |
| 可再发行组件 | Windows 桌面搜索 (WDS) 3.0 |