diff --git a/reactos/subsystems/win32/win32k/ntuser/event.c b/reactos/subsystems/win32/win32k/ntuser/event.c index 0eb1168fb6b..9c1b23f6e94 100644 --- a/reactos/subsystems/win32/win32k/ntuser/event.c +++ b/reactos/subsystems/win32/win32k/ntuser/event.c @@ -165,7 +165,7 @@ co_EVENT_CallEvents( DWORD event, hwnd, pEP->idObject, pEP->idChild, - (DWORD)(NtCurrentTeb()->ClientId).UniqueThread, + (DWORD_PTR)(NtCurrentTeb()->ClientId).UniqueThread, (DWORD)EngGetTickCount(), pEH->Proc); return Result; @@ -202,7 +202,7 @@ IntNotifyWinEvent( if (pEH->head.pti->pEThread != PsGetCurrentThread()) { // if all process || all thread || other thread same process if (!(pEH->idProcess) || !(pEH->idThread) || - (NtCurrentTeb()->ClientId.UniqueProcess == (PVOID)pEH->idProcess)) + (NtCurrentTeb()->ClientId.UniqueProcess == (PVOID)(DWORD_PTR)pEH->idProcess)) { Result = IntCallLowLevelEvent( pEH, Event, @@ -213,7 +213,7 @@ IntNotifyWinEvent( }// if ^skip own thread && ((Pid && CPid == Pid && ^skip own process) || all process) else if ( !(pEH->Flags & WINEVENT_SKIPOWNTHREAD) && ( ((pEH->idProcess && - NtCurrentTeb()->ClientId.UniqueProcess == (PVOID)pEH->idProcess) && + NtCurrentTeb()->ClientId.UniqueProcess == (PVOID)(DWORD_PTR)pEH->idProcess) && !(pEH->Flags & WINEVENT_SKIPOWNPROCESS)) || !pEH->idProcess ) ) { diff --git a/reactos/subsystems/win32/win32k/ntuser/hook.c b/reactos/subsystems/win32/win32k/ntuser/hook.c index 99a6a109326..a59444b9f60 100644 --- a/reactos/subsystems/win32/win32k/ntuser/hook.c +++ b/reactos/subsystems/win32/win32k/ntuser/hook.c @@ -1136,7 +1136,7 @@ NtUserSetWindowsHookEx(HINSTANCE Mod, Mod = NULL; Global = FALSE; - if (!NT_SUCCESS(PsLookupThreadByThreadId((HANDLE) ThreadId, &Thread))) + if (!NT_SUCCESS(PsLookupThreadByThreadId((HANDLE)(DWORD_PTR) ThreadId, &Thread))) { DPRINT1("Invalid thread id 0x%x\n", ThreadId); SetLastWin32Error(ERROR_INVALID_PARAMETER); diff --git a/reactos/subsystems/win32/win32k/ntuser/kbdlayout.c b/reactos/subsystems/win32/win32k/ntuser/kbdlayout.c index c43a6c2aae5..ec07d34a82a 100644 --- a/reactos/subsystems/win32/win32k/ntuser/kbdlayout.c +++ b/reactos/subsystems/win32/win32k/ntuser/kbdlayout.c @@ -228,7 +228,7 @@ static PKBL UserLoadDllAndCreateKbl(DWORD LocaleId) hKl |= 0xe001 << 16; /* FIXME */ else hKl |= hKl << 16; - NewKbl->hkl = (HKL) hKl; + NewKbl->hkl = (HKL)(ULONG_PTR) hKl; NewKbl->klid = LocaleId; NewKbl->Flags = 0; NewKbl->RefCount = 0; @@ -453,7 +453,7 @@ UserGetKeyboardLayout( return W32Thread->KeyboardLayout->hkl; } - Status = PsLookupThreadByThreadId((HANDLE)dwThreadId, &Thread); + Status = PsLookupThreadByThreadId((HANDLE)(DWORD_PTR)dwThreadId, &Thread); if(!NT_SUCCESS(Status)) { SetLastWin32Error(ERROR_INVALID_PARAMETER); diff --git a/reactos/subsystems/win32/win32k/ntuser/msgqueue.c b/reactos/subsystems/win32/win32k/ntuser/msgqueue.c index 27e029a3127..b7f3c4b285a 100644 --- a/reactos/subsystems/win32/win32k/ntuser/msgqueue.c +++ b/reactos/subsystems/win32/win32k/ntuser/msgqueue.c @@ -456,7 +456,7 @@ co_MsqTranslateMouseMessage(PUSER_MESSAGE_QUEUE MessageQueue, PWINDOW_OBJECT Win *ScreenPoint = Message->Msg.pt; - if((Window != NULL && (int)Window != 1 && CaptureWindow->hSelf != Window->hSelf) || + if((Window != NULL && PtrToInt(Window) != 1 && CaptureWindow->hSelf != Window->hSelf) || ((FilterLow != 0 || FilterHigh != 0) && (Msg < FilterLow || Msg > FilterHigh))) { /* Reject the message because it doesn't match the filter */ @@ -1374,7 +1374,7 @@ co_MsqFindMessage(IN PUSER_MESSAGE_QUEUE MessageQueue, { CurrentMessage = CONTAINING_RECORD(CurrentEntry, USER_MESSAGE, ListEntry); - if ((!Window || (int)Window == 1 || Window->hSelf == CurrentMessage->Msg.hwnd) && + if ((!Window || PtrToInt(Window) == 1 || Window->hSelf == CurrentMessage->Msg.hwnd) && ((MsgFilterLow == 0 && MsgFilterHigh == 0) || (MsgFilterLow <= CurrentMessage->Msg.message && MsgFilterHigh >= CurrentMessage->Msg.message))) @@ -1985,7 +1985,7 @@ MsqGetFirstTimerExpiry(PUSER_MESSAGE_QUEUE MessageQueue, Timer = CONTAINING_RECORD(MessageQueue->TimerListHead.Flink, TIMER_ENTRY, ListEntry); EnumEntry = EnumEntry->Flink; - if ((NULL == WndFilter || (int)WndFilter == 1 || Timer->Wnd == WndFilter->hSelf) && + if ((NULL == WndFilter || PtrToInt(WndFilter) == 1 || Timer->Wnd == WndFilter->hSelf) && ((MsgFilterMin == 0 && MsgFilterMax == 0) || (MsgFilterMin <= Timer->Msg && Timer->Msg <= MsgFilterMax))) diff --git a/reactos/subsystems/win32/win32k/ntuser/simplecall.c b/reactos/subsystems/win32/win32k/ntuser/simplecall.c index 5f47f3918f0..2c978cb909c 100644 --- a/reactos/subsystems/win32/win32k/ntuser/simplecall.c +++ b/reactos/subsystems/win32/win32k/ntuser/simplecall.c @@ -492,7 +492,7 @@ NtUserCallHwndLock( if (!((Wnd->style & (WS_CHILD | WS_POPUP)) != WS_CHILD)) break; - if(!(Menu = UserGetMenuObject((HMENU) Wnd->IDMenu))) + if(!(Menu = UserGetMenuObject((HMENU)(DWORD_PTR) Wnd->IDMenu))) break; Menu->MenuInfo.WndOwner = hWnd;