IKnownFolderManager::GetFolderIds method (shobjidl_core.h)
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
[out] ppKFId
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.
[in, out] pCount
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
Requirement | Value |
---|---|
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) |