[WIN32SS:NTUSER] Use the 2nd parameter of NtUserGetThreadDesktop() as fallback. ... 1065/head
authorAndrew Boyarshin <andrew.boyarshin@gmail.com>
Mon, 26 Nov 2018 12:49:15 +0000 (19:49 +0700)
committerHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Sun, 28 Apr 2019 17:27:45 +0000 (19:27 +0200)
commit458a26ab76232b035a4a5989e17c431727c6ca5b
treeb505fe6bfa9096d5426dd915fd819de0737d81bb
parent23ad2173f21593baac60547eba89c92bb96c9976
[WIN32SS:NTUSER] Use the 2nd parameter of NtUserGetThreadDesktop() as fallback. (#1065)

- The 2nd parameter is already passed in user-mode by GetThreadDesktop().
  It is then used by NtUserGetThreadDesktop() as a fallback for console
  threads.

- Lookup and validate the thread by using the IntTID2PTI() helper.
- Don't reference the desktop with too many access rights.
- Get rid of the old-school DECLARE_RETURN() & co. macros.

Co-authored-by: Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
win32ss/include/ntuser.h
win32ss/user/ntuser/desktop.c
win32ss/user/user32/misc/desktop.c