This topic has not yet been rated - Rate this topic

IApplicationDestinations::RemoveDestination method

Applies to: desktop apps only

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

Minimum supported server

Windows Server 2008 R2

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

 

 

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