IKnownFolderManager::GetFolderIds method

Gets an array of all registered known folder IDs. This can be used in enumerating all known folders.

Syntax


HRESULT GetFolderIds(
  [out]      KNOWNFOLDERID **ppKFId,
  [in, out]  UINT *pCount
);

Parameters

ppKFId [out]

Type: KNOWNFOLDERID**

When this method returns, contains a pointer to an array of all KNOWNFOLDERID values registered with the system. Use CoTaskMemFree to free these resources when they are no longer needed.

pCount [in, out]

Type: UINT*

When this method returns, contains a pointer to the number of KNOWNFOLDERID values in the array at ppKFId. The [in] functionality of this parameter is not used.

Return value

Type: HRESULT

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

Remarks

The caller of this method must have User privileges.

You can use StringFromCLSID or StringFromGUID2 to convert the retrieved KNOWNFOLDERID values to strings.

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

IKnownFolderManager
Known Folders Sample

 

 

Community Additions

ADD
Show:
© 2014 Microsoft