2008-03-21 00:07:06 +00:00
|
|
|
/*
|
|
|
|
* COPYRIGHT: See COPYING in the top level directory
|
|
|
|
* PROJECT: ReactOS kernel
|
|
|
|
* PURPOSE: NtUserCallXxx call stubs
|
|
|
|
* FILE: subsystem/win32/win32k/ntuser/simplecall.c
|
|
|
|
* PROGRAMER: Ge van Geldorp (ge@gse.nl)
|
|
|
|
* REVISION HISTORY:
|
|
|
|
* 2008/03/20 Split from misc.c
|
|
|
|
*/
|
|
|
|
|
2010-04-26 13:58:46 +00:00
|
|
|
#include <win32k.h>
|
2008-03-21 00:07:06 +00:00
|
|
|
|
|
|
|
#define NDEBUG
|
|
|
|
#include <debug.h>
|
|
|
|
|
|
|
|
|
|
|
|
/* registered Logon process */
|
2009-07-26 16:17:50 +00:00
|
|
|
PPROCESSINFO LogonProcess = NULL;
|
2008-03-21 00:07:06 +00:00
|
|
|
|
|
|
|
BOOL FASTCALL
|
|
|
|
co_IntRegisterLogonProcess(HANDLE ProcessId, BOOL Register)
|
|
|
|
{
|
|
|
|
PEPROCESS Process;
|
|
|
|
NTSTATUS Status;
|
|
|
|
CSR_API_MESSAGE Request;
|
|
|
|
|
|
|
|
Status = PsLookupProcessByProcessId(ProcessId,
|
|
|
|
&Process);
|
|
|
|
if (!NT_SUCCESS(Status))
|
|
|
|
{
|
2010-12-25 11:01:14 +00:00
|
|
|
EngSetLastError(RtlNtStatusToDosError(Status));
|
2008-03-21 00:07:06 +00:00
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (Register)
|
|
|
|
{
|
|
|
|
/* Register the logon process */
|
|
|
|
if (LogonProcess != NULL)
|
|
|
|
{
|
|
|
|
ObDereferenceObject(Process);
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2009-07-26 16:17:50 +00:00
|
|
|
LogonProcess = (PPROCESSINFO)Process->Win32Process;
|
2008-03-21 00:07:06 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
/* Deregister the logon process */
|
2009-07-26 16:17:50 +00:00
|
|
|
if (LogonProcess != (PPROCESSINFO)Process->Win32Process)
|
2008-03-21 00:07:06 +00:00
|
|
|
{
|
|
|
|
ObDereferenceObject(Process);
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
LogonProcess = NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
ObDereferenceObject(Process);
|
|
|
|
|
|
|
|
Request.Type = MAKE_CSR_API(REGISTER_LOGON_PROCESS, CSR_GUI);
|
|
|
|
Request.Data.RegisterLogonProcessRequest.ProcessId = ProcessId;
|
|
|
|
Request.Data.RegisterLogonProcessRequest.Register = Register;
|
|
|
|
|
|
|
|
Status = co_CsrNotify(&Request);
|
|
|
|
if (! NT_SUCCESS(Status))
|
|
|
|
{
|
|
|
|
DPRINT1("Failed to register logon process with CSRSS\n");
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* @unimplemented
|
|
|
|
*/
|
2010-01-05 19:26:32 +00:00
|
|
|
DWORD_PTR
|
2008-11-29 22:48:58 +00:00
|
|
|
APIENTRY
|
2008-03-21 00:07:06 +00:00
|
|
|
NtUserCallNoParam(DWORD Routine)
|
|
|
|
{
|
2010-01-05 19:26:32 +00:00
|
|
|
DWORD_PTR Result = 0;
|
|
|
|
DECLARE_RETURN(DWORD_PTR);
|
2008-03-21 00:07:06 +00:00
|
|
|
|
|
|
|
DPRINT("Enter NtUserCallNoParam\n");
|
|
|
|
UserEnterExclusive();
|
|
|
|
|
|
|
|
switch(Routine)
|
|
|
|
{
|
|
|
|
case NOPARAM_ROUTINE_CREATEMENU:
|
2010-01-05 19:26:32 +00:00
|
|
|
Result = (DWORD_PTR)UserCreateMenu(FALSE);
|
2008-03-21 00:07:06 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case NOPARAM_ROUTINE_CREATEMENUPOPUP:
|
2010-01-05 19:26:32 +00:00
|
|
|
Result = (DWORD_PTR)UserCreateMenu(TRUE);
|
2008-03-21 00:07:06 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case NOPARAM_ROUTINE_DESTROY_CARET:
|
2010-01-05 19:26:32 +00:00
|
|
|
Result = (DWORD_PTR)co_IntDestroyCaret(PsGetCurrentThread()->Tcb.Win32Thread);
|
2008-03-21 00:07:06 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case NOPARAM_ROUTINE_INIT_MESSAGE_PUMP:
|
2010-01-05 19:26:32 +00:00
|
|
|
Result = (DWORD_PTR)IntInitMessagePumpHook();
|
2008-03-21 00:07:06 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case NOPARAM_ROUTINE_UNINIT_MESSAGE_PUMP:
|
2010-01-05 19:26:32 +00:00
|
|
|
Result = (DWORD_PTR)IntUninitMessagePumpHook();
|
2008-03-21 00:07:06 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case NOPARAM_ROUTINE_GETMESSAGEEXTRAINFO:
|
2010-01-05 19:26:32 +00:00
|
|
|
Result = (DWORD_PTR)MsqGetMessageExtraInfo();
|
2008-03-21 00:07:06 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case NOPARAM_ROUTINE_MSQCLEARWAKEMASK:
|
2010-01-05 19:26:32 +00:00
|
|
|
RETURN( (DWORD_PTR)IntMsqClearWakeMask());
|
2008-03-21 00:07:06 +00:00
|
|
|
|
2010-12-04 17:51:17 +00:00
|
|
|
case NOPARAM_ROUTINE_GETMSESSAGEPOS:
|
|
|
|
{
|
|
|
|
PTHREADINFO pti = PsGetCurrentThreadWin32Thread();
|
|
|
|
RETURN( (DWORD_PTR)MAKELONG(pti->ptLast.x, pti->ptLast.y));
|
|
|
|
}
|
|
|
|
|
2011-04-06 12:53:52 +00:00
|
|
|
case NOPARAM_ROUTINE_RELEASECAPTURE:
|
|
|
|
RETURN( (DWORD_PTR)IntReleaseCapture());
|
|
|
|
|
2008-03-21 00:07:06 +00:00
|
|
|
default:
|
|
|
|
DPRINT1("Calling invalid routine number 0x%x in NtUserCallNoParam\n", Routine);
|
2010-12-25 11:01:14 +00:00
|
|
|
EngSetLastError(ERROR_INVALID_PARAMETER);
|
2008-03-21 00:07:06 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
RETURN(Result);
|
|
|
|
|
|
|
|
CLEANUP:
|
|
|
|
DPRINT("Leave NtUserCallNoParam, ret=%i\n",_ret_);
|
|
|
|
UserLeave();
|
|
|
|
END_CLEANUP;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* @implemented
|
|
|
|
*/
|
2010-01-05 19:26:32 +00:00
|
|
|
DWORD_PTR
|
2008-11-29 22:48:58 +00:00
|
|
|
APIENTRY
|
2008-03-21 00:07:06 +00:00
|
|
|
NtUserCallOneParam(
|
2010-01-05 19:26:32 +00:00
|
|
|
DWORD_PTR Param,
|
2008-03-21 00:07:06 +00:00
|
|
|
DWORD Routine)
|
|
|
|
{
|
2010-01-05 19:26:32 +00:00
|
|
|
DECLARE_RETURN(DWORD_PTR);
|
2008-03-21 00:07:06 +00:00
|
|
|
|
|
|
|
DPRINT("Enter NtUserCallOneParam\n");
|
|
|
|
|
|
|
|
UserEnterExclusive();
|
|
|
|
|
|
|
|
switch(Routine)
|
|
|
|
{
|
2009-05-18 21:29:50 +00:00
|
|
|
case ONEPARAM_ROUTINE_POSTQUITMESSAGE:
|
|
|
|
{
|
|
|
|
PTHREADINFO pti;
|
|
|
|
pti = PsGetCurrentThreadWin32Thread();
|
|
|
|
MsqPostQuitMessage(pti->MessageQueue, Param);
|
|
|
|
RETURN(TRUE);
|
|
|
|
}
|
2011-03-18 22:41:22 +00:00
|
|
|
|
|
|
|
case ONEPARAM_ROUTINE_BEGINDEFERWNDPOS:
|
|
|
|
{
|
|
|
|
PSMWP psmwp;
|
|
|
|
HDWP hDwp = NULL;
|
2011-03-20 00:21:45 +00:00
|
|
|
INT count = (INT)Param;
|
|
|
|
|
|
|
|
if (count < 0)
|
2011-03-18 22:41:22 +00:00
|
|
|
{
|
|
|
|
EngSetLastError(ERROR_INVALID_PARAMETER);
|
|
|
|
RETURN(0);
|
|
|
|
}
|
|
|
|
/* Windows allows zero count, in which case it allocates context for 8 moves */
|
2011-03-20 00:21:45 +00:00
|
|
|
if (count == 0) count = 8;
|
2011-03-18 22:41:22 +00:00
|
|
|
|
|
|
|
psmwp = (PSMWP) UserCreateObject( gHandleTable,
|
|
|
|
NULL,
|
|
|
|
(PHANDLE)&hDwp,
|
|
|
|
otSMWP,
|
|
|
|
sizeof(SMWP));
|
|
|
|
if (!psmwp) RETURN(0);
|
2011-03-20 00:21:45 +00:00
|
|
|
psmwp->acvr = ExAllocatePoolWithTag(PagedPool, count * sizeof(CVR), USERTAG_SWP);
|
2011-03-18 22:41:22 +00:00
|
|
|
if (!psmwp->acvr)
|
|
|
|
{
|
|
|
|
UserDeleteObject(hDwp, otSMWP);
|
|
|
|
RETURN(0);
|
|
|
|
}
|
2011-03-20 00:21:45 +00:00
|
|
|
RtlZeroMemory(psmwp->acvr, count * sizeof(CVR));
|
2011-03-18 22:41:22 +00:00
|
|
|
psmwp->bHandle = TRUE;
|
|
|
|
psmwp->ccvr = 0; // actualCount
|
2011-03-20 11:29:51 +00:00
|
|
|
psmwp->ccvrAlloc = count; // suggestedCount
|
2011-03-18 22:41:22 +00:00
|
|
|
RETURN((DWORD_PTR)hDwp);
|
|
|
|
}
|
|
|
|
|
2008-03-21 00:07:06 +00:00
|
|
|
case ONEPARAM_ROUTINE_SHOWCURSOR:
|
2010-01-05 19:26:32 +00:00
|
|
|
RETURN( (DWORD_PTR)UserShowCursor((BOOL)Param) );
|
2008-03-21 00:07:06 +00:00
|
|
|
|
|
|
|
case ONEPARAM_ROUTINE_GETDESKTOPMAPPING:
|
|
|
|
{
|
2009-08-16 21:44:59 +00:00
|
|
|
PTHREADINFO ti;
|
2008-03-21 00:07:06 +00:00
|
|
|
ti = GetW32ThreadInfo();
|
|
|
|
if (ti != NULL)
|
|
|
|
{
|
|
|
|
/* Try convert the pointer to a user mode pointer if the desktop is
|
|
|
|
mapped into the process */
|
2010-01-05 19:26:32 +00:00
|
|
|
RETURN((DWORD_PTR)DesktopHeapAddressToUser((PVOID)Param));
|
2008-03-21 00:07:06 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
RETURN(0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
case ONEPARAM_ROUTINE_WINDOWFROMDC:
|
2010-01-05 19:26:32 +00:00
|
|
|
RETURN( (DWORD_PTR)IntWindowFromDC((HDC)Param));
|
2008-03-21 00:07:06 +00:00
|
|
|
|
|
|
|
case ONEPARAM_ROUTINE_SWAPMOUSEBUTTON:
|
|
|
|
{
|
2010-01-05 19:26:32 +00:00
|
|
|
DWORD_PTR Result;
|
2009-06-29 03:36:31 +00:00
|
|
|
|
2009-06-25 02:43:38 +00:00
|
|
|
Result = gspv.bMouseBtnSwap;
|
|
|
|
gspv.bMouseBtnSwap = Param ? TRUE : FALSE;
|
2009-06-27 23:33:57 +00:00
|
|
|
gpsi->aiSysMet[SM_SWAPBUTTON] = gspv.bMouseBtnSwap;
|
2009-06-25 02:43:38 +00:00
|
|
|
RETURN(Result);
|
2008-03-21 00:07:06 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
case ONEPARAM_ROUTINE_SWITCHCARETSHOWING:
|
2010-01-05 19:26:32 +00:00
|
|
|
RETURN( (DWORD_PTR)IntSwitchCaretShowing((PVOID)Param));
|
2008-03-21 00:07:06 +00:00
|
|
|
|
|
|
|
case ONEPARAM_ROUTINE_SETCARETBLINKTIME:
|
2010-01-05 19:26:32 +00:00
|
|
|
RETURN( (DWORD_PTR)IntSetCaretBlinkTime((UINT)Param));
|
Patch by Stefan Ginsberg (stefan__100__ AT hotmail DOT com):
- remove NtUserEnumClipboardFormats, use ->ONEPARAM_ROUTINE_ENUMCLIPBOARDFORMAT insetad
- remove NtUserRegisterClipboardFormat, use NtUserRegisterWIndowsMessage instead
- remove NtUserKillSystemTimer, use HWNDPARAM_ROUTINE_KILLSYSTEMTIMER instead
- remove NtUserInsertMenuItem, use NtUserThunkedMenuItemInfo instead
- remove NtUserGetCapture, use THREADSTATE_CAPTUREWINDOW instead
- remove NtUserGetActiveWindow, use THREADSTATE_ACTIVEWINDOW instead
- remove NtUserGetQueueStatus, use ONEPARAM_ROUTIME_GETQUEUESTATUS instead
- remove NtUserGetLastActivePopup, wasn't implemented
- remove NtUserRealizePalette from ntuser.h, it's not implemented
- remove duplicate NtUserGetLastInputInfo from ntuser.h
- remove PrivateCsrssRergisterPrimitive from user32, it was unused and unimplemented
- remove NtUserDereferenceWndprocHandle, it was unused
- move WNDPROC_INFO structure from ntuser.h to win32k/include/class.h, as it's not used in usermode anymore
tested with AbiWord and FF on VMWare
svn path=/trunk/; revision=32825
2008-04-03 02:13:34 +00:00
|
|
|
|
2008-03-21 00:07:06 +00:00
|
|
|
case ONEPARAM_ROUTINE_SETMESSAGEEXTRAINFO:
|
2010-01-05 19:26:32 +00:00
|
|
|
RETURN( (DWORD_PTR)MsqSetMessageExtraInfo((LPARAM)Param));
|
2008-03-21 00:07:06 +00:00
|
|
|
|
2010-07-14 15:01:02 +00:00
|
|
|
case ONEPARAM_ROUTINE_CREATEEMPTYCUROBJECT:
|
2008-03-21 00:07:06 +00:00
|
|
|
{
|
|
|
|
PCURICON_OBJECT CurIcon;
|
2010-07-14 09:54:44 +00:00
|
|
|
DWORD_PTR Result ;
|
2008-03-21 00:07:06 +00:00
|
|
|
|
2009-12-19 16:23:05 +00:00
|
|
|
if (!(CurIcon = IntCreateCurIconHandle()))
|
2008-03-21 00:07:06 +00:00
|
|
|
{
|
2010-12-25 11:01:14 +00:00
|
|
|
EngSetLastError(ERROR_NOT_ENOUGH_MEMORY);
|
2008-03-21 00:07:06 +00:00
|
|
|
RETURN(0);
|
|
|
|
}
|
|
|
|
|
2010-07-14 09:54:44 +00:00
|
|
|
Result = (DWORD_PTR)CurIcon->Self;
|
|
|
|
UserDereferenceObject(CurIcon);
|
|
|
|
RETURN(Result);
|
2008-03-21 00:07:06 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
case ONEPARAM_ROUTINE_GETCURSORPOSITION:
|
|
|
|
{
|
2009-12-19 16:23:05 +00:00
|
|
|
BOOL ret = TRUE;
|
|
|
|
|
|
|
|
_SEH2_TRY
|
2008-03-21 00:07:06 +00:00
|
|
|
{
|
2009-12-19 16:23:05 +00:00
|
|
|
ProbeForWrite((POINT*)Param,sizeof(POINT),1);
|
|
|
|
RtlCopyMemory((POINT*)Param,&gpsi->ptCursor,sizeof(POINT));
|
2008-03-21 00:07:06 +00:00
|
|
|
}
|
2009-12-19 16:23:05 +00:00
|
|
|
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
|
|
|
|
{
|
|
|
|
SetLastNtError(_SEH2_GetExceptionCode());
|
|
|
|
ret = FALSE;
|
|
|
|
}
|
|
|
|
_SEH2_END;
|
2008-03-21 00:07:06 +00:00
|
|
|
|
2009-12-19 16:23:05 +00:00
|
|
|
RETURN (ret);
|
2008-03-21 00:07:06 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
case ONEPARAM_ROUTINE_ENABLEPROCWNDGHSTING:
|
|
|
|
{
|
|
|
|
BOOL Enable;
|
2009-07-26 16:17:50 +00:00
|
|
|
PPROCESSINFO Process = PsGetCurrentProcessWin32Process();
|
2008-03-21 00:07:06 +00:00
|
|
|
|
|
|
|
if(Process != NULL)
|
|
|
|
{
|
|
|
|
Enable = (BOOL)(Param != 0);
|
|
|
|
|
|
|
|
if(Enable)
|
|
|
|
{
|
2009-03-30 03:56:53 +00:00
|
|
|
Process->W32PF_flags &= ~W32PF_NOWINDOWGHOSTING;
|
2008-03-21 00:07:06 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2009-03-30 03:56:53 +00:00
|
|
|
Process->W32PF_flags |= W32PF_NOWINDOWGHOSTING;
|
2008-03-21 00:07:06 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
RETURN( TRUE);
|
|
|
|
}
|
|
|
|
|
|
|
|
RETURN( FALSE);
|
|
|
|
}
|
|
|
|
|
2010-11-20 04:24:44 +00:00
|
|
|
case ONEPARAM_ROUTINE_GETINPUTEVENT:
|
2010-01-05 19:26:32 +00:00
|
|
|
RETURN( (DWORD_PTR)IntMsqSetWakeMask(Param));
|
2008-03-21 00:07:06 +00:00
|
|
|
|
|
|
|
case ONEPARAM_ROUTINE_GETKEYBOARDTYPE:
|
|
|
|
RETURN( UserGetKeyboardType(Param));
|
|
|
|
|
|
|
|
case ONEPARAM_ROUTINE_GETKEYBOARDLAYOUT:
|
2010-01-05 19:26:32 +00:00
|
|
|
RETURN( (DWORD_PTR)UserGetKeyboardLayout(Param));
|
2008-03-21 00:07:06 +00:00
|
|
|
|
|
|
|
case ONEPARAM_ROUTINE_RELEASEDC:
|
|
|
|
RETURN (UserReleaseDC(NULL, (HDC) Param, FALSE));
|
|
|
|
|
|
|
|
case ONEPARAM_ROUTINE_REALIZEPALETTE:
|
|
|
|
RETURN (UserRealizePalette((HDC) Param));
|
Patch by Stefan Ginsberg (stefan__100__ AT hotmail DOT com):
- remove NtUserEnumClipboardFormats, use ->ONEPARAM_ROUTINE_ENUMCLIPBOARDFORMAT insetad
- remove NtUserRegisterClipboardFormat, use NtUserRegisterWIndowsMessage instead
- remove NtUserKillSystemTimer, use HWNDPARAM_ROUTINE_KILLSYSTEMTIMER instead
- remove NtUserInsertMenuItem, use NtUserThunkedMenuItemInfo instead
- remove NtUserGetCapture, use THREADSTATE_CAPTUREWINDOW instead
- remove NtUserGetActiveWindow, use THREADSTATE_ACTIVEWINDOW instead
- remove NtUserGetQueueStatus, use ONEPARAM_ROUTIME_GETQUEUESTATUS instead
- remove NtUserGetLastActivePopup, wasn't implemented
- remove NtUserRealizePalette from ntuser.h, it's not implemented
- remove duplicate NtUserGetLastInputInfo from ntuser.h
- remove PrivateCsrssRergisterPrimitive from user32, it was unused and unimplemented
- remove NtUserDereferenceWndprocHandle, it was unused
- move WNDPROC_INFO structure from ntuser.h to win32k/include/class.h, as it's not used in usermode anymore
tested with AbiWord and FF on VMWare
svn path=/trunk/; revision=32825
2008-04-03 02:13:34 +00:00
|
|
|
|
|
|
|
case ONEPARAM_ROUTINE_GETQUEUESTATUS:
|
2009-05-19 15:47:16 +00:00
|
|
|
{
|
2010-11-20 04:24:44 +00:00
|
|
|
RETURN (IntGetQueueStatus((DWORD)Param));
|
2009-05-19 15:47:16 +00:00
|
|
|
}
|
Patch by Stefan Ginsberg (stefan__100__ AT hotmail DOT com):
- remove NtUserEnumClipboardFormats, use ->ONEPARAM_ROUTINE_ENUMCLIPBOARDFORMAT insetad
- remove NtUserRegisterClipboardFormat, use NtUserRegisterWIndowsMessage instead
- remove NtUserKillSystemTimer, use HWNDPARAM_ROUTINE_KILLSYSTEMTIMER instead
- remove NtUserInsertMenuItem, use NtUserThunkedMenuItemInfo instead
- remove NtUserGetCapture, use THREADSTATE_CAPTUREWINDOW instead
- remove NtUserGetActiveWindow, use THREADSTATE_ACTIVEWINDOW instead
- remove NtUserGetQueueStatus, use ONEPARAM_ROUTIME_GETQUEUESTATUS instead
- remove NtUserGetLastActivePopup, wasn't implemented
- remove NtUserRealizePalette from ntuser.h, it's not implemented
- remove duplicate NtUserGetLastInputInfo from ntuser.h
- remove PrivateCsrssRergisterPrimitive from user32, it was unused and unimplemented
- remove NtUserDereferenceWndprocHandle, it was unused
- move WNDPROC_INFO structure from ntuser.h to win32k/include/class.h, as it's not used in usermode anymore
tested with AbiWord and FF on VMWare
svn path=/trunk/; revision=32825
2008-04-03 02:13:34 +00:00
|
|
|
case ONEPARAM_ROUTINE_ENUMCLIPBOARDFORMATS:
|
|
|
|
/* FIXME: Should use UserEnterShared */
|
|
|
|
RETURN(IntEnumClipboardFormats(Param));
|
2008-04-12 23:22:58 +00:00
|
|
|
|
2008-12-23 19:04:40 +00:00
|
|
|
case ONEPARAM_ROUTINE_CSRSS_GUICHECK:
|
2008-04-12 23:22:58 +00:00
|
|
|
IntUserManualGuiCheck(Param);
|
|
|
|
RETURN(TRUE);
|
2008-12-23 19:04:40 +00:00
|
|
|
|
|
|
|
case ONEPARAM_ROUTINE_GETCURSORPOS:
|
|
|
|
{
|
|
|
|
BOOL Ret = TRUE;
|
|
|
|
PPOINTL pptl;
|
2008-12-25 11:29:53 +00:00
|
|
|
PTHREADINFO pti = PsGetCurrentThreadWin32Thread();
|
2010-01-14 02:52:12 +00:00
|
|
|
if (pti->hdesk != InputDesktopHandle) RETURN(FALSE);
|
2008-12-23 19:04:40 +00:00
|
|
|
_SEH2_TRY
|
|
|
|
{
|
|
|
|
pptl = (PPOINTL)Param;
|
|
|
|
*pptl = gpsi->ptCursor;
|
|
|
|
}
|
|
|
|
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
|
|
|
|
{
|
|
|
|
Ret = FALSE;
|
|
|
|
}
|
|
|
|
_SEH2_END;
|
2010-09-27 02:46:16 +00:00
|
|
|
RETURN(Ret);
|
|
|
|
}
|
|
|
|
case ONEPARAM_ROUTINE_SETPROCDEFLAYOUT:
|
|
|
|
{
|
|
|
|
PPROCESSINFO ppi;
|
|
|
|
if (Param & LAYOUT_ORIENTATIONMASK)
|
|
|
|
{
|
|
|
|
ppi = PsGetCurrentProcessWin32Process();
|
|
|
|
ppi->dwLayout = Param;
|
|
|
|
RETURN(TRUE);
|
|
|
|
}
|
2010-12-25 11:01:14 +00:00
|
|
|
EngSetLastError(ERROR_INVALID_PARAMETER);
|
2010-09-27 02:46:16 +00:00
|
|
|
RETURN(FALSE);
|
|
|
|
}
|
|
|
|
case ONEPARAM_ROUTINE_GETPROCDEFLAYOUT:
|
|
|
|
{
|
|
|
|
BOOL Ret = TRUE;
|
|
|
|
PPROCESSINFO ppi;
|
|
|
|
PDWORD pdwLayout;
|
|
|
|
if ( PsGetCurrentProcess() == CsrProcess)
|
|
|
|
{
|
2010-12-25 11:01:14 +00:00
|
|
|
EngSetLastError(ERROR_INVALID_ACCESS);
|
2010-09-27 02:46:16 +00:00
|
|
|
RETURN(FALSE);
|
|
|
|
}
|
|
|
|
ppi = PsGetCurrentProcessWin32Process();
|
|
|
|
_SEH2_TRY
|
|
|
|
{
|
|
|
|
pdwLayout = (PDWORD)Param;
|
|
|
|
*pdwLayout = ppi->dwLayout;
|
|
|
|
}
|
|
|
|
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
|
|
|
|
{
|
2010-09-29 02:29:33 +00:00
|
|
|
SetLastNtError(_SEH2_GetExceptionCode());
|
2010-09-27 02:46:16 +00:00
|
|
|
Ret = FALSE;
|
|
|
|
}
|
|
|
|
_SEH2_END;
|
2008-12-23 19:04:40 +00:00
|
|
|
RETURN(Ret);
|
2009-06-29 03:36:31 +00:00
|
|
|
}
|
2010-12-03 15:34:06 +00:00
|
|
|
case ONEPARAM_ROUTINE_REPLYMESSAGE:
|
|
|
|
RETURN (co_MsqReplyMessage((LRESULT) Param));
|
2011-02-18 20:16:43 +00:00
|
|
|
case ONEPARAM_ROUTINE_MESSAGEBEEP:
|
|
|
|
RETURN ( UserPostMessage(hwndSAS, WM_LOGONNOTIFY, LN_MESSAGE_BEEP, Param) );
|
|
|
|
/* TODO: Implement sound sentry */
|
2008-03-21 00:07:06 +00:00
|
|
|
}
|
|
|
|
DPRINT1("Calling invalid routine number 0x%x in NtUserCallOneParam(), Param=0x%x\n",
|
|
|
|
Routine, Param);
|
2010-12-25 11:01:14 +00:00
|
|
|
EngSetLastError(ERROR_INVALID_PARAMETER);
|
2008-03-21 00:07:06 +00:00
|
|
|
RETURN( 0);
|
|
|
|
|
|
|
|
CLEANUP:
|
|
|
|
DPRINT("Leave NtUserCallOneParam, ret=%i\n",_ret_);
|
|
|
|
UserLeave();
|
|
|
|
END_CLEANUP;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* @implemented
|
|
|
|
*/
|
2010-01-05 19:26:32 +00:00
|
|
|
DWORD_PTR
|
2008-11-29 22:48:58 +00:00
|
|
|
APIENTRY
|
2008-03-21 00:07:06 +00:00
|
|
|
NtUserCallTwoParam(
|
2010-01-05 19:26:32 +00:00
|
|
|
DWORD_PTR Param1,
|
|
|
|
DWORD_PTR Param2,
|
2008-03-21 00:07:06 +00:00
|
|
|
DWORD Routine)
|
|
|
|
{
|
2010-10-11 03:41:41 +00:00
|
|
|
PWND Window;
|
2010-01-05 19:26:32 +00:00
|
|
|
DECLARE_RETURN(DWORD_PTR);
|
2008-03-21 00:07:06 +00:00
|
|
|
|
|
|
|
DPRINT("Enter NtUserCallTwoParam\n");
|
|
|
|
UserEnterExclusive();
|
|
|
|
|
|
|
|
switch(Routine)
|
|
|
|
{
|
|
|
|
case TWOPARAM_ROUTINE_SETMENUBARHEIGHT:
|
|
|
|
{
|
2010-01-05 19:26:32 +00:00
|
|
|
DWORD_PTR Ret;
|
2008-03-21 00:07:06 +00:00
|
|
|
PMENU_OBJECT MenuObject = IntGetMenuObject((HMENU)Param1);
|
|
|
|
if(!MenuObject)
|
|
|
|
RETURN( 0);
|
|
|
|
|
|
|
|
if(Param2 > 0)
|
|
|
|
{
|
|
|
|
Ret = (MenuObject->MenuInfo.Height == (int)Param2);
|
|
|
|
MenuObject->MenuInfo.Height = (int)Param2;
|
|
|
|
}
|
|
|
|
else
|
2010-01-05 19:26:32 +00:00
|
|
|
Ret = (DWORD_PTR)MenuObject->MenuInfo.Height;
|
2008-03-21 00:07:06 +00:00
|
|
|
IntReleaseMenuObject(MenuObject);
|
|
|
|
RETURN( Ret);
|
|
|
|
}
|
|
|
|
|
|
|
|
case TWOPARAM_ROUTINE_SETGUITHRDHANDLE:
|
|
|
|
{
|
2008-10-16 17:52:38 +00:00
|
|
|
PUSER_MESSAGE_QUEUE MsgQueue = ((PTHREADINFO)PsGetCurrentThread()->Tcb.Win32Thread)->MessageQueue;
|
2008-03-21 00:07:06 +00:00
|
|
|
|
|
|
|
ASSERT(MsgQueue);
|
2010-01-05 19:26:32 +00:00
|
|
|
RETURN( (DWORD_PTR)MsqSetStateWindow(MsgQueue, (ULONG)Param1, (HWND)Param2));
|
2008-03-21 00:07:06 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
case TWOPARAM_ROUTINE_ENABLEWINDOW:
|
2011-03-30 08:19:52 +00:00
|
|
|
RETURN( IntEnableWindow((HWND)Param1, (BOOL)Param2));
|
2008-03-21 00:07:06 +00:00
|
|
|
|
|
|
|
case TWOPARAM_ROUTINE_SHOWOWNEDPOPUPS:
|
|
|
|
{
|
|
|
|
Window = UserGetWindowObject((HWND)Param1);
|
|
|
|
if (!Window) RETURN(0);
|
|
|
|
|
2010-01-05 19:26:32 +00:00
|
|
|
RETURN( (DWORD_PTR)IntShowOwnedPopups(Window, (BOOL) Param2));
|
2008-03-21 00:07:06 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
case TWOPARAM_ROUTINE_ROS_UPDATEUISTATE:
|
|
|
|
{
|
|
|
|
WPARAM wParam;
|
|
|
|
Window = UserGetWindowObject((HWND)Param1);
|
|
|
|
if (!Window) RETURN(0);
|
|
|
|
|
|
|
|
/* Unpack wParam */
|
|
|
|
wParam = MAKEWPARAM((Param2 >> 3) & 0x3,
|
|
|
|
Param2 & (UISF_HIDEFOCUS | UISF_HIDEACCEL | UISF_ACTIVE));
|
|
|
|
|
2010-10-11 03:41:41 +00:00
|
|
|
RETURN( UserUpdateUiState(Window, wParam) );
|
2008-03-21 00:07:06 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
case TWOPARAM_ROUTINE_SWITCHTOTHISWINDOW:
|
|
|
|
UNIMPLEMENTED
|
|
|
|
RETURN( 0);
|
|
|
|
|
|
|
|
|
|
|
|
case TWOPARAM_ROUTINE_SETCARETPOS:
|
2010-01-05 19:26:32 +00:00
|
|
|
RETURN( (DWORD_PTR)co_IntSetCaretPos((int)Param1, (int)Param2));
|
2008-03-21 00:07:06 +00:00
|
|
|
|
|
|
|
case TWOPARAM_ROUTINE_REGISTERLOGONPROC:
|
2010-01-05 19:26:32 +00:00
|
|
|
RETURN( (DWORD_PTR)co_IntRegisterLogonProcess((HANDLE)Param1, (BOOL)Param2));
|
2010-01-06 12:44:31 +00:00
|
|
|
|
|
|
|
case TWOPARAM_ROUTINE_SETCURSORPOS:
|
2011-04-09 07:08:17 +00:00
|
|
|
RETURN( (DWORD_PTR)UserSetCursorPos((int)Param1, (int)Param2, 0, 0));
|
2010-01-06 12:44:31 +00:00
|
|
|
|
2010-10-23 05:36:12 +00:00
|
|
|
case TWOPARAM_ROUTINE_UNHOOKWINDOWSHOOK:
|
|
|
|
RETURN( IntUnhookWindowsHook((int)Param1, (HOOKPROC)Param2));
|
2008-03-21 00:07:06 +00:00
|
|
|
}
|
|
|
|
DPRINT1("Calling invalid routine number 0x%x in NtUserCallTwoParam(), Param1=0x%x Parm2=0x%x\n",
|
|
|
|
Routine, Param1, Param2);
|
2010-12-25 11:01:14 +00:00
|
|
|
EngSetLastError(ERROR_INVALID_PARAMETER);
|
2008-03-21 00:07:06 +00:00
|
|
|
RETURN( 0);
|
|
|
|
|
|
|
|
CLEANUP:
|
|
|
|
DPRINT("Leave NtUserCallTwoParam, ret=%i\n",_ret_);
|
|
|
|
UserLeave();
|
|
|
|
END_CLEANUP;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* @unimplemented
|
|
|
|
*/
|
|
|
|
BOOL
|
2008-11-29 22:48:58 +00:00
|
|
|
APIENTRY
|
2008-03-21 00:07:06 +00:00
|
|
|
NtUserCallHwndLock(
|
|
|
|
HWND hWnd,
|
|
|
|
DWORD Routine)
|
|
|
|
{
|
|
|
|
BOOL Ret = 0;
|
2010-10-11 03:41:41 +00:00
|
|
|
PWND Window;
|
2008-03-21 00:07:06 +00:00
|
|
|
USER_REFERENCE_ENTRY Ref;
|
|
|
|
DECLARE_RETURN(BOOLEAN);
|
|
|
|
|
|
|
|
DPRINT("Enter NtUserCallHwndLock\n");
|
|
|
|
UserEnterExclusive();
|
|
|
|
|
2010-10-11 03:41:41 +00:00
|
|
|
if (!(Window = UserGetWindowObject(hWnd)))
|
2008-03-21 00:07:06 +00:00
|
|
|
{
|
|
|
|
RETURN( FALSE);
|
|
|
|
}
|
|
|
|
UserRefObjectCo(Window, &Ref);
|
|
|
|
|
|
|
|
/* FIXME: Routine can be 0x53 - 0x5E */
|
|
|
|
switch (Routine)
|
|
|
|
{
|
|
|
|
case HWNDLOCK_ROUTINE_ARRANGEICONICWINDOWS:
|
|
|
|
co_WinPosArrangeIconicWindows(Window);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case HWNDLOCK_ROUTINE_DRAWMENUBAR:
|
|
|
|
{
|
|
|
|
DPRINT("HWNDLOCK_ROUTINE_DRAWMENUBAR\n");
|
|
|
|
Ret = TRUE;
|
2010-10-11 03:41:41 +00:00
|
|
|
if ((Window->style & (WS_CHILD | WS_POPUP)) != WS_CHILD)
|
2010-03-05 23:10:16 +00:00
|
|
|
co_WinPosSetWindowPos( Window,
|
|
|
|
HWND_DESKTOP,
|
|
|
|
0,0,0,0,
|
|
|
|
SWP_NOSIZE|
|
|
|
|
SWP_NOMOVE|
|
|
|
|
SWP_NOZORDER|
|
|
|
|
SWP_NOACTIVATE|
|
|
|
|
SWP_FRAMECHANGED );
|
2008-03-21 00:07:06 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
case HWNDLOCK_ROUTINE_REDRAWFRAME:
|
2009-01-03 04:02:54 +00:00
|
|
|
co_WinPosSetWindowPos( Window,
|
|
|
|
HWND_DESKTOP,
|
2009-06-29 03:36:31 +00:00
|
|
|
0,0,0,0,
|
2009-01-03 04:02:54 +00:00
|
|
|
SWP_NOSIZE|
|
|
|
|
SWP_NOMOVE|
|
|
|
|
SWP_NOZORDER|
|
|
|
|
SWP_NOACTIVATE|
|
|
|
|
SWP_FRAMECHANGED );
|
|
|
|
Ret = TRUE;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case HWNDLOCK_ROUTINE_REDRAWFRAMEANDHOOK:
|
|
|
|
co_WinPosSetWindowPos( Window,
|
|
|
|
HWND_DESKTOP,
|
2009-06-29 03:36:31 +00:00
|
|
|
0,0,0,0,
|
2009-01-03 04:02:54 +00:00
|
|
|
SWP_NOSIZE|
|
|
|
|
SWP_NOMOVE|
|
|
|
|
SWP_NOZORDER|
|
|
|
|
SWP_NOACTIVATE|
|
|
|
|
SWP_FRAMECHANGED );
|
2010-06-03 16:12:43 +00:00
|
|
|
if (!Window->spwndOwner && !IntGetParent(Window))
|
2009-01-03 04:02:54 +00:00
|
|
|
{
|
|
|
|
co_IntShellHookNotify(HSHELL_REDRAW, (LPARAM) hWnd);
|
|
|
|
}
|
|
|
|
Ret = TRUE;
|
2008-03-21 00:07:06 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case HWNDLOCK_ROUTINE_SETFOREGROUNDWINDOW:
|
|
|
|
Ret = co_IntSetForegroundWindow(Window);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case HWNDLOCK_ROUTINE_UPDATEWINDOW:
|
2009-01-03 04:02:54 +00:00
|
|
|
Ret = co_UserRedrawWindow( Window, NULL, 0, RDW_UPDATENOW | RDW_ALLCHILDREN);
|
2008-03-21 00:07:06 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
UserDerefObjectCo(Window);
|
|
|
|
|
|
|
|
RETURN( Ret);
|
|
|
|
|
|
|
|
CLEANUP:
|
|
|
|
DPRINT("Leave NtUserCallHwndLock, ret=%i\n",_ret_);
|
|
|
|
UserLeave();
|
|
|
|
END_CLEANUP;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* @unimplemented
|
|
|
|
*/
|
|
|
|
HWND
|
2008-11-29 22:48:58 +00:00
|
|
|
APIENTRY
|
2008-03-21 00:07:06 +00:00
|
|
|
NtUserCallHwndOpt(
|
2008-03-22 02:53:56 +00:00
|
|
|
HWND hWnd,
|
2008-03-21 00:07:06 +00:00
|
|
|
DWORD Routine)
|
|
|
|
{
|
|
|
|
switch (Routine)
|
|
|
|
{
|
|
|
|
case HWNDOPT_ROUTINE_SETPROGMANWINDOW:
|
2009-04-02 18:52:34 +00:00
|
|
|
GetW32ThreadInfo()->pDeskInfo->hProgmanWindow = hWnd;
|
2008-03-21 00:07:06 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case HWNDOPT_ROUTINE_SETTASKMANWINDOW:
|
2009-04-02 18:52:34 +00:00
|
|
|
GetW32ThreadInfo()->pDeskInfo->hTaskManWindow = hWnd;
|
2008-03-21 00:07:06 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2008-03-22 02:53:56 +00:00
|
|
|
return hWnd;
|
|
|
|
}
|
|
|
|
|
|
|
|
DWORD
|
2008-11-29 22:48:58 +00:00
|
|
|
APIENTRY
|
2008-03-22 02:53:56 +00:00
|
|
|
NtUserCallHwnd(
|
|
|
|
HWND hWnd,
|
|
|
|
DWORD Routine)
|
|
|
|
{
|
|
|
|
switch (Routine)
|
|
|
|
{
|
2009-07-22 04:11:06 +00:00
|
|
|
case HWND_ROUTINE_GETWNDCONTEXTHLPID:
|
|
|
|
{
|
2010-10-11 03:41:41 +00:00
|
|
|
PWND Window;
|
2009-07-22 04:11:06 +00:00
|
|
|
PPROPERTY HelpId;
|
|
|
|
USER_REFERENCE_ENTRY Ref;
|
|
|
|
|
|
|
|
UserEnterExclusive();
|
|
|
|
|
2010-10-11 03:41:41 +00:00
|
|
|
if (!(Window = UserGetWindowObject(hWnd)))
|
2009-07-22 04:11:06 +00:00
|
|
|
{
|
|
|
|
UserLeave();
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
UserRefObjectCo(Window, &Ref);
|
|
|
|
|
|
|
|
HelpId = IntGetProp(Window, gpsi->atomContextHelpIdProp);
|
|
|
|
|
|
|
|
UserDerefObjectCo(Window);
|
|
|
|
UserLeave();
|
|
|
|
return (DWORD)HelpId;
|
|
|
|
}
|
2008-03-22 02:53:56 +00:00
|
|
|
case HWND_ROUTINE_REGISTERSHELLHOOKWINDOW:
|
|
|
|
if (IntIsWindow(hWnd))
|
|
|
|
return IntRegisterShellHookWindow(hWnd);
|
|
|
|
return FALSE;
|
|
|
|
break;
|
|
|
|
case HWND_ROUTINE_DEREGISTERSHELLHOOKWINDOW:
|
|
|
|
if (IntIsWindow(hWnd))
|
|
|
|
return IntDeRegisterShellHookWindow(hWnd);
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
UNIMPLEMENTED;
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
DWORD
|
2008-11-29 22:48:58 +00:00
|
|
|
APIENTRY
|
2008-03-22 02:53:56 +00:00
|
|
|
NtUserCallHwndParam(
|
|
|
|
HWND hWnd,
|
|
|
|
DWORD Param,
|
|
|
|
DWORD Routine)
|
|
|
|
{
|
Patch by Stefan Ginsberg (stefan__100__ AT hotmail DOT com):
- remove NtUserEnumClipboardFormats, use ->ONEPARAM_ROUTINE_ENUMCLIPBOARDFORMAT insetad
- remove NtUserRegisterClipboardFormat, use NtUserRegisterWIndowsMessage instead
- remove NtUserKillSystemTimer, use HWNDPARAM_ROUTINE_KILLSYSTEMTIMER instead
- remove NtUserInsertMenuItem, use NtUserThunkedMenuItemInfo instead
- remove NtUserGetCapture, use THREADSTATE_CAPTUREWINDOW instead
- remove NtUserGetActiveWindow, use THREADSTATE_ACTIVEWINDOW instead
- remove NtUserGetQueueStatus, use ONEPARAM_ROUTIME_GETQUEUESTATUS instead
- remove NtUserGetLastActivePopup, wasn't implemented
- remove NtUserRealizePalette from ntuser.h, it's not implemented
- remove duplicate NtUserGetLastInputInfo from ntuser.h
- remove PrivateCsrssRergisterPrimitive from user32, it was unused and unimplemented
- remove NtUserDereferenceWndprocHandle, it was unused
- move WNDPROC_INFO structure from ntuser.h to win32k/include/class.h, as it's not used in usermode anymore
tested with AbiWord and FF on VMWare
svn path=/trunk/; revision=32825
2008-04-03 02:13:34 +00:00
|
|
|
|
|
|
|
switch (Routine)
|
|
|
|
{
|
|
|
|
case HWNDPARAM_ROUTINE_KILLSYSTEMTIMER:
|
|
|
|
return IntKillTimer(hWnd, (UINT_PTR)Param, TRUE);
|
2009-08-12 06:41:20 +00:00
|
|
|
|
2009-08-12 18:46:34 +00:00
|
|
|
case HWNDPARAM_ROUTINE_SETWNDCONTEXTHLPID:
|
|
|
|
{
|
2010-10-11 03:41:41 +00:00
|
|
|
PWND Window;
|
2009-08-12 18:46:34 +00:00
|
|
|
|
|
|
|
UserEnterExclusive();
|
|
|
|
if(!(Window = UserGetWindowObject(hWnd)))
|
|
|
|
{
|
|
|
|
UserLeave();
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
if ( Param )
|
|
|
|
IntSetProp(Window, gpsi->atomContextHelpIdProp, (HANDLE)Param);
|
|
|
|
else
|
|
|
|
IntRemoveProp(Window, gpsi->atomContextHelpIdProp);
|
|
|
|
|
|
|
|
UserLeave();
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
2009-08-12 06:41:20 +00:00
|
|
|
case HWNDPARAM_ROUTINE_SETDIALOGPOINTER:
|
|
|
|
{
|
|
|
|
PWND pWnd;
|
|
|
|
USER_REFERENCE_ENTRY Ref;
|
|
|
|
|
|
|
|
UserEnterExclusive();
|
|
|
|
|
2010-10-11 03:41:41 +00:00
|
|
|
if (!(pWnd = UserGetWindowObject(hWnd)))
|
2009-08-12 06:41:20 +00:00
|
|
|
{
|
|
|
|
UserLeave();
|
|
|
|
return 0;
|
|
|
|
}
|
2010-10-11 03:41:41 +00:00
|
|
|
UserRefObjectCo(pWnd, &Ref);
|
2009-08-12 06:41:20 +00:00
|
|
|
|
|
|
|
if (pWnd->head.pti->ppi == PsGetCurrentProcessWin32Process() &&
|
2009-08-12 07:42:30 +00:00
|
|
|
pWnd->cbwndExtra == DLGWINDOWEXTRA &&
|
|
|
|
!(pWnd->state & WNDS_SERVERSIDEWINDOWPROC))
|
2009-08-12 06:41:20 +00:00
|
|
|
{
|
|
|
|
if (Param)
|
|
|
|
{
|
|
|
|
if (!pWnd->fnid) pWnd->fnid = FNID_DIALOG;
|
|
|
|
pWnd->state |= WNDS_DIALOGWINDOW;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
pWnd->fnid |= FNID_DESTROY;
|
|
|
|
pWnd->state &= ~WNDS_DIALOGWINDOW;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2010-10-11 03:41:41 +00:00
|
|
|
UserDerefObjectCo(pWnd);
|
2009-08-12 06:41:20 +00:00
|
|
|
UserLeave();
|
|
|
|
return 0;
|
|
|
|
}
|
2010-10-23 05:36:12 +00:00
|
|
|
|
|
|
|
case HWNDPARAM_ROUTINE_ROS_NOTIFYWINEVENT:
|
|
|
|
{
|
|
|
|
PWND pWnd;
|
|
|
|
PNOTIFYEVENT pne;
|
|
|
|
UserEnterExclusive();
|
|
|
|
pne = (PNOTIFYEVENT)Param;
|
|
|
|
if (hWnd)
|
|
|
|
pWnd = UserGetWindowObject(hWnd);
|
|
|
|
else
|
|
|
|
pWnd = NULL;
|
|
|
|
IntNotifyWinEvent(pne->event, pWnd, pne->idObject, pne->idChild, pne->flags);
|
|
|
|
UserLeave();
|
|
|
|
return 0;
|
|
|
|
}
|
Patch by Stefan Ginsberg (stefan__100__ AT hotmail DOT com):
- remove NtUserEnumClipboardFormats, use ->ONEPARAM_ROUTINE_ENUMCLIPBOARDFORMAT insetad
- remove NtUserRegisterClipboardFormat, use NtUserRegisterWIndowsMessage instead
- remove NtUserKillSystemTimer, use HWNDPARAM_ROUTINE_KILLSYSTEMTIMER instead
- remove NtUserInsertMenuItem, use NtUserThunkedMenuItemInfo instead
- remove NtUserGetCapture, use THREADSTATE_CAPTUREWINDOW instead
- remove NtUserGetActiveWindow, use THREADSTATE_ACTIVEWINDOW instead
- remove NtUserGetQueueStatus, use ONEPARAM_ROUTIME_GETQUEUESTATUS instead
- remove NtUserGetLastActivePopup, wasn't implemented
- remove NtUserRealizePalette from ntuser.h, it's not implemented
- remove duplicate NtUserGetLastInputInfo from ntuser.h
- remove PrivateCsrssRergisterPrimitive from user32, it was unused and unimplemented
- remove NtUserDereferenceWndprocHandle, it was unused
- move WNDPROC_INFO structure from ntuser.h to win32k/include/class.h, as it's not used in usermode anymore
tested with AbiWord and FF on VMWare
svn path=/trunk/; revision=32825
2008-04-03 02:13:34 +00:00
|
|
|
}
|
|
|
|
|
2008-03-22 02:53:56 +00:00
|
|
|
UNIMPLEMENTED;
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
DWORD
|
2008-11-29 22:48:58 +00:00
|
|
|
APIENTRY
|
2008-03-22 02:53:56 +00:00
|
|
|
NtUserCallHwndParamLock(
|
|
|
|
HWND hWnd,
|
|
|
|
DWORD Param,
|
|
|
|
DWORD Routine)
|
|
|
|
{
|
2010-01-30 04:23:58 +00:00
|
|
|
DWORD Ret = 0;
|
2010-10-11 03:41:41 +00:00
|
|
|
PWND Window;
|
2010-01-30 04:23:58 +00:00
|
|
|
USER_REFERENCE_ENTRY Ref;
|
|
|
|
DECLARE_RETURN(DWORD);
|
|
|
|
|
2011-03-05 12:17:23 +00:00
|
|
|
DPRINT("Enter NtUserCallHwndParamLock\n");
|
2010-01-30 04:23:58 +00:00
|
|
|
UserEnterExclusive();
|
|
|
|
|
2010-10-11 03:41:41 +00:00
|
|
|
if (!(Window = UserGetWindowObject(hWnd)))
|
2010-01-30 04:23:58 +00:00
|
|
|
{
|
|
|
|
RETURN( FALSE);
|
|
|
|
}
|
|
|
|
UserRefObjectCo(Window, &Ref);
|
|
|
|
|
|
|
|
switch (Routine)
|
|
|
|
{
|
|
|
|
case TWOPARAM_ROUTINE_VALIDATERGN:
|
|
|
|
Ret = (DWORD)co_UserRedrawWindow( Window, NULL, (HRGN)Param, RDW_VALIDATE);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
UserDerefObjectCo(Window);
|
|
|
|
|
|
|
|
RETURN( Ret);
|
|
|
|
|
|
|
|
CLEANUP:
|
2011-03-05 12:17:23 +00:00
|
|
|
DPRINT("Leave NtUserCallHwndParamLock, ret=%i\n",_ret_);
|
2010-01-30 04:23:58 +00:00
|
|
|
UserLeave();
|
|
|
|
END_CLEANUP;
|
2008-03-22 02:53:56 +00:00
|
|
|
|
2008-03-21 00:07:06 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* EOF */
|