1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

GetAsyncKeyState() is returning 0xFFFF in IE8 protected mode

Discussion in 'Internet Explorer' started by varaha, Feb 3, 2010.

  1. varaha

    varaha Flightless Bird

    Hi,

    In my activeX control, I am trying to read the key currently pressed by the
    user, using repeated calls to GetAsyncKeyState(vKey) function in a loop with
    various vKey values. But when I run the activeX control in IE7/IE8 protected
    mode, the function seems to be returning 0xFFFF continuously(even though one
    of the keys is pressed) for some time and then gives correct values for some
    time and so on. With protected mode set to Off, it works without any
    issues.Has anyone faced this issue earlier?
    Please help me.

    Thanks,
    Varaha.
     
  2. PA Bear [MS MVP]

    PA Bear [MS MVP] Flightless Bird

    Post here instead:
    http://social.msdn.microsoft.com/Forums/en-US/iewebdevelopment/threads

    varaha wrote:
    > Hi,
    >
    > In my activeX control, I am trying to read the key currently pressed by
    > the
    > user, using repeated calls to GetAsyncKeyState(vKey) function in a loop
    > with
    > various vKey values. But when I run the activeX control in IE7/IE8
    > protected
    > mode, the function seems to be returning 0xFFFF continuously(even though
    > one
    > of the keys is pressed) for some time and then gives correct values for
    > some
    > time and so on. With protected mode set to Off, it works without any
    > issues.Has anyone faced this issue earlier?
    > Please help me.
    >
    > Thanks,
    > Varaha.
     

Share This Page