IApplicationDestinations::RemoveDestination method

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

Syntax


HRESULT RemoveDestination(
  [in]  IUnknown *punk
);

Parameters

punk [in]

Type: IUnknown*

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

Return value

Type: HRESULT

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.

Remarks

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.

Requirements

Minimum supported client

Windows 7 [desktop apps only]

Minimum supported server

Windows Server 2008 R2 [desktop apps only]

Header

Shobjidl.h

IDL

Shobjidl.idl

Library

Shell32.lib

DLL

Shell32.dll (version 6.1 or later)

See also

IApplicationDestinations
IApplicationDestinations::RemoveAllDestinations
IApplicationDestinations::SetAppID
Taskbar Extensions

 

 

Community Additions

ADD
Show:
© 2014 Microsoft