mirror of
https://github.com/reactos/reactos.git
synced 2025-07-04 09:11:23 +00:00
Get correct window station for CSRSS
svn path=/trunk/; revision=19804
This commit is contained in:
parent
ce6fd73528
commit
9c5f726ff9
1 changed files with 6 additions and 5 deletions
|
@ -948,6 +948,7 @@ NtUserOpenDesktop(
|
||||||
ACCESS_MASK dwDesiredAccess)
|
ACCESS_MASK dwDesiredAccess)
|
||||||
{
|
{
|
||||||
OBJECT_ATTRIBUTES ObjectAttributes;
|
OBJECT_ATTRIBUTES ObjectAttributes;
|
||||||
|
HWINSTA WinSta;
|
||||||
PWINSTATION_OBJECT WinStaObject;
|
PWINSTATION_OBJECT WinStaObject;
|
||||||
UNICODE_STRING DesktopName;
|
UNICODE_STRING DesktopName;
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
|
@ -962,16 +963,16 @@ NtUserOpenDesktop(
|
||||||
* qualified desktop name
|
* qualified desktop name
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
WinSta = UserGetProcessWindowStation();
|
||||||
Status = IntValidateWindowStationHandle(
|
Status = IntValidateWindowStationHandle(
|
||||||
PsGetCurrentProcess()->Win32WindowStation,
|
WinSta,
|
||||||
KernelMode,
|
KernelMode,
|
||||||
0,
|
0,
|
||||||
&WinStaObject);
|
&WinStaObject);
|
||||||
|
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
DPRINT1("Failed validation of window station handle (0x%X)\n",
|
DPRINT1("Failed validation of window station handle (0x%X)\n", WinSta);
|
||||||
PsGetCurrentProcess()->Win32WindowStation);
|
|
||||||
SetLastNtError(Status);
|
SetLastNtError(Status);
|
||||||
RETURN( 0);
|
RETURN( 0);
|
||||||
}
|
}
|
||||||
|
@ -986,7 +987,7 @@ NtUserOpenDesktop(
|
||||||
|
|
||||||
ObDereferenceObject(WinStaObject);
|
ObDereferenceObject(WinStaObject);
|
||||||
|
|
||||||
DPRINT1("Trying to open desktop (%wZ)\n", &DesktopName);
|
DPRINT("Trying to open desktop (%wZ)\n", &DesktopName);
|
||||||
|
|
||||||
/* Initialize ObjectAttributes for the desktop object */
|
/* Initialize ObjectAttributes for the desktop object */
|
||||||
InitializeObjectAttributes(
|
InitializeObjectAttributes(
|
||||||
|
@ -1000,7 +1001,7 @@ NtUserOpenDesktop(
|
||||||
&ObjectAttributes,
|
&ObjectAttributes,
|
||||||
ExDesktopObjectType,
|
ExDesktopObjectType,
|
||||||
NULL,
|
NULL,
|
||||||
UserMode,
|
KernelMode,
|
||||||
dwDesiredAccess,
|
dwDesiredAccess,
|
||||||
NULL,
|
NULL,
|
||||||
(HANDLE*)&Desktop);
|
(HANDLE*)&Desktop);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue