Επεξεργασία

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


SetCurrentProcessExplicitAppUserModelID function (shobjidl_core.h)

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

SHSTDAPI SetCurrentProcessExplicitAppUserModelID(
  [in] PCWSTR AppID
);

Parameters

[in] AppID

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

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)
Library Shell32.lib
DLL Shell32.dll (version 6.1 or later)

See also

Application User Model IDs (AppUserModelIDs)

GetCurrentProcessExplicitAppUserModelID

Taskbar Extensions