mirror of
https://github.com/reactos/reactos.git
synced 2025-06-25 05:59:43 +00:00
Make GetProcessWindowStation work for CSRSS
svn path=/trunk/; revision=19790
This commit is contained in:
parent
a77ce5795b
commit
dbebd881b2
2 changed files with 20 additions and 5 deletions
|
@ -915,17 +915,31 @@ NtUserSetObjectInformation(
|
||||||
HWINSTA FASTCALL
|
HWINSTA FASTCALL
|
||||||
UserGetProcessWindowStation(VOID)
|
UserGetProcessWindowStation(VOID)
|
||||||
{
|
{
|
||||||
|
NTSTATUS Status;
|
||||||
|
HWINSTA WinSta;
|
||||||
|
|
||||||
if(PsGetCurrentProcess() != CsrProcess)
|
if(PsGetCurrentProcess() != CsrProcess)
|
||||||
{
|
{
|
||||||
return PsGetCurrentProcess()->Win32WindowStation;
|
return PsGetCurrentProcess()->Win32WindowStation;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* FIXME - get the pointer to the window station by querying the parent of
|
DPRINT1("Should use ObFindHandleForObject\n");
|
||||||
the desktop of the calling thread (which is a window station),
|
Status = ObOpenObjectByPointer(PsGetWin32Thread()->Desktop->WindowStation,
|
||||||
then use ObFindHandleForObject() to find a suitable handle */
|
0,
|
||||||
DPRINT1("CSRSS called NtUserGetProcessWindowStation()!!! returned NULL!\n");
|
NULL,
|
||||||
return NULL;
|
WINSTA_ALL_ACCESS,
|
||||||
|
ExWindowStationObjectType,
|
||||||
|
UserMode,
|
||||||
|
(PHANDLE) &WinSta);
|
||||||
|
if (! NT_SUCCESS(Status))
|
||||||
|
{
|
||||||
|
SetLastNtError(Status);
|
||||||
|
DPRINT1("Unable to open handle for CSRSSs winsta, status 0x%08x\n",
|
||||||
|
Status);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
return WinSta;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -380,6 +380,7 @@ extern "C" {
|
||||||
#define WINSTA_READATTRIBUTES 2
|
#define WINSTA_READATTRIBUTES 2
|
||||||
#define WINSTA_READSCREEN 512
|
#define WINSTA_READSCREEN 512
|
||||||
#define WINSTA_WRITEATTRIBUTES 16
|
#define WINSTA_WRITEATTRIBUTES 16
|
||||||
|
#define WINSTA_ALL_ACCESS 895
|
||||||
#define DDL_READWRITE 0
|
#define DDL_READWRITE 0
|
||||||
#define DDL_READONLY 1
|
#define DDL_READONLY 1
|
||||||
#define DDL_HIDDEN 2
|
#define DDL_HIDDEN 2
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue