EN
此内容没有您的语言版本,但有英语版本。

PSGetPropertyDescriptionByName function

Gets an instance of a property description interface for a specified property name.

Syntax


PSSTDAPI PSGetPropertyDescriptionByName(
  _In_   LPCWSTR pszCanonicalName,
  _In_   REFIID riid,
  _Out_  void **ppv
);

Parameters

pszCanonicalName [in]

Type: LPCWSTR

A pointer to a null-terminated, Unicode string that identifies the property.

riid [in]

Type: REFIID

Reference to the interface ID of the requested property.

ppv [out]

Type: void**

When this function returns, contains the interface pointer requested in riid. This is typically IPropertyDescription, IPropertyDescriptionAliasInfo, or IPropertyDescriptionSearchInfo.

Return value

Type: PSSTDAPI

Returns one of the following values.

Return codeDescription
S_OK

The interface was obtained.

E_INVALIDARG

The pszCanonicalName parameter is NULL.

TYPE_E_ELEMENTNOTFOUND

The canonical name does not exist in the schema subsystem cache.

 

Remarks

It is recommended that you use the IID_PPV_ARGS macro, defined in objbase.h, to package the riid and ppv parameters. This macro provides the correct IID based on the interface pointed to by the value in ppv, eliminating the possibility of a coding error.

We recommend that pszCanonicalName point to the canonical name of a property, for example, L"System.Keywords". The canonical name is case sensitive.

In addition to the new canonical names, callers can pass a legacy name for a property. The following table contains the complete list of supported legacy names and the canonical names they correspond to.

Property nameMaps to property
AccessSystem.DateAccessed
AlbumSystem.Music.AlbumTitle
AllocSizeSystem.FileAllocationSize
ApertureSystem.Photo.Aperture
ArtistSystem.Music.Artist
AttribSystem.FileAttributes
AttributesSystem.FileAttributes
AttributesDescriptionSystem.FileAttributesDisplay
Audio FormatSystem.Audio.Format
Audio Sample SizeSystem.Audio.SampleSize
BitDepthSystem.Image.BitDepth
BitrateSystem.Audio.EncodingBitrate
CameraModelSystem.Photo.CameraModel
CapacitySystem.Capacity
ChannelsSystem.Audio.ChannelCount
ColorSpaceSystem.Image.ColorSpace
CompanySystem.Company
CompressionSystem.Video.Compression
CompressionSystem.Video.Compression
CopyrightSystem.Copyright
CopyrightSystem.Copyright
CopyrightSystem.Image.Copyright
CreateSystem.DateCreated
CSCStatusSystem.OfflineStatus
Data RateSystem.Video.EncodingBitrate
DateDeletedSystem.Recycle.DateDeleted
DeletedFromSystem.Recycle.DeletedFrom
DimensionsSystem.Image.Dimensions
DirectorySystem.ItemFolderNameDisplay
DistanceSystem.Photo.SubjectDistance
DocAppNameSystem.ApplicationName
DocAuthorSystem.Author
DocByteCountSystem.Document.ByteCount
DocCategorySystem.Category
DocCharCountSystem.Document.CharacterCount
DocCommentsSystem.Comment
DocCompanySystem.Company
DocCreatedTmSystem.Document.DateCreated
DocEditTimeSystem.Document.TotalEditingTime
DocHiddenCountSystem.Document.HiddenSlideCount
DocKeywordsSystem.Keywords
DocLastAuthorSystem.Document.LastAuthor
DocLastPrintedSystem.Document.DatePrinted
DocLastSavedTmSystem.Document.DateSaved
DocLineCountSystem.Document.LineCount
DocManagerSystem.Document.Manager
DocNoteCountSystem.Document.NoteCount
DocPageCountSystem.Document.PageCount
DocParaCountSystem.Document.ParagraphCount
DocPresentationTargetSystem.Document.PresentationFormat
DocRevNumberSystem.Document.RevisionNumber
DocSlideCountSystem.Document.SlideCount
DocSubjectSystem.Subject
DocTemplateSystem.Document.Template
DocTitleSystem.Title
DocWordCountSystem.Document.WordCount
DRM DescriptionSystem.DRM.Description
DurationSystem.Media.Duration
EquipMakeSystem.Photo.CameraManufacturer
ExposureBiasSystem.Photo.ExposureBias
ExposureProgSystem.Photo.ExposureProgram
ExposureTimeSystem.Photo.ExposureTime
FaxCallerIDSystem.Fax.CallerID
FaxCSIDSystem.Fax.CSID
FaxRecipientNameSystem.Fax.RecipientName
FaxRecipientNumberSystem.Fax.RecipientNumber
FaxRoutingSystem.Fax.Routing
FaxSenderNameSystem.Fax.SenderName
FaxTimeSystem.Fax.Time
FaxTSIDSystem.Fax.TSID
FileDescriptionSystem.FileDescription
FileSystemSystem.Volume.FileSystem
FileTypeSystem.Image.FileType
FileVersionSystem.FileVersion
FlashSystem.Photo.Flash
FlashEnergySystem.Photo.FlashEnergy
FNumberSystem.Photo.FNumber
FocalLengthSystem.Photo.FocalLength
Frame RateSystem.Video.FrameRate
FrameCountSystem.Media.FrameCount
FreeSpaceSystem.FreeSpace
GenreSystem.Music.Genre
ImageXSystem.Image.HorizontalSize
ImageYSystem.Image.VerticalSize
ISOSpeedSystem.Photo.ISOSpeed
LightSourceSystem.Photo.LightSource
LinksUpToDateSystem.Document.LinksDirty
LinkTargetSystem.Link.TargetParsingPath
LyricsSystem.Music.Lyrics
ManagerSystem.Document.Manager
MeteringModeSystem.Photo.MeteringMode
MMClipCountSystem.Document.MultimediaClipCount
NameSystem.ItemNameDisplay
OwnerSystem.FileOwner
Play CountSystem.DRM.PlayCount
Play ExpiresSystem.DRM.DatePlayExpires
Play StartsSystem.DRM.DatePlayStarts
PresentationTargetSystem.Document.PresentationFormat
ProductNameSystem.Software.ProductName
ProductVersionSystem.Software.ProductVersion
ProjectSystem.Media.Project
ProtectedSystem.DRM.IsProtected
RankSystem.Search.Rank
RatingSystem.Rating
ResolutionXSystem.Image.HorizontalResolution
ResolutionYSystem.Image.VerticalResolution
Sample RateSystem.Audio.SampleRate
ScaleSystem.Document.Scale
ShutterSpeedSystem.Photo.ShutterSpeed
SizeSystem.Size
SoftwareSystem.SoftwareUsed
StatusSystem.Media.Status
StatusSystem.Status
Stream NameSystem.Video.StreamName
SyncCopyInSystem.Sync.CopyIn
TrackSystem.Music.TrackNumber
TypeSystem.ItemTypeText
Video Sample SizeSystem.Video.SampleSize
WhenTakenSystem.Photo.DateTaken
WriteSystem.DateModified
YearSystem.Media.Year

 

Examples

The following example, to be included as part of a larger program, demonstrates how to use PSGetPropertyDescriptionByName to retrieve the description for the ratings property.


IPropertyDescription *pPropDesc;

HRESULT hr = PSGetPropertyDescriptionByName(L"System.Rating", IID_PPV_ARGS(&pPropDesc))

if (SUCCEEDED(hr))
{
    // pPropDesc is now valid.
 
    pPropDesc->Release();
}

Requirements

Minimum supported client

Windows XP with SP2, Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2003 with SP1 [desktop apps only]

Redistributable

Windows Desktop Search (WDS) 3.0

Header

Propsys.h

Library

Propsys.lib

DLL

Propsys.dll (version 5.0 or later)

See also

PSGetPropertyDescription
IPropertySystem

 

 

社区附加资源

添加
显示:
© 2014 Microsoft