/* GLOBALS *******************************************************************/
-/* These can be changed via csrss startup, these are defaults */
+/* These can be changed via CSRSS startup, these are defaults */
DWORD gdwDesktopSectionSize = 512;
DWORD gdwNOIOSectionSize = 128; // A guess, for one or more of the first three system desktops.
IntGetDesktopObjectHandle(PDESKTOP DesktopObject)
{
NTSTATUS Status;
- HDESK Ret;
+ HDESK hDesk;
ASSERT(DesktopObject);
DesktopObject,
ExDesktopObjectType,
NULL,
- (PHANDLE)&Ret))
+ (PHANDLE)&hDesk))
{
Status = ObOpenObjectByPointer(DesktopObject,
0,
0,
ExDesktopObjectType,
UserMode,
- (PHANDLE)&Ret);
+ (PHANDLE)&hDesk);
if (!NT_SUCCESS(Status))
{
/* Unable to create a handle */
}
else
{
- TRACE("Got handle: %p\n", Ret);
+ TRACE("Got handle: 0x%p\n", hDesk);
}
- return Ret;
+ return hDesk;
}
PUSER_MESSAGE_QUEUE FASTCALL
NTSTATUS Status;
PETHREAD Thread;
PDESKTOP DesktopObject;
- HDESK Ret, hThreadDesktop;
+ HDESK hDesk, hThreadDesktop;
OBJECT_HANDLE_INFORMATION HandleInformation;
DECLARE_RETURN(HDESK);
{
/* Just return the handle, we queried the desktop handle of a thread running
in the same context */
- Ret = ((PTHREADINFO)Thread->Tcb.Win32Thread)->hdesk;
+ hDesk = ((PTHREADINFO)Thread->Tcb.Win32Thread)->hdesk;
ObDereferenceObject(Thread);
- RETURN(Ret);
+ RETURN(hDesk);
}
/* Get the desktop handle and the desktop of the thread */
/* Lookup our handle table if we can find a handle to the desktop object,
if not, create one */
- Ret = IntGetDesktopObjectHandle(DesktopObject);
+ hDesk = IntGetDesktopObjectHandle(DesktopObject);
/* All done, we got a valid handle to the desktop */
ObDereferenceObject(DesktopObject);
ObDereferenceObject(Thread);
- RETURN(Ret);
+ RETURN(hDesk);
CLEANUP:
TRACE("Leave NtUserGetThreadDesktop, ret=%p\n",_ret_);