Share via


Fonction PSGetPropertyDescriptionByName (propsys.h)

Obtient une instance d’une interface de description de propriété pour un nom de propriété spécifié.

Syntaxe

PSSTDAPI PSGetPropertyDescriptionByName(
  [in]  LPCWSTR pszCanonicalName,
  [in]  REFIID  riid,
  [out] void    **ppv
);

Paramètres

[in] pszCanonicalName

Type : LPCWSTR

Pointeur vers une chaîne Unicode terminée par un caractère Null qui identifie la propriété.

[in] riid

Type : REFIID

Référence à l’ID d’interface de la propriété demandée.

[out] ppv

Type : void**

Lorsque cette fonction retourne, contient le pointeur d’interface demandé dans riid. Il s’agit généralement de IPropertyDescription, IPropertyDescriptionAliasInfo ou IPropertyDescriptionSearchInfo.

Valeur retournée

Type : PSSTDAPI

Retourne l’une des valeurs suivantes.

Code de retour Description
S_OK
L’interface a été obtenue.
E_INVALIDARG
Le paramètre pszCanonicalName est NULL.
TYPE_E_ELEMENTNOTFOUND
Le nom canonique n’existe pas dans le cache du sous-système de schéma.

Notes

Il est recommandé d’utiliser la macro IID_PPV_ARGS, définie dans objbase.h, pour empaqueter les paramètres riid et ppv . Cette macro fournit l’IID correct en fonction de l’interface pointée par la valeur dans ppv, éliminant ainsi la possibilité d’une erreur de codage.

Nous recommandons que pszCanonicalName pointe vers le nom canonique d’une propriété, par exemple, L"System.Keywords". Le nom canonique respecte la casse.

En plus des nouveaux noms canoniques, les appelants peuvent passer un nom hérité pour une propriété. Le tableau suivant contient la liste complète des noms hérités pris en charge et les noms canoniques auxquels ils correspondent.

Nom de la propriété Mappe à la propriété
Access System.DateAccessed
Album System.Music.AlbumTitle
AllocSize System.FileAllocationSize
Ouverture System.Photo.Aperture
Artiste System.Music.Artist
Attrib System.FileAttributes
Attributs System.FileAttributes
AttributesDescription System.FileAttributesDisplay
Format audio System.Audio.Format
Taille de l’exemple audio System.Audio.SampleSize
BitDepth System.Image.BitDepth
Bitrate System.Audio.EncodingBitrate
CameraModel System.Photo.CameraModel
Capacité System.Capacity
Canaux System.Audio.ChannelCount
ColorSpace System.Image.ColorSpace
Company System.Company
Compression System.Video.Compression
Compression System.Video.Compression
copyright System.Copyright
copyright System.Copyright
copyright System.Image.Copyright
Créer System.DateCreated
CSCStatus System.OfflineStatus
Débit des données System.Video.EncodingBitrate
DateDeleted System.Recycle.DateDeleted
DeletedFrom System.Recycle.DeletedFrom
Dimensions System.Image.Dimensions
Répertoire System.ItemFolderNameDisplay
Distance 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 Description System.DRM.Description
Duration 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
Clignote System.Photo.Flash
FlashEnergy System.Photo.FlashEnergy
FNumber System.Photo.FNumber
FocalLength System.Photo.FocalLength
Fréquence d'images System.Video.FrameRate
FrameCount System.Media.FrameCount
FreeSpace System.FreeSpace
Genre System.Music.Genre
ImageX System.Image.HorizontalSize
ImageY System.Image.VerticalSize
ISOSpeed System.Photo.ISOSpeed
Source de lumière 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
Nom System.ItemNameDisplay
Propriétaire System.FileOwner
Nombre de lecture System.DRM.PlayCount
La lecture expire System.DRM.DatePlayExpires
Démarrage de la lecture System.DRM.DatePlayStarts
PresentationTarget System.Document.PresentationFormat
ProductName System.Software.ProductName
ProductVersion System.Software.ProductVersion
Project System.Media.Project
Protected System.DRM.IsProtected
Rank System.Search.Rank
Rating System.Rating
RésolutionX System.Image.HorizontalResolution
Résolution System.Image.VerticalResolution
Échantillonnage System.Audio.SampleRate
Scale System.Document.Scale
ShutterSpeed System.Photo.ShutterSpeed
Taille System.Size
Logiciel System.SoftwareUsed
État System.Media.Status
État System.Status
Nom du flux System.Video.StreamName
SyncCopyIn System.Sync.CopyIn
Suivre System.Music.TrackNumber
Type System.ItemTypeText
Taille de l’exemple vidéo System.Video.SampleSize
WhenTaken System.Photo.DateTaken
Write System.DateModified
Year System.Media.Year
 

Exemples

L’exemple suivant, à inclure dans le cadre d’un programme plus grand, montre comment utiliser PSGetPropertyDescriptionByName pour récupérer la description de la propriété ratings.

IPropertyDescription *pPropDesc;

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

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

Spécifications

   
Client minimal pris en charge Windows XP avec SP2, Windows Vista [applications de bureau uniquement]
Serveur minimal pris en charge Windows Server 2003 avec SP1 [applications de bureau uniquement]
Plateforme cible Windows
En-tête propsys.h
Bibliothèque Propsys.lib
DLL Propsys.dll (version 5.0 ou ultérieure)
Composant redistribuable Windows Desktop Search (WDS) 3.0

Voir aussi

IPropertySystem

PSGetPropertyDescription