This topic has not yet been rated - Rate this topic

IKnownFolderManager::GetFolderIds method

Applies to: desktop apps only

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

Minimum supported server

Windows Server 2008

Header

Shobjidl.h

IDL

Shobjidl.idl

See also

IKnownFolderManager

 

 

Send comments about this topic to Microsoft

Build date: 3/7/2012

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ
CoTaskMemFree required call with KNOWNFOLDERID array?
$0It seems required to call CoTaskMemFree with the rfid parameter.$0