Fungsi PSGetPropertyDescriptionByName (propsys.h)

Mendapatkan instans antarmuka deskripsi properti untuk nama properti tertentu.

Sintaks

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

Parameter

[in] pszCanonicalName

Jenis: LPCWSTR

Penunjuk ke string Unicode yang dihentikan null yang mengidentifikasi properti .

[in] riid

Jenis: REFIID

Referensi ke ID antarmuka properti yang diminta.

[out] ppv

Jenis: batal**

Ketika fungsi ini kembali, berisi pointer antarmuka yang diminta dalam riid. Ini biasanya IPropertyDescription, IPropertyDescriptionAliasInfo, atau IPropertyDescriptionSearchInfo.

Menampilkan nilai

Jenis: PSSTDAPI

Mengembalikan salah satu nilai berikut.

Menampilkan kode Deskripsi
S_OK
Antarmuka diperoleh.
E_INVALIDARG
Parameter pszCanonicalName adalah NULL.
TYPE_E_ELEMENTNOTFOUND
Nama kanonis tidak ada di cache subsistem skema.

Keterangan

Disarankan agar Anda menggunakan makro IID_PPV_ARGS, yang ditentukan dalam objbase.h, untuk mengemas parameter riid dan ppv . Makro ini menyediakan IID yang benar berdasarkan antarmuka yang ditujukkan oleh nilai dalam ppv, menghilangkan kemungkinan kesalahan pengkodian.

Kami menyarankan agar pszCanonicalName menunjuk ke nama kanonis properti, misalnya, L"System.Keywords". Nama kanonis peka huruf besar/kecil.

Selain nama kanonis baru, penelepon dapat meneruskan nama warisan untuk properti. Tabel berikut berisi daftar lengkap nama warisan yang didukung dan nama kanonis yang sesuai dengannya.

Nama properti Peta ke properti
Access System.DateAccessed
Album System.Music.AlbumTitle
Alokasikan System.FileAllocationSize
Aperture System.Photo.Aperture
Artis System.Music.Artist
Attrib System.FileAttributes
Atribut System.FileAttributes
AttributesDescription System.FileAttributesDisplay
Format Audio System.Audio.Format
Ukuran Sampel Audio System.Audio.SampleSize
BitDepth System.Image.BitDepth
Laju bit System.Audio.EncodingBitrate
CameraModel System.Photo.CameraModel
Kapasitas System.Capacity
Saluran System.Audio.ChannelCount
Ruang Warna System.Image.ColorSpace
Perusahaan System.Company
Kompresi System.Video.Compression
Kompresi System.Video.Compression
Hak Cipta System.Copyright
Hak Cipta System.Copyright
Hak Cipta System.Image.Copyright
Buat System.DateCreated
CSCStatus System.OfflineStatus
Laju Data System.Video.EncodingBitrate
DateDeleted System.Recycle.DateDeleted
DeletedFrom System.Recycle.DeletedFrom
Dimensi System.Image.Dimensions
Directory System.ItemFolderNameDisplay
Jarak 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
Deskripsi DRM System.DRM.Description
Durasi 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
Kecepatan Bingkai System.Video.FrameRate
FrameCount System.Media.FrameCount
FreeSpace System.FreeSpace
Genre System.Music.Genre
ImageX System.Image.HorizontalSize
Gambar System.Image.VerticalSize
ISOSpeed System.Photo.ISOSpeed
Sumber Lampu 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
Nama System.ItemNameDisplay
Pemilik System.FileOwner
Jumlah Putar System.DRM.PlayCount
Putar Kedaluwarsa System.DRM.DatePlayExpires
Mulai Putar System.DRM.DatePlayStarts
PresentasiTarget System.Document.PresentationFormat
ProductName System.Software.ProductName
ProductVersion System.Software.ProductVersion
Project System.Media.Project
Protected System.DRM.IsProtected
Pangkat System.Search.Rank
Peringkat System.Rating
ResolutionX System.Image.HorizontalResolution
Resolusi System.Image.VerticalResolution
Tingkat Sampel System.Audio.SampleRate
Skala System.Document.Scale
ShutterSpeed System.Photo.ShutterSpeed
Ukuran System.Size
Perangkat lunak System.SoftwareUsed
Status System.Media.Status
Status System.Status
Nama Aliran System.Video.StreamName
SyncCopyIn System.Sync.CopyIn
Melacak System.Music.TrackNumber
Jenis System.ItemTypeText
Ukuran Sampel Video System.Video.SampleSize
WhenTaken System.Photo.DateTaken
Write System.DateModified
Tahun System.Media.Year
 

Contoh

Contoh berikut, untuk disertakan sebagai bagian dari program yang lebih besar, menunjukkan cara menggunakan PSGetPropertyDescriptionByName untuk mengambil deskripsi properti peringkat.

IPropertyDescription *pPropDesc;

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

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

Persyaratan

   
Klien minimum yang didukung Windows XP dengan SP2, Windows Vista [hanya aplikasi desktop]
Server minimum yang didukung Windows Server 2003 dengan SP1 [hanya aplikasi desktop]
Target Platform Windows
Header propsys.h
Pustaka Propsys.lib
DLL Propsys.dll (versi 5.0 atau yang lebih baru)
Redistribusi Windows Desktop Search (WDS) 3.0

Lihat juga

IPropertySystem

PSGetPropertyDescription