Funzione PSGetPropertyDescriptionByName (propsys.h)

Ottiene un'istanza di un'interfaccia di descrizione delle proprietà per un nome di proprietà specificato.

Sintassi

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

Parametri

[in] pszCanonicalName

Tipo: LPCWSTR

Puntatore a una stringa Unicode con terminazione null che identifica la proprietà.

[in] riid

Tipo: REFIID

Riferimento all'ID interfaccia della proprietà richiesta.

[out] ppv

Tipo: void**

Quando questa funzione restituisce, contiene il puntatore dell'interfaccia richiesto in riid. Questo è in genere IPropertyDescription, IPropertyDescriptionAliasInfo o IPropertyDescriptionSearchInfo.

Valore restituito

Tipo: PSSTDAPI

Restituisce uno dei valori seguenti.

Codice restituito Descrizione
S_OK
L'interfaccia è stata ottenuta.
E_INVALIDARG
Il parametro pszCanonicalName è NULL.
TYPE_E_ELEMENTNOTFOUND
Il nome canonico non esiste nella cache del sottosistema dello schema.

Commenti

È consigliabile usare la macro IID_PPV_ARGS, definita in objbase.h, per creare il pacchetto dei parametri riid e ppv . Questa macro fornisce l'IID corretto in base all'interfaccia a cui punta il valore in ppv, eliminando la possibilità di un errore di codifica.

È consigliabile che pszCanonicalName punti al nome canonico di una proprietà, ad esempio L"System.Keywords". Il nome canonico è distinzione tra maiuscole e minuscole.

Oltre ai nuovi nomi canonici, i chiamanti possono passare un nome legacy per una proprietà. La tabella seguente contiene l'elenco completo dei nomi legacy supportati e dei nomi canonici corrispondenti.

Nome proprietà Esegue il mapping alla proprietà
Access System.DateAccessed
Album System.Music.AlbumTitle
AllocSize System.FileAllocationSize
Apertura System.Photo.Aperture
Artista System.Music.Artist
Attrib System.FileAttributes
Attributi System.FileAttributes
AttributesDescription System.FileAttributesDisplay
Formato audio System.Audio.Format
Dimensioni di esempio audio System.Audio.SampleSize
BitDepth System.Image.BitDepth
Bitrate System.Audio.EncodingBitrate
CameraModel System.Photo.CameraModel
Capacity System.Capacity
Canali System.Audio.ChannelCount
ColorSpace System.Image.ColorSpace
Company System.Company
Compressione System.Video.Compression
Compressione System.Video.Compression
Copyright System.Copyright
Copyright System.Copyright
Copyright System.Image.Copyright
Crea System.DateCreated
CSCStatus System.OfflineStatus
Velocità dati System.Video.EncodingBitrate
DateDeleted System.Recycle.DateDeleted
DeletedFrom System.Recycle.DeletedFrom
Dimensioni System.Image.Dimension
Directory System.ItemFolderNameDisplay
Distanza 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
Descrizione DRM System.DRM.Description
Durata 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
FlashAsto System.Photo.Flash Dottorato
FNumber System.Photo.FNumber
FocalLength System.Photo.FocalLength
Frame Rate System.Video.FrameRate
FrameCount System.Media.FrameCount
FreeSpace System.FreeSpace
Genre System.Music.Genre
ImageX System.Image.HorizontalSize
Immagine 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
Nome System.ItemNameDisplay
Proprietario System.FileOwner
Conteggio riproduzione System.DRM.PlayCount
Play Expires System.DRM.DatePlayExpires
Avvia riproduzione System.DRM.DatePlayStarts
PresentationTarget System.Document.PresentationFormat
ProductName System.Software.ProductName
ProductVersion System.Software.ProductVersion
Project System.Media.Project
Protetta System.DRM.IsProtected
Classifica System.Search.Rank
Classificazione System.Rating
ResolutionX System.Image.HorizontalResolution
Risoluzione System.Image.VerticalResolution
Frequenza di campionamento System.Audio.SampleRate
Scalabilità System.Document.Scale
Shutterspeed System.Photo.ShutterSpeed
Dimensione System.Size
Software System.SoftwareUsed
Stato System.Media.Status
Stato System.Status
Nome flusso System.Video.StreamName
SyncCopyIn System.Sync.CopyIn
Track System.Music.TrackNumber
Tipo System.ItemTypeText
Dimensioni di esempio video System.Video.SampleSize
WhenTaken System.Photo.DateTaken
Write System.DateModified
Year System.Media.Year
 

Esempio

Nell'esempio seguente, da includere come parte di un programma più ampio, viene illustrato come usare PSGetPropertyDescriptionByName per recuperare la descrizione per la proprietà rating.

IPropertyDescription *pPropDesc;

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

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

Requisiti

   
Client minimo supportato Windows XP con SP2, Windows Vista [solo app desktop]
Server minimo supportato Windows Server 2003 con SP1 [solo app desktop]
Piattaforma di destinazione Windows
Intestazione propsys.h
Libreria Propsys.lib
DLL Propsys.dll (versione 5.0 o successiva)
Componente ridistribuibile Windows Desktop Search (WDS) 3.0

Vedi anche

IPropertySystem

PSGetPropertyDescription