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(
  [out]  KNOWNFOLDER_DEFINITION *pKFD
);

Parameters

pKFD [out]

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]

Header

Shobjidl.h

IDL

Shobjidl.idl

See also

IKnownFolder
Known Folders Sample

 

 

Community Additions

ADD
Show:
© 2014 Microsoft