* ReactOS-specific NtUser calls and their related structures, both which shouldn't exist.
*/
+#define NOPARAM_ROUTINE_ISCONSOLEMODE 0xffff0001
#define NOPARAM_ROUTINE_GETMESSAGEEXTRAINFO 0xffff0005
#define ONEPARAM_ROUTINE_CSRSS_GUICHECK 0xffff0008
#define ONEPARAM_ROUTINE_SWITCHCARETSHOWING 0xfffe0008
#define ONEPARAM_ROUTINE_ENABLEPROCWNDGHSTING 0xfffe000d
#define ONEPARAM_ROUTINE_GETDESKTOPMAPPING 0xfffe000e
#define TWOPARAM_ROUTINE_SETMENUBARHEIGHT 0xfffd0050
+#define TWOPARAM_ROUTINE_EXITREACTOS 0xfffd0051
#define TWOPARAM_ROUTINE_SETGUITHRDHANDLE 0xfffd0052
#define MSQ_STATE_CAPTURE 0x1
#define MSQ_STATE_ACTIVE 0x2
/* Undocumented user definitions */
#include <undocuser.h>
+#include <winlogon.h>
/* Freetype headers */
#include <ft2build.h>
RETURN(0);
}
+ /* this is a Reactos only case and is needed for gui-on-demand */
+ case NOPARAM_ROUTINE_ISCONSOLEMODE:
+ RETURN( ScreenDeviceContext == NULL );
+
default:
ERR("Calling invalid routine number 0x%x in NtUserCallNoParam\n", Routine);
EngSetLastError(ERROR_INVALID_PARAMETER);
case TWOPARAM_ROUTINE_UNHOOKWINDOWSHOOK:
RETURN( IntUnhookWindowsHook((int)Param1, (HOOKPROC)Param2));
+ case TWOPARAM_ROUTINE_EXITREACTOS:
+ if(hwndSAS == NULL)
+ {
+ ASSERT(hwndSAS);
+ RETURN(STATUS_NOT_FOUND);
+ }
+ RETURN( co_IntSendMessage (hwndSAS, PM_WINLOGON_EXITWINDOWS, (WPARAM) Param1, (LPARAM)Param2));
}
ERR("Calling invalid routine number 0x%x in NtUserCallTwoParam(), Param1=0x%x Parm2=0x%x\n",
Routine, Param1, Param2);
BOOL
FASTCALL DtbgIsDesktopVisible(VOID)
{
- HWND VisibleDesktopWindow = GetDesktopWindow(); // DESKTOPWNDPROC
-
- if (VisibleDesktopWindow != NULL &&
- !IsWindowVisible(VisibleDesktopWindow))
- {
- VisibleDesktopWindow = NULL;
- }
-
- return VisibleDesktopWindow != NULL;
+ return !((BOOL)NtUserCallNoParam(NOPARAM_ROUTINE_ISCONSOLEMODE));
}
/* EOF */
#include "resource.h"
#include <debug.h>
-static HWND LogonNotifyWindow = NULL;
static HANDLE LogonProcess = NULL;
CSR_API(CsrRegisterLogonProcess)
CSR_API(CsrSetLogonNotifyWindow)
{
- DWORD WindowCreator;
-
- if (0 == GetWindowThreadProcessId(Request->Data.SetLogonNotifyWindowRequest.LogonNotifyWindow,
- &WindowCreator))
- {
- DPRINT1("Can't get window creator\n");
- return STATUS_INVALID_HANDLE;
- }
- if (WindowCreator != (DWORD_PTR)LogonProcess)
- {
- DPRINT1("Trying to register window not created by winlogon as notify window\n");
- return STATUS_ACCESS_DENIED;
- }
-
- LogonNotifyWindow = Request->Data.SetLogonNotifyWindowRequest.LogonNotifyWindow;
-
return STATUS_SUCCESS;
}
{
NTSTATUS Status;
- if (NULL == LogonNotifyWindow)
- {
- DPRINT1("No LogonNotifyWindow registered\n");
- return STATUS_NOT_FOUND;
- }
-
/* FIXME Inside 2000 says we should impersonate the caller here */
- Status = SendMessageW(LogonNotifyWindow, PM_WINLOGON_EXITWINDOWS,
- (WPARAM) UserProcessId,
- (LPARAM) Flags);
+ Status = NtUserCallTwoParam (UserProcessId, Flags, TWOPARAM_ROUTINE_EXITREACTOS);
+
/* If the message isn't handled, the return value is 0, so 0 doesn't indicate
success. Success is indicated by a 1 return value, if anything besides 0
or 1 it's a NTSTATUS value */