Author: tkreuzer
Date: Tue Jan  5 21:06:33 2010
New Revision: 44958

URL: http://svn.reactos.org/svn/reactos?rev=44958&view=rev
Log:
[WIN32k]
Fix some 64 bit issues.

Modified:
    trunk/reactos/subsystems/win32/win32k/ntuser/event.c
    trunk/reactos/subsystems/win32/win32k/ntuser/hook.c
    trunk/reactos/subsystems/win32/win32k/ntuser/kbdlayout.c
    trunk/reactos/subsystems/win32/win32k/ntuser/msgqueue.c
    trunk/reactos/subsystems/win32/win32k/ntuser/simplecall.c

Modified: trunk/reactos/subsystems/win32/win32k/ntuser/event.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ntuser/event.c?rev=44958&r1=44957&r2=44958&view=diff
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/event.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/event.c [iso-8859-1] Tue Jan  
5 21:06:33 2010
@@ -165,7 +165,7 @@
                                         hwnd,
                                pEP->idObject,
                                 pEP->idChild,
- (DWORD)(NtCurrentTeb()->ClientId).UniqueThread,
+ (DWORD_PTR)(NtCurrentTeb()->ClientId).UniqueThread,
                     (DWORD)EngGetTickCount(),
                                    pEH->Proc);
    return Result;
@@ -202,7 +202,7 @@
         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 @@
         }// 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 ) )
         {

Modified: trunk/reactos/subsystems/win32/win32k/ntuser/hook.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ntuser/hook.c?rev=44958&r1=44957&r2=44958&view=diff
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/hook.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/hook.c [iso-8859-1] Tue Jan  5 
21:06:33 2010
@@ -1136,7 +1136,7 @@
         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);

Modified: trunk/reactos/subsystems/win32/win32k/ntuser/kbdlayout.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ntuser/kbdlayout.c?rev=44958&r1=44957&r2=44958&view=diff
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/kbdlayout.c [iso-8859-1] 
(original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/kbdlayout.c [iso-8859-1] Tue 
Jan  5 21:06:33 2010
@@ -228,7 +228,7 @@
       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 @@
       return W32Thread->KeyboardLayout->hkl;
    }
 
-   Status = PsLookupThreadByThreadId((HANDLE)dwThreadId, &Thread);
+   Status = PsLookupThreadByThreadId((HANDLE)(DWORD_PTR)dwThreadId, &Thread);
    if(!NT_SUCCESS(Status))
    {
       SetLastWin32Error(ERROR_INVALID_PARAMETER);

Modified: trunk/reactos/subsystems/win32/win32k/ntuser/msgqueue.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ntuser/msgqueue.c?rev=44958&r1=44957&r2=44958&view=diff
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/msgqueue.c [iso-8859-1] 
(original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/msgqueue.c [iso-8859-1] Tue 
Jan  5 21:06:33 2010
@@ -456,7 +456,7 @@
 
    *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 @@
    {
       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 @@
       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)))

Modified: trunk/reactos/subsystems/win32/win32k/ntuser/simplecall.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ntuser/simplecall.c?rev=44958&r1=44957&r2=44958&view=diff
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/simplecall.c [iso-8859-1] 
(original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/simplecall.c [iso-8859-1] Tue 
Jan  5 21:06:33 2010
@@ -492,7 +492,7 @@
             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;


Reply via email to