mirror of
https://github.com/reactos/reactos.git
synced 2024-07-31 00:28:56 +00:00
- Patch by Yuriy Sidorov <jura at cp-lab.com> , NtUserToUnicodeEx should return zero if key in lpKeyState array is not pressed.
svn path=/trunk/; revision=35117
This commit is contained in:
parent
0fd48bec89
commit
1dbbf02a7e
|
@ -711,6 +711,10 @@ NtUserToUnicodeEx(
|
|||
DPRINT1( "Couldn't copy key state from caller.\n" );
|
||||
RETURN(0);
|
||||
}
|
||||
|
||||
/* Virtual code is correct and key is pressed currently? */
|
||||
if (wVirtKey < 0x100 && KeyStateBuf[wVirtKey] & KS_DOWN_BIT)
|
||||
{
|
||||
OutPwszBuff = ExAllocatePoolWithTag(NonPagedPool,sizeof(WCHAR) * cchBuff, TAG_STRING);
|
||||
if( !OutPwszBuff )
|
||||
{
|
||||
|
@ -730,6 +734,9 @@ NtUserToUnicodeEx(
|
|||
|
||||
MmCopyToCaller(pwszBuff,OutPwszBuff,sizeof(WCHAR)*cchBuff);
|
||||
ExFreePool(OutPwszBuff);
|
||||
}
|
||||
else
|
||||
ret = 0;
|
||||
|
||||
RETURN(ret);
|
||||
|
||||
|
|
Loading…
Reference in a new issue