User32SetProcessRestrictionExemption Method

Exempts the calling process from restrictions preventing desktop processes from interacting with the Windows Store app environment. This function is used by development and debugging tools.

This function only succeeds if a developer license is present on the system. Once successful the calling process will be able to perform the following actions, subject to User Interface Privilege Isolation (UIPI) restrictions:

- Attach global hooks (and event hooks) to Windows Store app processes.

- Attach input queues between Windows Store app processes, Windows Store app browsers, system processes, and desktop application processes.

- Change foreground arbitrarily between the Windows Store app and desktop environments.

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("User32.dll", ExactSpelling = true, SetLastError = true)]
public static bool SetProcessRestrictionExemption(
	bool enableExemption
)

Parameters

enableExemption  Boolean
When set to TRUE, indicates a request to disable exemption for the calling process.

Return Value

Boolean
If the function succeeds, the return value is .

If the function fails, the return value is .

Remarks

See Also