Specifies a unique Application User Model ID (AppUserModelID) for the application whose taskbar button will hold the custom Jump List built through the methods of this interface. This method is optional.
HRESULT SetAppID( LPCWSTR pszAppID );
A pointer to the AppUserModelID of the process or application whose taskbar representation receives the Jump List.
Returns S_OK if successful, or an error value otherwise, including the following:
||This method was called after ICustomDestinationList::BeginList. The list-building process is already running with a particular AppUserModelID, either inferred by the system or set through a call to SetAppID before the call to BeginList. After a list-building operation is in progress, the AppUserModelID cannot be changed until after CommitList or AbortList has been called.|
After an AppUserModelID is specified through an object's SetAppID method, the AppUserModelID is saved in the object for that object's lifetime, providing that it is not overwritten by another call to SetAppID.
Some applications will not declare an explicit AppUserModelID and should not call this method. In that case, the application's identity is deduced when ICustomDestinationList::BeginList or ICustomDestinationList::GetRemovedDestinations are called. However, there is a performance benefit in avoiding those calculations, so applications that provide custom Jump Lists are encouraged to use explicit AppUserModelIDs.
|Minimum supported client||Windows 7 [desktop apps only]|
|Minimum supported server||Windows Server 2008 R2 [desktop apps only]|
|Header||shobjidl_core.h (include Shobjidl.h)|
|DLL||Shell32.dll (version 6.1 or later)|