IntFreeDesktopHeap(Desktop);
}
-NTSTATUS NTAPI
+NTSTATUS NTAPI
IntDesktopOkToClose(PWIN32_OKAYTOCLOSEMETHOD_PARAMETERS Parameters)
{
PTHREADINFO pti;
{
PWND Window = NULL;
HRGN hRgn;
-
+
Window = UserGetDesktopWindow();
hRgn = IntSysCreateRectRgnIndirect(&Window->rcWindow);
RDW_ERASE |
RDW_INVALIDATE |
RDW_ALLCHILDREN);
-
- REGION_FreeRgnByHandle(hRgn);
+
+ GreDeleteObject(hRgn);
}
DPRINT("IntSetThreadDesktop() , FOF=%d\n", FreeOnFailure);
MapHeap = (PsGetCurrentProcess() != PsInitialSystemProcess);
W32Thread = PsGetCurrentThreadWin32Thread();
-
+
if(hDesktop != NULL)
{
/* Validate the new desktop. */
ObDereferenceObject(OldDesktop);
}
-
+
if (hOldDesktop != NULL)
{
ZwClose(hOldDesktop);
BOOL ret;
UserEnterExclusive();
-
+
ret = IntSetThreadDesktop(hDesktop, FALSE);
-
+
UserLeave();
-
+
return ret;
}