PSGetPropertyDescriptionByName 関数 (propsys.h)

指定したプロパティ名のプロパティ記述インターフェイスのインスタンスを取得します。

構文

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

パラメーター

[in] pszCanonicalName

種類: LPCWSTR

プロパティを識別する null で終わる Unicode 文字列へのポインター。

[in] riid

種類: REFIID

要求されたプロパティのインターフェイス ID への参照。

[out] ppv

型: void**

この関数が戻るとき、 には 、riid で要求されたインターフェイス ポインターが含まれます。 これは通常 、IPropertyDescriptionIPropertyDescriptionAliasInfo、または IPropertyDescriptionSearchInfo です

戻り値

種類: PSSTDAPI

次のいずれかの値を返します。

リターン コード 説明
S_OK
インターフェイスが得られました。
E_INVALIDARG
pszCanonicalName パラメーターは NULL です
TYPE_E_ELEMENTNOTFOUND
正規名はスキーマ サブシステム キャッシュに存在しません。

解説

riid パラメーターと ppv パラメーターをパッケージ化するには、objbase.h で定義されているIID_PPV_ARGS マクロを使用することをお勧めします。 このマクロは 、ppv の値によって指されるインターフェイスに基づいて正しい IID を提供し、コーディング エラーの可能性を排除します。

pszCanonicalName は、プロパティの正規名 (例: L"System.Keywords") をポイントすることをお勧めします。 正規名では大文字と小文字が区別されます。

呼び出し元は、新しい正規名に加えて、プロパティのレガシ名を渡すことができます。 次の表に、サポートされているレガシ名の完全な一覧と、対応する正規名を示します。

プロパティ名 プロパティへのマップ
Access System.DateAccessed
アルバム System.Music.AlbumTitle
AllocSize System.FileAllocationSize
絞り System.Photo.Aperture
Artist 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
[会社] System.Company
圧縮 System.Video.Compression
圧縮 System.Video.Compression
Copyright System.Copyright
Copyright System.Copyright
Copyright System.Image.Copyright
作成 System.DateCreated
CSCStatus System.OfflineStatus
データ速度 System.Video.EncodingBitrate
DateDeleted System.Recycle.DateDeleted
DeletedFrom System.Recycle.DeletedFrom
Dimensions System.Image.Dimensions
ディレクトリ 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 の説明 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
点滅 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
Genre System.Music.Genre
ImageX System.Image.HorizontalSize
ImageY System.Image.VerticalSize
ISOSpeed System.Photo.ISOSpeed
光源 System.Photo.LightSource
LinksUpToDate System.Document.LinksDirty
LinkTarget System.Link.TargetParsingPath
Lyrics System.Music.歌詞
Manager System.Document.Manager
MeteringMode System.Photo.MeteringMode
MMClipCount System.Document.MultimediaClipCount
Name 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
Status System.Media.Status
Status System.Status
ストリーム名 System.Video.StreamName
SyncCopyIn System.Sync.CopyIn
Track System.Music.TrackNumber
Type System.ItemTypeText
ビデオサンプルサイズ System.Video.SampleSize
WhenTaken System.Photo.DateTaken
Write System.DateModified
Year System.Media.Year
 

大規模なプログラムの一部として含める次の例では、 PSGetPropertyDescriptionByName を 使用して ratings プロパティの説明を取得する方法を示します。

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

関連項目

IPropertySystem

PSGetPropertyDescription