Inform kernel whether Unicode or Ansi window proc is preferred

svn path=/trunk/; revision=7899
This commit is contained in:
Gé van Geldorp 2004-01-28 20:54:30 +00:00
parent 3d25387466
commit eb980ec861
2 changed files with 12 additions and 5 deletions

View file

@ -1,4 +1,4 @@
/* $Id: message.c,v 1.34 2004/01/26 08:44:51 weiden Exp $
/* $Id: message.c,v 1.35 2004/01/28 20:54:30 gvg Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS user32.dll
@ -703,6 +703,7 @@ SendMessageW(HWND Wnd,
NTUSERSENDMESSAGEINFO Info;
LRESULT Result;
Info.Ansi = FALSE;
Result = NtUserSendMessage(Wnd, Msg, wParam, lParam, &Info);
if (! Info.HandledByKernel)
{
@ -734,6 +735,7 @@ SendMessageA(HWND Wnd, UINT Msg, WPARAM wParam, LPARAM lParam)
return FALSE;
}
Info.Ansi = TRUE;
Result = NtUserSendMessage(UcMsg.hwnd, UcMsg.message,
UcMsg.wParam, UcMsg.lParam, &Info);
if (! Info.HandledByKernel)

View file

@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/* $Id: message.c,v 1.47 2004/01/27 13:21:35 gvg Exp $
/* $Id: message.c,v 1.48 2004/01/28 20:54:30 gvg Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@ -914,9 +914,14 @@ NtUserSendMessage(HWND Wnd,
{
if (0xFFFF0000 != ((DWORD) Window->WndProcA & 0xFFFF0000))
{
/* Both Unicode and Ansi winprocs are real */
Info.Ansi = ! Window->Unicode;
Info.Proc = (Window->Unicode ? Window->WndProcW : Window->WndProcA);
/* Both Unicode and Ansi winprocs are real, see what usermode prefers */
Status = MmCopyFromCaller(&(Info.Ansi), &(UnsafeInfo->Ansi),
sizeof(BOOL));
if (! NT_SUCCESS(Status))
{
Info.Ansi = ! Window->Unicode;
}
Info.Proc = (Info.Ansi ? Window->WndProcA : Window->WndProcW);
}
else
{