Grants or denies access to a handle to a User object to a job that has a user-interface restriction
_WinAPI_UserHandleGrantAccess ( $hObject, $hJob, $bGrant )
|$hObject||Handle to the User object.|
|$hJob||Handle to the job to be granted access to the User handle.|
|$bGrant||Specifies whether to grant or deny access to the User handle, valid values:
True - The processes associated with the job can recognize and use the handle.
False - The processes cannot use the handle.
The _WinAPI_UserHandleGrantAccess() function can be called only from a process not associated with the job
specified by the $hJob parameter. The User handle must not be owned by a process or thread associated
with the job.
Search UserHandleGrantAccess in MSDN Library.