Retrieves the value for a given property key using the file association information provided by the Namespace Extensions.
HRESULT AssocGetDetailsOfPropKey( _In_ IShellFolder *psf, _In_ PCUITEMID_CHILD pidl, _In_ PROPERTYKEY *pkey, _Out_ VARIANT *pv, _Out_ BOOL *pfFoundPropKey );
- psf [in]
A pointer to the shell folder for which the details of the property key of the file association are being retrieved.
- pidl [in]
The PIDL of the child item for which the file associations are being requested.
- pkey [in]
A pointer to the property key that is being retrieved.
- pv [out]
When this function returns, contains the details of the given property key.
- pfFoundPropKey [out]
When this function returns, contains a flag that is TRUE if the property key was found, otherwise FALSE.
If this function succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
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.
- 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.
- 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.
- 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:
Minimum supported client
|Windows Vista [desktop apps only]|
Minimum supported server
|Windows Server 2008 [desktop apps only]|
Build date: 11/28/2012