IApplicationDestinations::RemoveDestination method (shobjidl_core.h)

Removes a single destination from the Recent and Frequent categories in a Jump List.


HRESULT RemoveDestination(
  [in] IUnknown *punk


[in] punk

Type: IUnknown*

A pointer to the IShellItem or IShellLink that represents the destination to remove.

Return value


Returns S_OK if successful, or a standard COM error value otherwise. If the object pointed to by punk is not an IShellItem or IShellLink, the method returns E_INVALIDARG.


A destination can appear in both the Recent and Frequent categories. If that is the case, this method removes the destination from both categories.

If the item is pinned to the list by the user, it is not removed but its usage data is cleared.

An application can call RemoveDestination without knowing if the item pointed to by punk is currently in the list. If there is no existing data on the item (in which case it is not in the Recent or Frequent list), this method does nothing and returns S_OK.

If the application has an explicit Application User Model ID (AppUserModelID), you must call IApplicationDestinations::SetAppID before you call this method.


Requirement Value
Minimum supported client Windows 7 [desktop apps only]
Minimum supported server Windows Server 2008 R2 [desktop apps only]
Target Platform Windows
Header shobjidl_core.h (include Shobjidl.h)
Library Shell32.lib
DLL Shell32.dll (version 6.1 or later)

See also




Taskbar Extensions