mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-01 19:26:16 +00:00
[Win32k]
- Fix DDE test crash. it's a band-aide. - Fix the last two post quite message test, all pass now. svn path=/trunk/; revision=51239
This commit is contained in:
@@ -320,6 +320,7 @@ PackParam(LPARAM *lParamPacked, UINT Msg, WPARAM wParam, LPARAM lParam, BOOL Non
|
||||
{
|
||||
PMSGMEMORY MsgMemoryEntry;
|
||||
PVOID PackedData;
|
||||
SIZE_T size;
|
||||
|
||||
MsgMemoryEntry = FindMsgMemory(Msg);
|
||||
|
||||
@@ -328,7 +329,13 @@ PackParam(LPARAM *lParamPacked, UINT Msg, WPARAM wParam, LPARAM lParam, BOOL Non
|
||||
/* Keep previous behavior */
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
PackedData = ExAllocatePoolWithTag(NonPagedPool, MsgMemorySize(MsgMemoryEntry, wParam, lParam), TAG_MSG);
|
||||
size = MsgMemorySize(MsgMemoryEntry, wParam, lParam);
|
||||
if (!size)
|
||||
{
|
||||
DPRINT1("No size for lParamPacked\n");
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
PackedData = ExAllocatePoolWithTag(NonPagedPool, size, TAG_MSG);
|
||||
RtlCopyMemory(PackedData, (PVOID)lParam, MsgMemorySize(MsgMemoryEntry, wParam, lParam));
|
||||
*lParamPacked = (LPARAM)PackedData;
|
||||
}
|
||||
@@ -937,11 +944,7 @@ co_IntGetPeekMessage( PMSG pMsg,
|
||||
|
||||
co_HOOK_CallHooks( WH_GETMESSAGE, HC_ACTION, RemoveMsg & PM_REMOVE, (LPARAM)pMsg);
|
||||
|
||||
if ( bGMSG )
|
||||
{
|
||||
Present = (WM_QUIT != pMsg->message);
|
||||
break;
|
||||
}
|
||||
if ( bGMSG ) break;
|
||||
}
|
||||
|
||||
if ( bGMSG )
|
||||
@@ -1044,7 +1047,6 @@ UserPostMessage( HWND Wnd,
|
||||
PTHREADINFO pti;
|
||||
MSG Message, KernelModeMsg;
|
||||
LARGE_INTEGER LargeTickCount;
|
||||
PMSGMEMORY MsgMemoryEntry;
|
||||
|
||||
Message.hwnd = Wnd;
|
||||
Message.message = Msg;
|
||||
@@ -1054,11 +1056,18 @@ UserPostMessage( HWND Wnd,
|
||||
KeQueryTickCount(&LargeTickCount);
|
||||
Message.time = MsqCalculateMessageTime(&LargeTickCount);
|
||||
|
||||
MsgMemoryEntry = FindMsgMemory(Message.message);
|
||||
if (is_pointer_message(Message.message))
|
||||
{
|
||||
EngSetLastError(ERROR_MESSAGE_SYNC_ONLY );
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if( Msg >= WM_DDE_FIRST && Msg <= WM_DDE_LAST )
|
||||
{
|
||||
NTSTATUS Status;
|
||||
PMSGMEMORY MsgMemoryEntry;
|
||||
|
||||
MsgMemoryEntry = FindMsgMemory(Message.message);
|
||||
|
||||
Status = CopyMsgToKernelMem(&KernelModeMsg, &Message, MsgMemoryEntry);
|
||||
if (! NT_SUCCESS(Status))
|
||||
@@ -1077,12 +1086,6 @@ UserPostMessage( HWND Wnd,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if (is_pointer_message(Message.message))
|
||||
{
|
||||
EngSetLastError(ERROR_MESSAGE_SYNC_ONLY );
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (!Wnd)
|
||||
{
|
||||
return UserPostThreadMessage( PtrToInt(PsGetCurrentThreadId()),
|
||||
@@ -1276,8 +1279,8 @@ co_IntSendMessageTimeoutSingle( HWND hWnd,
|
||||
|
||||
if (STATUS_TIMEOUT == Status)
|
||||
{
|
||||
/*
|
||||
MSDN says:
|
||||
/*
|
||||
MSDN says:
|
||||
Microsoft Windows 2000: If GetLastError returns zero, then the function
|
||||
timed out.
|
||||
XP+ : If the function fails or times out, the return value is zero.
|
||||
@@ -1873,7 +1876,7 @@ NtUserGetMessage(PMSG pMsg,
|
||||
_SEH2_END;
|
||||
}
|
||||
|
||||
return Ret;
|
||||
return Ret ? (WM_QUIT != pMsg->message) : FALSE;
|
||||
}
|
||||
|
||||
BOOL APIENTRY
|
||||
|
||||
Reference in New Issue
Block a user