Sync with trunk r43123
[reactos.git] / reactos / subsystems / win32 / win32k / ntuser / hook.c
index 7b9b545..f816597 100644 (file)
@@ -296,7 +296,7 @@ IntCallLowLevelHook(PHOOK Hook, INT Code, WPARAM wParam, LPARAM lParam)
     /* FIXME should get timeout from
      * HKEY_CURRENT_USER\Control Panel\Desktop\LowLevelHooksTimeout */
     Status = co_MsqSendMessage(((PTHREADINFO)Hook->Thread->Tcb.Win32Thread)->MessageQueue,
-                                (HWND)Code,
+                                (HWND)(UINT_PTR)Code,
                                 Hook->HookId,
                                 wParam,
                                 lParam,
@@ -1133,7 +1133,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);
@@ -1339,5 +1339,5 @@ CLEANUP:
     UserLeave();
     END_CLEANUP;
 }
+
 /* EOF */