Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Expand Minimize

AssocGetDetailsOfPropKey function

Retrieves the value for a given property key using the file association information provided by the Namespace Extensions.

Syntax


HRESULT AssocGetDetailsOfPropKey(
  _In_  IShellFolder    *psf,
  _In_  PCUITEMID_CHILD pidl,
  _In_  PROPERTYKEY     *pkey,
  _Out_ VARIANT         *pv,
  _Out_ BOOL            *pfFoundPropKey
);

Parameters

psf [in]

Type: IShellFolder*

A pointer to the shell folder for which the details of the property key of the file association are being retrieved.

pidl [in]

Type: PCUITEMID_CHILD

The PIDL of the child item for which the file associations are being requested.

pkey [in]

Type: PROPERTYKEY*

A pointer to the property key that is being retrieved.

pv [out]

Type: VARIANT*

When this function returns, contains the details of the given property key.

pfFoundPropKey [out]

Type: BOOL*

When this function returns, contains a flag that is TRUE if the property key was found, otherwise FALSE.

Return value

Type: HRESULT

If this function succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

This function is to be used only by implementers of IShellFolder Namespace Extensions. Other calling applications should use IShellFolder2::GetDetailsEx to get a value for a PROPERTYKEY. This function is to be used by implementers of IShellFolder Namespace Extensions.

The provided namespace extension must support the use of this API in one of the following three ways.

  1. If the provided Namespace Extensions supports retrieving an IQueryAssociations interface for the item by implementing IShellFolder::GetUIObjectOf(..., IID_IQueryAssociations, ...), then AssocGetDetailsOfPropKey will use the provided file associations API to retrieve the value for the property key.
  2. If the provided namespace extension returns SFGAO_FILESYSTEM for the item from IShellFolder::GetAttributesOf and provides a parsing name for the item, then AssocGetDetailsOfPropKey will use the standard file system associations to retrieve the value for the property key.
  3. If the provided namespace extension returns SFGAO_FOLDER | SFGAO_BROWSABLE for the item from IShellFolder::GetAttributesOf, then AssocGetDetailsOfPropKey will use the file association for folders (ASSOCCLASS_FOLDER) to retrieve the value for the property key.

If the ShellFolder being implemented contains items that are extensible through the file associations mechanism, then you can use this function to retrieve PropertyKeys that are declared for a given file association. For example, if a given Shell folder drives a details pane and you want the properties displayed in that pane to be governed by third party file name extensions, then you can use this function to return PKEY_PropList_PreviewDetails. This key has a value that is declared in the registry for that file name extension with a semicolon delimited list of properties. There is a list of file name extension defined properties in the registry. This list includes but is not limited to the following:

  • PKEY_PropList_PreviewDetails
  • PKEY_PropList_PreviewTitle
  • PKEY_PropList_FullDetails
  • PKEY_PropList_TileInfo
  • PKEY_PropList_ExtendedTileInfo
  • PKEY_PropList_InfoTip
  • PKEY_PropList_QuickTip
  • PKEY_PropList_FileOperationPrompt
  • PKEY_PropList_ConflictPrompt
  • PKEY_PropList_SetDefaultsFor
  • PKEY_PropList_NonPersonal
  • PKEY_NewMenuPreferredTypes
  • PKEY_NewMenuAllowedTypes

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

Shlobj.h

DLL

Shell32.dll

 

 

Community Additions

ADD
Show:
© 2015 Microsoft