GetCurrentProcessExplicitAppUserModelID function (shobjidl_core.h)
Retrieves the application-defined, explicit Application User Model ID (AppUserModelID) for the current process.
Syntax
SHSTDAPI GetCurrentProcessExplicitAppUserModelID(
[out] PWSTR *AppID
);
Parameters
[out] AppID
Type: PWSTR*
A pointer that receives the address of the AppUserModelID assigned to the process. The caller is responsible for freeing this string with CoTaskMemFree when it is no longer needed.
Return value
Type: HRESULT
If this function succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Remarks
The AppUserModelID retrieved by this function was set earlier through SetCurrentProcessExplicitAppUserModelID.
An application can only retrieve an AppUserModelID that has been explicitly set. System-assigned default AppUserModelIDs cannot be retrieved. If the application requires knowledge of its AppUserModelID it should set one explicitly.
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)