This topic has not yet been rated - Rate this topic

SetCurrentProcessExplicitAppUserModelID function

Applies to: desktop apps only

Specifies a unique application-defined Application User Model ID (AppUserModelID) that identifies the current process to the taskbar. This identifier allows an application to group its associated processes and windows under a single taskbar button.

Syntax

HRESULT SetCurrentProcessExplicitAppUserModelID(
  __in  PCWSTR AppID
);

Parameters

AppID [in]

Type: PCWSTR

Pointer to the AppUserModelID to assign to the current process.

Return value

Type: HRESULT

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

Remarks

This method must be called during an application's initial startup routine before the application presents any UI or makes any manipulation of its Jump Lists. This includes any call to SHAddToRecentDocs.

Requirements

Minimum supported client

Windows 7

Minimum supported server

Windows Server 2008 R2

Header

Shobjidl.h

Library

Shell32.lib

DLL

Shell32.dll (version 6.1 or later)

See also

Application User Model IDs (AppUserModelIDs)
GetCurrentProcessExplicitAppUserModelID
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
Maximum length of 128?

Article  Introducing The Taskbar APIs
http://msdn.microsoft.com/en-us/magazine/dd942846.aspx
states:
    
The application ID is a string—not a GUID—that can take a free format of up to 128 characters.
    
If this is correct it would be nice to mention the maximum length in the documentation :)