21#define MAX_WINDOW_LESS_TIMER_ID (32768 - 1)
22#define NUM_WINDOW_LESS_TIMERS (32768 - 256)
24#define HINTINDEX_BEGIN_VALUE 0
33#define IntLockWindowlessTimerBitmap() \
34 ExEnterCriticalRegionAndAcquireFastMutexUnsafe(Mutex)
36#define IntUnlockWindowlessTimerBitmap() \
37 ExReleaseFastMutexUnsafeAndLeaveCriticalRegion(Mutex)
39#define TimerEnterExclusive() \
41 KeEnterCriticalRegion(); \
42 ExAcquireResourceExclusiveLite(&TimerLock, TRUE); \
47 ExReleaseResourceLite(&TimerLock); \
48 KeLeaveCriticalRegion(); \
94 if (!Ret)
ERR(
"Warning: Unable to delete timer\n");
114 if ( pTmr->
nID == nID &&
198 TRACE(
"Adjusting uElapse\n");
205 TRACE(
"Adjusting uElapse\n");
213 TRACE(
"Adjusting uElapse\n");
219 if ((
Window) && (IDEvent == 0))
233 ERR(
"Unable to find a free window-less timer id\n");
251 pTmr->
pti =
Window->head.pti->pEThread->Tcb.Win32Thread;
263 pTmr->
pfn = TimerFunc;
299 ERR(
"System Timer Proc has invalid window handle! %p Id: %u\n",
hwnd, idEvent);
305 TRACE(
"Windowless Timer Running!\n" );
345 TRACE(
"Generating WM_NCMOUSEHOVER\n");
366 ERR(
"System Timer Proc invalid id %u!\n", idEvent);
393 TRACE(
"SysemTimerSet: Access Denied!\n");
417 (pTmr->
pti == pti) &&
429 pTmr->
flags &= ~TMRF_READY;
479 pTmr->
flags &= ~TMRF_INIT;
524 TRACE(
"TimerCount = %d\n", TimerCount);
551 return TimersRemoved;
567 if ((pTmr) && (pTmr->
pti == pti))
575 return TimersRemoved;
582 TRACE(
"IntKillTimer Window %p id %uI systemtimer %s\n",
583 Window, IDEvent, SystemTimer ?
"TRUE" :
"FALSE");
646 TRACE(
"Enter NtUserSetTimer\n");
653 TRACE(
"Leave NtUserSetTimer, ret=%u\n",
ret);
670 TRACE(
"Enter NtUserKillTimer\n");
678 TRACE(
"Leave NtUserKillTimer, ret=%i\n",
ret);
695 TRACE(
"Enter NtUserSetSystemTimer\n");
701 TRACE(
"Leave NtUserSetSystemTimer, ret=%u\n",
ret);
#define ALIGN_UP_BY(size, align)
#define DBG_DEFAULT_CHANNEL(ch)
#define RtlInitializeBitMap
#define RtlFindClearBitsAndSet
#define ERROR_ACCESS_DENIED
#define EngGetTickCount32()
#define RemoveEntryList(Entry)
#define InsertTailList(ListHead, Entry)
#define ExAllocatePoolWithTag(hernya, size, tag)
NTSTATUS ExInitializeResourceLite(PULONG res)
#define InitializeListHead(ListHead)
return pRequest CreateTimer()
#define UserHMGetHandle(obj)
#define UserHMSetHandle(obj, handle)
static PLARGE_INTEGER Time
VOID FASTCALL ClearMsgBitsMask(PTHREADINFO pti, UINT MessageBits)
WPARAM FASTCALL MsqGetDownKeyState(PUSER_MESSAGE_QUEUE MessageQueue)
VOID FASTCALL MsqPostMessage(PTHREADINFO pti, MSG *Msg, BOOLEAN HardwareMessage, DWORD MessageBits, DWORD dwQEvent, LONG_PTR ExtraInfo)
VOID CALLBACK HungAppSysTimerProc(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime)
VOID FASTCALL MsqWakeQueue(PTHREADINFO pti, DWORD MessageBits, BOOL KeyEvent)
unsigned __int3264 UINT_PTR
PVOID NTAPI PsGetCurrentThreadWin32Thread(VOID)
VOID FASTCALL UserLeave(VOID)
VOID FASTCALL UserEnterShared(VOID)
VOID FASTCALL UserEnterExclusive(VOID)
struct _LIST_ENTRY * Blink
struct _LIST_ENTRY * Flink
PKEVENT pEventQueueServer
BOOLEAN NTAPI KeSetTimer(IN OUT PKTIMER Timer, IN LARGE_INTEGER DueTime, IN PKDPC Dpc OPTIONAL)
TW_UINT32 TW_UINT16 TW_UINT16 MSG
#define CONTAINING_RECORD(address, type, field)
#define STATUS_UNSUCCESSFUL
#define STATUS_INSUFFICIENT_RESOURCES
BOOL FASTCALL IntFlashWindowEx(PWND pWnd, PFLASHWINFO pfwi)
PWND FASTCALL UserGetWindowObject(HWND hWnd)
_In_ WDFTIMER _In_ LONGLONG DueTime
FORCEINLINE BOOL RECTL_bPointInRect(_In_ const RECTL *prcl, _In_ INT x, _In_ INT y)
BOOL FASTCALL UserPostMessage(HWND Wnd, UINT Msg, WPARAM wParam, LPARAM lParam)
BOOL FASTCALL UserDereferenceObject(PVOID Object)
BOOL FASTCALL UserDeleteObject(HANDLE h, HANDLE_TYPE type)
PUSER_HANDLE_TABLE gHandleTable
PVOID FASTCALL UserCreateObject(PUSER_HANDLE_TABLE ht, PDESKTOP pDesktop, PTHREADINFO pti, HANDLE *h, HANDLE_TYPE type, ULONG size)
BOOL FASTCALL ValidateTimerCallback(PTHREADINFO pti, LPARAM lParam)
BOOL FASTCALL PostTimerMessages(PWND Window)
VOID CALLBACK SystemTimerProc(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime)
#define HINTINDEX_BEGIN_VALUE
#define IntLockWindowlessTimerBitmap()
PTIMER FASTCALL FindSystemTimer(PMSG pMsg)
UINT_PTR APIENTRY NtUserSetSystemTimer(HWND hWnd, UINT_PTR nIDEvent, UINT uElapse, TIMERPROC lpTimerFunc)
NTSTATUS NTAPI InitTimerImpl(VOID)
#define IntUnlockWindowlessTimerBitmap()
static LIST_ENTRY TimersListHead
UINT_PTR FASTCALL SystemTimerSet(PWND Window, UINT_PTR nIDEvent, UINT uElapse, TIMERPROC lpTimerFunc)
static BOOL FASTCALL RemoveTimer(PTIMER pTmr)
BOOL APIENTRY NtUserValidateTimerCallback(LPARAM lParam)
UINT_PTR APIENTRY NtUserSetTimer(HWND hWnd, UINT_PTR nIDEvent, UINT uElapse, TIMERPROC lpTimerFunc)
VOID FASTCALL ProcessTimers(VOID)
BOOL FASTCALL IntKillTimer(PWND Window, UINT_PTR IDEvent, BOOL SystemTimer)
PTIMER FASTCALL FindTimer(PWND Window, UINT_PTR nID, UINT flags)
BOOL FASTCALL DestroyTimersForWindow(PTHREADINFO pti, PWND Window)
#define NUM_WINDOW_LESS_TIMERS
BOOL APIENTRY NtUserKillTimer(HWND hWnd, UINT_PTR uIDEvent)
#define MAX_WINDOW_LESS_TIMER_ID
static RTL_BITMAP WindowLessTimersBitMap
#define TimerEnterExclusive()
static PVOID WindowLessTimersBitMapBuffer
VOID FASTCALL StartTheTimers(VOID)
BOOL FASTCALL DestroyTimersForThread(PTHREADINFO pti)
UINT_PTR FASTCALL IntSetTimer(PWND Window, UINT_PTR IDEvent, UINT Elapse, TIMERPROC TimerFunc, INT Type)
#define ID_EVENT_SYSTIMER_MOUSEHOVER
#define ID_EVENT_SYSTIMER_FLASHWIN
ENGAPI VOID APIENTRY EngSetLastError(_In_ ULONG iError)
#define ERROR_NO_SYSTEM_RESOURCES
#define QS_ALLPOSTMESSAGE
#define USER_TIMER_MAXIMUM
#define USER_TIMER_MINIMUM
VOID(CALLBACK * TIMERPROC)(HWND, UINT, UINT_PTR, DWORD)
FORCEINLINE VOID ExInitializeFastMutex(_Out_ PFAST_MUTEX FastMutex)
#define PsGetCurrentProcess