66 ERR(
"Screensaver is Idle\n");
72 if (ForegroundQueue && ForegroundQueue->
spwndActive)
131 PVOID WaitObjects[4], pSignaledObject =
NULL;
133 ULONG cWaitObjects = 0, cMaxWaitObjects = 2;
185 TRACE(
"Mouse connected!\n");
195 TRACE(
"Keyboard connected!\n");
234 WaitObjects[cWaitObjects++] = &pMouDevice->Event;
254 WaitObjects[cWaitObjects++] = &pKbdDevice->Event;
258 if (cWaitObjects == cMaxWaitObjects)
277 (pSignaledObject == &pMouDevice->Event))
279 MouStatus = MouIosb.
Status;
282 (pSignaledObject == &pKbdDevice->Event))
284 KbdStatus = KbdIosb.
Status;
301 TRACE(
"MouseEvent\n");
312 ERR(
"Failed to read from mouse: %x.\n", MouStatus);
317 TRACE(
"KeyboardEvent: %s %04x\n",
330 ERR(
"Failed to read from keyboard: %x.\n", KbdStatus);
349 ERR(
"Raw Input Thread Exit!\n");
365 ERR(
"Failed to allocate memory\n");
401 OldBlock = pti->
rpdesk->BlockInputThread;
409 pti->
rpdesk->BlockInputThread = (BlockIt ? pti :
NULL);
410 return OldBlock ==
NULL;
413 pti->
rpdesk->BlockInputThread = (BlockIt ? pti :
NULL);
414 return OldBlock ==
NULL;
424 TRACE(
"Enter NtUserBlockInput\n");
430 TRACE(
"Leave NtUserBlockInput, ret=%i\n",
ret);
452 if (pai->
pti2 == pti)
458 if (pai->
pti1 == pti)
468 if (!pai && !ptiFrom && !ptiTo)
break;
510 ERR(
"Attach Allocated! ptiFrom 0x%p ptiTo 0x%p paiCount %d\n",ptiFrom,ptiTo,
paiCount);
519 ERR(
"ptiFrom is Foreground\n");
533 ERR(
"ptiFrom NOT Foreground\n");
561 ERR(
"ptiTo receiving ptiFrom Cursor\n");
572 ERR(
"Attach Threads are already associated!\n");
584 while (*ppai !=
NULL)
586 if ( (*ppai)->pti2 == ptiTo && (*ppai)->pti1 == ptiFrom )
596 ppai = &((*ppai)->paiNext);
601 ERR(
"Attach Free! ptiFrom 0x%p ptiTo 0x%p paiCount %d\n",ptiFrom,ptiTo,
paiCount);
610 ERR(
"ptiTo is now pti FG.\n");
624 if (spwndActive->
head.pti == ptiFrom)
632 if (spwndFocus->
head.pti == ptiFrom)
642 ERR(
"Detaching Threads are not associated!\n");
675 TRACE(
"Enter NtUserAttachThreadInput %s\n",(fAttach ?
"TRUE" :
"FALSE" ));
680 if ( !pti || !ptiTo )
682 TRACE(
"AttachThreadInput pti or ptiTo NULL.\n");
690 TRACE(
"AttachThreadInput Error Status 0x%x. \n",
Status);
696 TRACE(
"Leave NtUserAttachThreadInput, ret=%d\n",Ret);
716 TRACE(
"Enter NtUserSendInput\n");
727 if (!nInputs || !pInput || cbSize !=
sizeof(
INPUT))
756 switch (SafeInput.
type)
767 FIXME(
"INPUT_HARDWARE not supported!\n");
770 ERR(
"SendInput(): Invalid input type: 0x%x\n", SafeInput.
type);
776 TRACE(
"Leave NtUserSendInput, ret=%u\n", uRet);
#define UlongToHandle(ul)
#define DBG_DEFAULT_CHANNEL(ch)
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
static HANDLE ShutdownEvent
#define NT_SUCCESS(StatCode)
#define ERROR_INVALID_PARAMETER
#define ERROR_ACCESS_DENIED
static void cleanup(void)
#define EngGetTickCount32()
#define ExAllocatePoolWithTag(hernya, size, tag)
#define PsGetCurrentThread()
IN PDCB IN PCCB IN VBO IN OUT PULONG OUT PDIRENT OUT PBCB OUT PVBO ByteOffset
PUSER_MESSAGE_QUEUE gpqForeground
_Must_inspect_result_ _In_ WAIT_TYPE _In_opt_ PLARGE_INTEGER _In_opt_ PKWAIT_BLOCK WaitBlockArray
#define TIF_DONTATTACHQUEUE
#define UserHMGetHandle(obj)
struct _THREADINFO * GetW32ThreadInfo(VOID)
#define OBJ_KERNEL_HANDLE
NTSYSAPI ULONG WINAPI RtlNtStatusToDosError(NTSTATUS)
#define LOW_REALTIME_PRIORITY
#define ExFreePoolWithTag(_P, _T)
#define InitializeObjectAttributes(p, n, a, r, s)
VOID FASTCALL co_MsqInsertMouseMessage(MSG *Msg, DWORD flags, ULONG_PTR dwExtraInfo, BOOL Hook)
VOID FASTCALL MsqDestroyMessageQueue(_In_ PTHREADINFO pti)
PUSER_MESSAGE_QUEUE FASTCALL MsqCreateMessageQueue(PTHREADINFO pti)
#define IntReferenceMessageQueue(MsgQueue)
#define IntDereferenceMessageQueue(MsgQueue)
NTSYSAPI NTSTATUS NTAPI ZwCancelIoFile(_In_ HANDLE FileHandle, _Out_ PIO_STATUS_BLOCK IoStatusBlock)
NTSYSAPI NTSTATUS NTAPI ZwOpenFile(_Out_ PHANDLE FileHandle, _In_ ACCESS_MASK DesiredAccess, _In_ POBJECT_ATTRIBUTES ObjectAttributes, _Out_ PIO_STATUS_BLOCK IoStatusBlock, _In_ ULONG ShareAccess, _In_ ULONG OpenOptions)
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
NTSTATUS NTAPI KeWaitForMultipleObjects(IN ULONG Count, IN PVOID Object[], IN WAIT_TYPE WaitType, IN KWAIT_REASON WaitReason, IN KPROCESSOR_MODE WaitMode, IN BOOLEAN Alertable, IN PLARGE_INTEGER Timeout OPTIONAL, OUT PKWAIT_BLOCK WaitBlockArray OPTIONAL)
PVOID NTAPI PsGetCurrentThreadWin32Thread(VOID)
PWINSTATION_OBJECT InputWindowStation
BOOL FASTCALL UserSetProcessWindowStation(HWINSTA hWindowStation)
VOID FASTCALL UserLeave(VOID)
VOID FASTCALL UserEnterExclusive(VOID)
NTSTATUS NTAPI ObCloseHandle(IN HANDLE Handle, IN KPROCESSOR_MODE AccessMode)
NTSTATUS NTAPI ObOpenObjectByPointer(IN PVOID Object, IN ULONG HandleAttributes, IN PACCESS_STATE PassedAccessState, IN ACCESS_MASK DesiredAccess, IN POBJECT_TYPE ObjectType, IN KPROCESSOR_MODE AccessMode, OUT PHANDLE Handle)
NTSTATUS NTAPI ObReferenceObjectByHandle(IN HANDLE Handle, IN ACCESS_MASK DesiredAccess, IN POBJECT_TYPE ObjectType, IN KPROCESSOR_MODE AccessMode, OUT PVOID *Object, OUT POBJECT_HANDLE_INFORMATION HandleInformation OPTIONAL)
NTSTATUS NTAPI PoRequestShutdownEvent(OUT PVOID *Event)
struct _ATTACHINFO * paiNext
struct _CLIENTINFO * pClientInfo
struct _USER_MESSAGE_QUEUE * MessageQueue
KPRIORITY NTAPI KeSetPriorityThread(IN PKTHREAD Thread, IN KPRIORITY Priority)
VOID NTAPI KeInitializeTimer(OUT PKTIMER Timer)
TW_UINT32 TW_UINT16 TW_UINT16 MSG
#define RtlCopyMemory(Destination, Source, Length)
#define STATUS_ACCESS_DENIED
#define STATUS_INVALID_PARAMETER
#define STATUS_UNSUCCESSFUL
#define LN_START_SCREENSAVE
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_opt_ PCUNICODE_STRING DeviceName
#define W32PF_IDLESCREENSAVER
POBJECT_TYPE ExWindowStationObjectType
VOID FASTCALL SetLastNtError(_In_ NTSTATUS Status)
VOID FASTCALL IntSetFocusMessageQueue(PUSER_MESSAGE_QUEUE NewQueue)
PUSER_MESSAGE_QUEUE FASTCALL IntGetFocusMessageQueue(VOID)
#define IntIsActiveDesktop(Desktop)
PTHREADINFO gptiForeground
BOOL FASTCALL UserRegisterHotKey(PWND pWnd, int id, UINT fsModifiers, UINT vk)
VOID FASTCALL StartDebugHotKeys(VOID)
PPROCESSINFO ppiScrnSaver
BOOL FASTCALL UserPostMessage(HWND Wnd, UINT Msg, WPARAM wParam, LPARAM lParam)
PTHREADINFO FASTCALL IntTID2PTI(HANDLE id)
BOOL FASTCALL UserDereferenceObject(PVOID Object)
BOOL FASTCALL UserObjectInDestroy(HANDLE h)
VOID FASTCALL UserReferenceObject(PVOID obj)
VOID FASTCALL ProcessTimers(VOID)
VOID FASTCALL StartTheTimers(VOID)
ENGAPI VOID APIENTRY EngSetLastError(_In_ ULONG iError)
#define ObDereferenceObject