summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
eb1f9f7)
svn path=/branches/ros-csrss/; revision=57660
#define ONEPARAM_ROUTINE_SWITCHCARETSHOWING 0xfffe0008
#define ONEPARAM_ROUTINE_ENABLEPROCWNDGHSTING 0xfffe000d
#define ONEPARAM_ROUTINE_GETDESKTOPMAPPING 0xfffe000e
#define ONEPARAM_ROUTINE_SWITCHCARETSHOWING 0xfffe0008
#define ONEPARAM_ROUTINE_ENABLEPROCWNDGHSTING 0xfffe000d
#define ONEPARAM_ROUTINE_GETDESKTOPMAPPING 0xfffe000e
-#define ONEPARAM_ROUTINE_GETCURSORPOSITION 0xfffe0048 // use ONEPARAM_ or TWOPARAM routine ?
#define TWOPARAM_ROUTINE_SETMENUBARHEIGHT 0xfffd0050
#define TWOPARAM_ROUTINE_SETGUITHRDHANDLE 0xfffd0052
#define MSQ_STATE_CAPTURE 0x1
#define TWOPARAM_ROUTINE_SETMENUBARHEIGHT 0xfffd0050
#define TWOPARAM_ROUTINE_SETGUITHRDHANDLE 0xfffd0052
#define MSQ_STATE_CAPTURE 0x1
/* GLOBALS *******************************************************************/
/* Currently active desktop */
/* GLOBALS *******************************************************************/
/* Currently active desktop */
-PDESKTOP InputDesktop = NULL;
-HDESK InputDesktopHandle = NULL;
+PDESKTOP gpdeskInputDesktop = NULL;
HDC ScreenDeviceContext = NULL;
PTHREADINFO gptiDesktopThread;
HCURSOR gDesktopCursor = NULL;
HDC ScreenDeviceContext = NULL;
PTHREADINFO gptiDesktopThread;
HCURSOR gDesktopCursor = NULL;
PDESKTOP FASTCALL
IntGetActiveDesktop(VOID)
{
PDESKTOP FASTCALL
IntGetActiveDesktop(VOID)
{
+ return gpdeskInputDesktop;
BOOL fInherit,
ACCESS_MASK dwDesiredAccess)
{
BOOL fInherit,
ACCESS_MASK dwDesiredAccess)
{
NTSTATUS Status;
HDESK hdesk = NULL;
NTSTATUS Status;
HDESK hdesk = NULL;
+ ULONG HandleAttributes = 0;
- TRACE("Enter NtUserOpenInputDesktop InputDesktopHandle 0x%p\n",InputDesktopHandle);
+ TRACE("Enter NtUserOpenInputDesktop gpdeskInputDesktop 0x%p\n",gpdeskInputDesktop);
- /* Get a pointer to the desktop object */
- Status = IntValidateDesktopHandle(InputDesktopHandle, UserMode, 0, &pdesk);
- if (!NT_SUCCESS(Status))
- {
- ERR("Validation of input desktop handle (0x%p) failed\n", InputDesktopHandle);
- goto Exit;
- }
+ if(fInherit) HandleAttributes = OBJ_INHERIT;
/* Create a new handle to the object */
Status = ObOpenObjectByPointer(
/* Create a new handle to the object */
Status = ObOpenObjectByPointer(
+ gpdeskInputDesktop,
+ HandleAttributes,
NULL,
dwDesiredAccess,
ExDesktopObjectType,
UserMode,
(PHANDLE)&hdesk);
NULL,
dwDesiredAccess,
ExDesktopObjectType,
UserMode,
(PHANDLE)&hdesk);
- ObDereferenceObject(pdesk);
-
if (!NT_SUCCESS(Status))
{
ERR("Failed to open input desktop object\n");
SetLastNtError(Status);
if (!NT_SUCCESS(Status))
{
ERR("Failed to open input desktop object\n");
SetLastNtError(Status);
TRACE("NtUserOpenInputDesktop returning 0x%p\n",hdesk);
UserLeave();
return hdesk;
TRACE("NtUserOpenInputDesktop returning 0x%p\n",hdesk);
UserLeave();
return hdesk;
InputWindowStation->ActiveDesktop = pdesk;
/* Set the global state. */
InputWindowStation->ActiveDesktop = pdesk;
/* Set the global state. */
- InputDesktop = pdesk;
- InputDesktopHandle = hdesk;
- TRACE("SwitchDesktop InputDesktopHandle 0x%p\n",InputDesktopHandle);
+ gpdeskInputDesktop = pdesk;
+ TRACE("SwitchDesktop gpdeskInputDesktop 0x%p\n",gpdeskInputDesktop);
ObDereferenceObject(pdesk);
RETURN(TRUE);
ObDereferenceObject(pdesk);
RETURN(TRUE);
DESKTOP_WRITEOBJECTS
extern PDESKTOP InputDesktop;
DESKTOP_WRITEOBJECTS
extern PDESKTOP InputDesktop;
-extern HDESK InputDesktopHandle;
extern PCLS DesktopWindowClass;
extern HDC ScreenDeviceContext;
extern PTHREADINFO gptiDesktopThread;
extern PCLS DesktopWindowClass;
extern HDC ScreenDeviceContext;
extern PTHREADINFO gptiDesktopThread;
- case ONEPARAM_ROUTINE_GETCURSORPOSITION:
- {
- BOOL ret = TRUE;
-
- _SEH2_TRY
- {
- ProbeForWrite((POINT*)Param,sizeof(POINT),1);
- RtlCopyMemory((POINT*)Param,&gpsi->ptCursor,sizeof(POINT));
- }
- _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
- {
- SetLastNtError(_SEH2_GetExceptionCode());
- ret = FALSE;
- }
- _SEH2_END;
-
- RETURN (ret);
- }
-
case ONEPARAM_ROUTINE_ENABLEPROCWNDGHSTING:
{
BOOL Enable;
case ONEPARAM_ROUTINE_ENABLEPROCWNDGHSTING:
{
BOOL Enable;
BOOL Ret = TRUE;
PPOINTL pptl;
PTHREADINFO pti = PsGetCurrentThreadWin32Thread();
BOOL Ret = TRUE;
PPOINTL pptl;
PTHREADINFO pti = PsGetCurrentThreadWin32Thread();
- if (pti->hdesk != InputDesktopHandle) RETURN(FALSE);
+ if (pti->rpdesk != IntGetActiveDesktop()) RETURN(FALSE);
+ ProbeForWrite((POINT*)Param,sizeof(POINT),1);
pptl = (PPOINTL)Param;
*pptl = gpsi->ptCursor;
}
pptl = (PPOINTL)Param;
*pptl = gpsi->ptCursor;
}
EXTINLINE BOOL NtUserxGetCursorPos(POINT* lpPoint)
{
EXTINLINE BOOL NtUserxGetCursorPos(POINT* lpPoint)
{
- return (BOOL)NtUserCallOneParam((DWORD_PTR)lpPoint, ONEPARAM_ROUTINE_GETCURSORPOSITION);
+ return (BOOL)NtUserCallOneParam((DWORD_PTR)lpPoint, ONEPARAM_ROUTINE_GETCURSORPOS);
}
EXTINLINE BOOL NtUserxSetMenuBarHeight(HMENU menu, INT height)
}
EXTINLINE BOOL NtUserxSetMenuBarHeight(HMENU menu, INT height)