[WIN32SS:NTUSER][USER32] NtUserProcessConnect() should return pointers in user client-space. (#3937)

- Do the kernel/server --> user/client-space pointers conversion within
  NtUserProcessConnect(), instead of having the callers of this function
  doing this job.
  This makes the behaviour Windows-compatible.

  NOTE: the gHandleEntries pointer is ReactOS-specific!

- Drop the g_ulSharedDelta global, just use instead gSharedInfo.ulSharedDelta.

- Add extra documentation aspects for NtUserProcessConnect() that are
  not yet implemented in ReactOS.
This commit is contained in:
Hermès Bélusca-Maïto 2021-09-02 01:11:19 +02:00
parent a407cb8f10
commit 4cbc61fd02
No known key found for this signature in database
GPG key ID: 3B2539C65E7B93D0
4 changed files with 58 additions and 23 deletions

View file

@ -4,8 +4,8 @@ static __inline PVOID
SharedPtrToUser(PVOID Ptr)
{
ASSERT(Ptr != NULL);
ASSERT(g_ulSharedDelta != 0);
return (PVOID)((ULONG_PTR)Ptr - g_ulSharedDelta);
ASSERT(gSharedInfo.ulSharedDelta != 0);
return (PVOID)((ULONG_PTR)Ptr - gSharedInfo.ulSharedDelta);
}
static __inline PVOID