on-screen keyboard issue on Win7 64-bit

Discussion in 'Windows 64bit' started by Arshif, Mar 18, 2010.

  1. Arshif

    Arshif Guest

    I am running my 32 bit application on a Win7 64-bit machine and when my code
    tries to open the on-screen keyboard via the ShellExecute command, e.g.
    ShellExecute(NULL,_T("open"),_T("osk.exe"), NULL, NULL, SW_SHOWNORMAL), the
    osk process runs but shows the message "Could not start On-Screen Keybaord."

    I can run it manually from cmd so the osk works properly. I think the
    reason why it is failing has something do to because my 32 bit application
    is trying to run the 32 bit version of osk. When I just run osk from cmd,
    it runs the 64 bit version. So perhaps the 32 bit version of osk is not
    working but I can't tell if this is the case since I can't run the 32 bit
    version manually even if I go to the system32\syswow64 folder and run osk.

    I also modified my application so that it starts cmd.exe instead and when I
    type osk in there, I get the same error message. In this case, the 32 bit
    version of cmd was opened so I am thinking it has to do with running a 32
    bit version.

    Does anyone know what would cause the osk to show the "Could not start
    On-Screen Keyboard" message? Is it some configuration issue?
    Arshif, Mar 18, 2010
    #1
    1. Advertising

  2. Your 32-bit application is, as you surmise, only able to call the 32-bit
    version of the on-screen keyboard. I'm guessing that the 32-bit version
    can't run in 64-bit explorer correctly, but honestly don't know why that
    would be. However, I'd speculate that it isn't allowed to run because it
    can't interact correctly with the 64-bit Explorer shell.

    Normally, your 32-bit application doesn't "see" the 64-bit version of the
    filesystem or executables. From a 32-bit CMD window, for example:
    C:\Windows>dir system32\osk.exe
    Volume in drive C has no label.
    Volume Serial Number is 0A61-DFB7

    Directory of C:\Windows\system32

    13/07/2009 06:14 PM 646,144 osk.exe
    1 File(s) 646,144 bytes
    0 Dir(s) 55,493,632,000 bytes free

    C:\Windows>dir syswow64\osk.exe
    Volume in drive C has no label.
    Volume Serial Number is 0A61-DFB7

    Directory of C:\Windows\syswow64

    13/07/2009 06:14 PM 646,144 osk.exe
    1 File(s) 646,144 bytes
    0 Dir(s) 55,493,632,000 bytes free

    BUT, from a 64-bit CMD window:

    C:\>dir windows\system32\osk.exe
    Volume in drive C has no label.
    Volume Serial Number is 0A61-DFB7

    Directory of C:\windows\system32

    13/07/2009 06:39 PM 692,736 osk.exe
    1 File(s) 692,736 bytes
    0 Dir(s) 55,493,619,712 bytes free


    There are specific calls that can be used from a 32-bit application to allow
    it to explicitly call a 64-bit EXE. I'm not enough of a programmer to point
    you at them, but if you ask over on the MSDN forums, someone should be able
    to. Or I may have given you enough to go on to binggle the correct answer.

    --
    Charlie.
    http://msmvps.com/blogs/russel




    "Arshif" <> wrote in message
    news:...
    >I am running my 32 bit application on a Win7 64-bit machine and when my
    >code tries to open the on-screen keyboard via the ShellExecute command,
    >e.g. ShellExecute(NULL,_T("open"),_T("osk.exe"), NULL, NULL,
    >SW_SHOWNORMAL), the osk process runs but shows the message "Could not start
    >On-Screen Keybaord."
    >
    > I can run it manually from cmd so the osk works properly. I think the
    > reason why it is failing has something do to because my 32 bit application
    > is trying to run the 32 bit version of osk. When I just run osk from cmd,
    > it runs the 64 bit version. So perhaps the 32 bit version of osk is not
    > working but I can't tell if this is the case since I can't run the 32 bit
    > version manually even if I go to the system32\syswow64 folder and run osk.
    >
    > I also modified my application so that it starts cmd.exe instead and when
    > I type osk in there, I get the same error message. In this case, the 32
    > bit version of cmd was opened so I am thinking it has to do with running a
    > 32 bit version.
    >
    > Does anyone know what would cause the osk to show the "Could not start
    > On-Screen Keyboard" message? Is it some configuration issue?
    >
    >
    Charlie Russel - MVP, Mar 18, 2010
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Kue2
    Replies:
    12
    Views:
    1,437
    Dave Warren
    Jan 15, 2009
  2. Martin Knauer
    Replies:
    1
    Views:
    1,064
    Martin Knauer
    Jul 7, 2009
  3. Warren Postma
    Replies:
    6
    Views:
    1,482
    FlopShot
    Nov 20, 2009
  4. T.Wahl
    Replies:
    11
    Views:
    2,026
    Dave Warren
    Jun 26, 2010
  5. GS

    Win7 Pro keyboard misbehavior

    GS, Feb 14, 2013, in forum: Windows 64bit
    Replies:
    5
    Views:
    682
    tomslack34
    Mar 15, 2013
Loading...

Share This Page