Author: tkreuzer
Date: Sun Jul 26 22:31:23 2009
New Revision: 42238
URL:
http://svn.reactos.org/svn/reactos?rev=42238&view=rev
Log:
Fix some 64 bit isuues.
Modified:
branches/ros-amd64-bringup/reactos/subsystems/win32/win32k/ntuser/event.c
branches/ros-amd64-bringup/reactos/subsystems/win32/win32k/ntuser/hook.c
branches/ros-amd64-bringup/reactos/subsystems/win32/win32k/ntuser/message.c
branches/ros-amd64-bringup/reactos/subsystems/win32/win32k/ntuser/simplecall.c
Modified: branches/ros-amd64-bringup/reactos/subsystems/win32/win32k/ntuser/event.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/subsy…
==============================================================================
--- branches/ros-amd64-bringup/reactos/subsystems/win32/win32k/ntuser/event.c [iso-8859-1]
(original)
+++ branches/ros-amd64-bringup/reactos/subsystems/win32/win32k/ntuser/event.c [iso-8859-1]
Sun Jul 26 22:31:23 2009
@@ -155,7 +155,7 @@
hwnd,
pEP->idObject,
pEP->idChild,
- (DWORD)(NtCurrentTeb()->ClientId).UniqueThread,
+ (DWORD_PTR)(NtCurrentTeb()->ClientId).UniqueThread,
(DWORD)EngGetTickCount(),
pEH->Proc);
return Result;
@@ -185,14 +185,14 @@
if ((pEH->Thread != PsGetCurrentThread()) && (pEH->Thread !=
NULL))
{ // 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, Window->hSelf, idObject,
idChild);
}
}// 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: branches/ros-amd64-bringup/reactos/subsystems/win32/win32k/ntuser/hook.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/subsy…
==============================================================================
--- branches/ros-amd64-bringup/reactos/subsystems/win32/win32k/ntuser/hook.c [iso-8859-1]
(original)
+++ branches/ros-amd64-bringup/reactos/subsystems/win32/win32k/ntuser/hook.c [iso-8859-1]
Sun Jul 26 22:31:23 2009
@@ -1082,7 +1082,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: branches/ros-amd64-bringup/reactos/subsystems/win32/win32k/ntuser/message.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/subsy…
==============================================================================
--- branches/ros-amd64-bringup/reactos/subsystems/win32/win32k/ntuser/message.c
[iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/subsystems/win32/win32k/ntuser/message.c
[iso-8859-1] Sun Jul 26 22:31:23 2009
@@ -978,7 +978,7 @@
PWINDOW_OBJECT Window;
PMSGMEMORY MsgMemoryEntry;
PVOID UserMem;
- UINT Size;
+ SIZE_T Size;
USER_MESSAGE Msg;
DECLARE_RETURN(BOOL);
@@ -1021,18 +1021,18 @@
Info.LParamSize = Size;
UserMem = NULL;
Status = ZwAllocateVirtualMemory(NtCurrentProcess(), &UserMem, 0,
- &Info.LParamSize, MEM_COMMIT,
PAGE_READWRITE);
+ &Size, MEM_COMMIT, PAGE_READWRITE);
if (! NT_SUCCESS(Status))
{
SetLastNtError(Status);
RETURN( (BOOL) -1);
}
/* Transfer lParam data to user-mode mem */
- Status = MmCopyToCaller(UserMem, (PVOID) Info.Msg.lParam, Size);
+ Status = MmCopyToCaller(UserMem, (PVOID) Info.Msg.lParam, Info.LParamSize);
if (! NT_SUCCESS(Status))
{
ZwFreeVirtualMemory(NtCurrentProcess(), (PVOID *) &UserMem,
- &Info.LParamSize, MEM_RELEASE);
+ &Size, MEM_RELEASE);
SetLastNtError(Status);
RETURN( (BOOL) -1);
}
@@ -1111,7 +1111,7 @@
PWINDOW_OBJECT Window = NULL;
PMSGMEMORY MsgMemoryEntry;
PVOID UserMem;
- UINT Size;
+ SIZE_T Size;
USER_MESSAGE Msg;
DECLARE_RETURN(BOOL);
// USER_REFERENCE_ENTRY Ref;
@@ -1155,7 +1155,7 @@
Info.LParamSize = Size;
UserMem = NULL;
Status = ZwAllocateVirtualMemory(NtCurrentProcess(), &UserMem, 0,
- &Info.LParamSize, MEM_COMMIT,
PAGE_READWRITE);
+ &Size, MEM_COMMIT, PAGE_READWRITE);
if (! NT_SUCCESS(Status))
{
@@ -1163,11 +1163,11 @@
RETURN( (BOOL) -1);
}
/* Transfer lParam data to user-mode mem */
- Status = MmCopyToCaller(UserMem, (PVOID) Info.Msg.lParam, Size);
+ Status = MmCopyToCaller(UserMem, (PVOID) Info.Msg.lParam, Info.LParamSize);
if (! NT_SUCCESS(Status))
{
ZwFreeVirtualMemory(NtCurrentProcess(), (PVOID *) &UserMem,
- &Info.LParamSize, MEM_DECOMMIT);
+ &Size, MEM_DECOMMIT);
SetLastNtError(Status);
RETURN( (BOOL) -1);
}
@@ -1409,7 +1409,7 @@
DPRINT("Enter NtUserPostThreadMessage\n");
UserEnterExclusive();
- Status = PsLookupThreadByThreadId((HANDLE)idThread,&peThread);
+ Status = PsLookupThreadByThreadId((HANDLE)(DWORD_PTR)idThread,&peThread);
if( Status == STATUS_SUCCESS )
{
Modified: branches/ros-amd64-bringup/reactos/subsystems/win32/win32k/ntuser/simplecall.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/subsy…
==============================================================================
--- branches/ros-amd64-bringup/reactos/subsystems/win32/win32k/ntuser/simplecall.c
[iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/subsystems/win32/win32k/ntuser/simplecall.c
[iso-8859-1] Sun Jul 26 22:31:23 2009
@@ -749,7 +749,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;