Fix some 64 bit issues.

svn path=/trunk/; revision=44958
This commit is contained in:
Timo Kreuzer 2010-01-05 20:06:33 +00:00
parent bb5ea9e289
commit b473a12aff
5 changed files with 10 additions and 10 deletions

View file

@ -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 ) )
{

View file

@ -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);

View file

@ -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);

View file

@ -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)))

View file

@ -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;