IApplicationDocumentLists::SetAppID method

Specifies a unique Application User Model ID (AppUserModelID) for the application whose destination lists are being retrieved. This method is optional.

Syntax

HRESULT SetAppID(
  LPCWSTR pszAppID
);

Parameters

pszAppID

Type: LPCWSTR

A pointer to the AppUserModelID of the process whose taskbar button representation receives the Jump List.

Return Value

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

If the application has an explicit AppUserModelID, this method must be called before you call GetList.

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 IApplicationDocumentLists::GetList is called. However, there is a performance benefit in avoiding those calculations, so applications that provide custom Jump Lists are encouraged to use explicit AppUserModelIDs.

Requirements

   
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

Application User Model IDs (AppUserModelIDs)

IApplicationDocumentLists

Taskbar Extensions