UserHandleGrantAccess function user32
Grants or denies access to a handle to a User object to a job that has a user-interface restriction. When access is granted, all processes associated with the job can subsequently recognize and use the handle. When access is denied, the processes can no longer use the handle.
BOOL UserHandleGrantAccess(
[in] HANDLE hUserHandle,
[in] HANDLE hJob,
[in] BOOL bGrant
);
Implementation
int UserHandleGrantAccess(int hUserHandle, int hJob, int bGrant) =>
_UserHandleGrantAccess(hUserHandle, hJob, bGrant);