Shell32SetCurrentProcessExplicitAppUserModelID Method

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.

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(ShellAddToRecentDocsFlags, PIDL) function.

Definition

Namespace: DevCase.Win32.NativeMethods
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("Shell32.dll", SetLastError = true)]
public static int SetCurrentProcessExplicitAppUserModelID(
	string appID
)

Parameters

appID  String
The AppUserModelID to assign to the current process.

Return Value

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

Remarks

See Also