Export (0) Print
Expand All

IKnownFolderManager::UnregisterFolder method

Remove a known folder from the registry, which makes it unknown to the known folder system. This method does not remove the folder itself.

Syntax


HRESULT UnregisterFolder(
  [in]  REFKNOWNFOLDERID rfid
);

Parameters

rfid [in]

Type: REFKNOWNFOLDERID

GUID or KNOWNFOLDERID that represents the known folder.

Return value

Type: HRESULT

Returns S_OK if successful, or an error value otherwise, including the following:

Return codeDescription
E_INVALIDARG

Among other things, this value can indicate that the rfid parameter references a KNOWNFOLDERID that is not present on the system. Not all KNOWNFOLDERID values are present on all systems. Use IKnownFolderManager::GetFolderIds to retrieve the set of KNOWNFOLDERID values known to the current system.

 

Remarks

Note  This method updates HKEY_LOCAL_MACHINE and needs to be run in the context of an administrator. Setup programs need administrator privileges to register or unregister a known folder.

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

Shobjidl.h

IDL

Shobjidl.idl

DLL

Shell32.dll

See also

IKnownFolderManager
IKnownFolderManager::RegisterFolder
Known Folders Sample

 

 

Community Additions

ADD
Show:
© 2014 Microsoft