IKnownFolder::GetFolderDefinition method

Retrieves a structure that contains the defining elements of a known folder, which includes the folder's category, name, path, description, tooltip, icon, and other properties.

Syntax

HRESULT GetFolderDefinition(
  KNOWNFOLDER_DEFINITION *pKFD
);

Parameters

pKFD

Type: KNOWNFOLDER_DEFINITION*

When this method returns, contains a pointer to the KNOWNFOLDER_DEFINITION structure. When no longer needed, the calling application is responsible for calling FreeKnownFolderDefinitionFields to free this resource.

Return Value

Type: HRESULT

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

Remarks

When a third-party application creates their own known folder, they do so by defining it with a KNOWNFOLDER_DEFINITION structure, then registering it with the system. Any registered known folder definition information—system-provided or application-created—can be retrived through this method.

To call this method, the caller must have at least User privileges.

Requirements

   
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Target Platform Windows
Header shobjidl_core.h (include Shobjidl.h)

See Also

IKnownFolder

Known Folders Sample