[ros-dev] Strange code into ToUnicodeEx().

carlo.bramix carlo.bramix at libero.it
Fri Jul 20 19:01:14 CEST 2007


Hello,
I debugged a bit on ReactOS because I wanted to understand why  my (newer upcoming) version of ReactOS Calc doesn't work when you press some keys on the keyboard.
The cause of the problem is this piece of code:

int STDCALL ToUnicodeEx( UINT wVirtKey,
                         UINT wScanCode,
                         PBYTE lpKeyState,
                         LPWSTR pwszBuff,
                         int cchBuff,
                         UINT wFlags,
                         HKL dwhkl )
{
   int ToUnicodeResult = 0;

   if (0 == (lpKeyState[wVirtKey] & KS_DOWN_BIT))
   {
      ToUnicodeResult = 0;
   }
   else
   {
......

In other words, a key can be translated only if it's pressed and not during the release stage.
Is there a reason for this choice?

Sincerely,

Carlo Bramini

---------- Initial Header -----------

>From      : ros-dev-bounces at reactos.org
To          : "ReactOS Development List" ros-dev at reactos.org
Cc          : 
Date      : Wed, 18 Jul 2007 11:14:45 +0000 (GMT)
Subject : [ros-dev] Re :  r27709 breaks first stage setup

> this part of hivesys change is wrong : (duplicate key)
> 
> +HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0414",0x00000000,"l_intl.nls"
> HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0813",0x00000000,"l_intl.nls"
> HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0414",0x00000000,"l_intl.nls"
> 
>  
> Kind regards,
> Sylvain Petreolle (aka Usurp)
> --- --- --- --- --- --- --- --- --- --- --- --- ---
> Run your favorite Windows apps with free ReactOS : http://www.reactos.org
> Listen to non-DRMised Music: http://www.jamendo.com
> 
>  
> 
> 
> ----- Message d'origine ----
> De : Timo Kreuzer <timo.kreuzer at web.de>
> À : ReactOS Development List <ros-dev at reactos.org>
> Envoyé le : Mercredi, 18 Juillet 2007, 0h33mn 13s
> Objet : [ros-dev] r27709 breaks first stage setup
> 
> 
> the change in hivesys.inf makes ros freeze when trying to import hivesys.inf
> bug 2414
> 
> _______________________________________________
> Ros-dev mailing list
> Ros-dev at reactos.org
> http://www.reactos.org/mailman/listinfo/ros-dev
> 
> _______________________________________________
> Ros-dev mailing list
> Ros-dev at reactos.org
> http://www.reactos.org/mailman/listinfo/ros-dev
> 


------------------------------------------------------
Scegli infostrada: ADSL gratis per tutta l’estate e telefoni senza canone Telecom
http://click.libero.it/infostrada




More information about the Ros-dev mailing list