Επεξεργασία

Κοινή χρήση μέσω


IApplicationDestinations interface (shobjidl_core.h)

Exposes methods that allow an application to remove one or all destinations from the Recent or Frequent categories in a Jump List.

Inheritance

The IApplicationDestinations interface inherits from the IUnknown interface. IApplicationDestinations also has these types of members:

Methods

The IApplicationDestinations interface has these methods.

 
IApplicationDestinations::RemoveAllDestinations

Clears all destination entries from the Recent and Frequent categories in an application's Jump List.
IApplicationDestinations::RemoveDestination

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

Specifies a unique Application User Model ID (AppUserModelID) for the application from whose taskbar button's Jump List the methods of this interface will remove destinations. This method is optional.

Remarks

When to Implement

An implementation of this interface is provided in Windows as CLSID_ApplicationDestinations. This interface is not implemented by third parties.

When to Use

An application calls the methods of this interface when it wants to remove items from a Jump List's automatically generated destinations. These destinations, found in the Recent or Frequent categories, are generated through calls to SHAddToRecentDocs, either explicitly or by the system when a file is opened through Windows Explorer or the common file dialog is used to open, save, or create a file.

An application should call IApplicationDestinations methods in the following situations:

  • When the application is uninstalled.
  • When the user clears history.
  • When the user disables destination tracking in the application's Settings or Options pages.
  • When the user deletes the destination from within the application. This is particularly important in the case of a destination that is not a file. In the case of non-file destinations—generally, though not always, IShellLink items—it is the application's responsibility to remove the destination from the list when it detects that it no longer exists.

If the user turns off usage tracking in the application's privacy setting, the application is responsible for clearing the existing data and also stopping the system from collecting usage data on that item in the future. This is done by setting the NoRecentDocs value in all of the application's file type registrations. See FTA_NoRecentDocs for more information.

IApplicationDestinations methods are used only with the automatically generated Recent or Frequent categories. They do not remove items that the user has pinned to the Jump List. Those items cannot be removed programmatically; only the user can remove them. These methods also have no effect on custom categories or the task list.

Requirements

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)

See also

Taskbar Extensions