mirror of
https://github.com/reactos/reactos.git
synced 2024-09-15 07:05:04 +00:00
[win32k]
-Amend to r41772. Allow PostMessage to handle DDE messages svn path=/trunk/; revision=49957
This commit is contained in:
parent
ca9bd80182
commit
5f879a1245
|
@ -977,10 +977,42 @@ UserPostMessage( HWND Wnd,
|
||||||
LPARAM lParam )
|
LPARAM lParam )
|
||||||
{
|
{
|
||||||
PTHREADINFO pti;
|
PTHREADINFO pti;
|
||||||
MSG Message;
|
MSG Message, KernelModeMsg;
|
||||||
LARGE_INTEGER LargeTickCount;
|
LARGE_INTEGER LargeTickCount;
|
||||||
|
PMSGMEMORY MsgMemoryEntry;
|
||||||
|
|
||||||
if (FindMsgMemory(Msg) != 0)
|
Message.hwnd = Wnd;
|
||||||
|
Message.message = Msg;
|
||||||
|
Message.wParam = wParam;
|
||||||
|
Message.lParam = lParam;
|
||||||
|
Message.pt = gpsi->ptCursor;
|
||||||
|
KeQueryTickCount(&LargeTickCount);
|
||||||
|
Message.time = MsqCalculateMessageTime(&LargeTickCount);
|
||||||
|
|
||||||
|
MsgMemoryEntry = FindMsgMemory(Message.message);
|
||||||
|
|
||||||
|
if( Msg >= WM_DDE_FIRST && Msg <= WM_DDE_LAST )
|
||||||
|
{
|
||||||
|
NTSTATUS Status;
|
||||||
|
|
||||||
|
Status = CopyMsgToKernelMem(&KernelModeMsg, &Message, MsgMemoryEntry);
|
||||||
|
if (! NT_SUCCESS(Status))
|
||||||
|
{
|
||||||
|
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
co_IntSendMessageNoWait(KernelModeMsg.hwnd,
|
||||||
|
KernelModeMsg.message,
|
||||||
|
KernelModeMsg.wParam,
|
||||||
|
KernelModeMsg.lParam);
|
||||||
|
|
||||||
|
if(MsgMemoryEntry)
|
||||||
|
ExFreePool((PVOID) KernelModeMsg.lParam);
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (MsgMemoryEntry)
|
||||||
{
|
{
|
||||||
SetLastWin32Error(ERROR_MESSAGE_SYNC_ONLY );
|
SetLastWin32Error(ERROR_MESSAGE_SYNC_ONLY );
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -1042,13 +1074,6 @@ UserPostMessage( HWND Wnd,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Message.hwnd = Wnd;
|
|
||||||
Message.message = Msg;
|
|
||||||
Message.wParam = wParam;
|
|
||||||
Message.lParam = lParam;
|
|
||||||
Message.pt = gpsi->ptCursor;
|
|
||||||
KeQueryTickCount(&LargeTickCount);
|
|
||||||
Message.time = MsqCalculateMessageTime(&LargeTickCount);
|
|
||||||
MsqPostMessage(Window->head.pti->MessageQueue, &Message, FALSE, QS_POSTMESSAGE);
|
MsqPostMessage(Window->head.pti->MessageQueue, &Message, FALSE, QS_POSTMESSAGE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue