SendInput Problems

Discussion in 'Windows 64bit' started by Jamie Turner, Feb 12, 2007.

  1. Jamie Turner

    Jamie Turner Guest

    Hi all

    I have an app that uses Sendinput to simulate keystrokes in other apps. It
    works fine in regular XP but not in XP x64. I can't find any documentation
    about why the API call doesn't work - does anyone know of compatibility
    issues?

    TIA

    Jamie.
     
    Jamie Turner, Feb 12, 2007
    #1
    1. Advertising

  2. I cannot be sure, but I think that the standard 'char' type has to be a
    'wchar' today (in support of uni-code). I havn't been doing any of this for
    a long time, but I think this is all pretty much standardized and should be
    handled more or less automatically in compiled routines, if they call the
    correct header files?

    But there is one other possibility. It concerns the subsystem that arranges
    for how 32bit and 64bit apps are installed on XP x64. They both use the
    Program Files Directory, but they must be distinctly separated, if your app
    is making non-system calls that directs your keystrokes to the wrong
    directory - you are in trouble! But I may be wrong, and your trouble could
    turn out to be more trivial. If nothing else turns up here, I think a
    developer group might be able to give more specific answers. Might be a
    guide to find the most suitable one, if you knew what language the app was
    originally written in?


    Tony. . .


    "Jamie Turner" <> wrote in message
    news:...
    > Hi all
    >
    > I have an app that uses Sendinput to simulate keystrokes in other apps. It
    > works fine in regular XP but not in XP x64. I can't find any documentation
    > about why the API call doesn't work - does anyone know of compatibility
    > issues?
    >
    > TIA
    >
    > Jamie.
    >
    >
     
    Tony Sperling, Feb 12, 2007
    #2
    1. Advertising

  3. Jamie Turner

    Jamie Turner Guest

    Hi Tony

    Thanks for the response. I'm writing in VB.NET (.NET 2.0) using this
    declaration (which I'm sure is right):

    <DllImport("user32.dll")> Private Shared Function SendInput(ByVal cInputs As
    Integer, ByRef pInputs As INPUT, ByVal cbSize As Integer) As Integer
    End Function

    It works fine in 32bit XP but doesn't do anything in 64bit XP. I'm not
    touching the file system so I don't think it's that. Any ideas?!

    Thanks

    Jamie.

    "Tony Sperling" <> wrote in message
    news:...
    >I cannot be sure, but I think that the standard 'char' type has to be a
    > 'wchar' today (in support of uni-code). I havn't been doing any of this
    > for
    > a long time, but I think this is all pretty much standardized and should
    > be
    > handled more or less automatically in compiled routines, if they call the
    > correct header files?
    >
    > But there is one other possibility. It concerns the subsystem that
    > arranges
    > for how 32bit and 64bit apps are installed on XP x64. They both use the
    > Program Files Directory, but they must be distinctly separated, if your
    > app
    > is making non-system calls that directs your keystrokes to the wrong
    > directory - you are in trouble! But I may be wrong, and your trouble could
    > turn out to be more trivial. If nothing else turns up here, I think a
    > developer group might be able to give more specific answers. Might be a
    > guide to find the most suitable one, if you knew what language the app was
    > originally written in?
    >
    >
    > Tony. . .
    >
    >
    > "Jamie Turner" <> wrote in message
    > news:...
    >> Hi all
    >>
    >> I have an app that uses Sendinput to simulate keystrokes in other apps.
    >> It
    >> works fine in regular XP but not in XP x64. I can't find any
    >> documentation
    >> about why the API call doesn't work - does anyone know of compatibility
    >> issues?
    >>
    >> TIA
    >>
    >> Jamie.
    >>
    >>

    >
    >
     
    Jamie Turner, Feb 13, 2007
    #3
  4. Ah - that has to be the *.DLL, then. I'm not absolutly certain at the
    moment, and I'm not at all 'home' on Basic, but I think you should have
    that - or a copy of any 32bit DLL's you use, in the SYSWOW directory - this
    whole compatibility re-direction issue, is very confusing. This link may
    help:

    http://support.microsoft.com/kb/896456

    Your routines don't have to actually call anything in the filesystem, or
    manipulate it in any way, to be subject to compatibility side-effects - this
    is an effect of how 32bit app's are installed in the filesystem on this OS.

    Tony. . .




    "Jamie Turner" <> wrote in message
    news:%...
    > Hi Tony
    >
    > Thanks for the response. I'm writing in VB.NET (.NET 2.0) using this
    > declaration (which I'm sure is right):
    >
    > <DllImport("user32.dll")> Private Shared Function SendInput(ByVal cInputs

    As
    > Integer, ByRef pInputs As INPUT, ByVal cbSize As Integer) As Integer
    > End Function
    >
    > It works fine in 32bit XP but doesn't do anything in 64bit XP. I'm not
    > touching the file system so I don't think it's that. Any ideas?!
    >
    > Thanks
    >
    > Jamie.
    >
    > "Tony Sperling" <> wrote in message
    > news:...
    > >I cannot be sure, but I think that the standard 'char' type has to be a
    > > 'wchar' today (in support of uni-code). I havn't been doing any of this
    > > for
    > > a long time, but I think this is all pretty much standardized and should
    > > be
    > > handled more or less automatically in compiled routines, if they call

    the
    > > correct header files?
    > >
    > > But there is one other possibility. It concerns the subsystem that
    > > arranges
    > > for how 32bit and 64bit apps are installed on XP x64. They both use the
    > > Program Files Directory, but they must be distinctly separated, if your
    > > app
    > > is making non-system calls that directs your keystrokes to the wrong
    > > directory - you are in trouble! But I may be wrong, and your trouble

    could
    > > turn out to be more trivial. If nothing else turns up here, I think a
    > > developer group might be able to give more specific answers. Might be a
    > > guide to find the most suitable one, if you knew what language the app

    was
    > > originally written in?
    > >
    > >
    > > Tony. . .
    > >
    > >
    > > "Jamie Turner" <> wrote in message
    > > news:...
    > >> Hi all
    > >>
    > >> I have an app that uses Sendinput to simulate keystrokes in other apps.
    > >> It
    > >> works fine in regular XP but not in XP x64. I can't find any
    > >> documentation
    > >> about why the API call doesn't work - does anyone know of compatibility
    > >> issues?
    > >>
    > >> TIA
    > >>
    > >> Jamie.
    > >>
    > >>

    > >
    > >

    >
    >
     
    Tony Sperling, Feb 13, 2007
    #4
  5. Jamie Turner

    Jamie Turner Guest

    Hi Tony

    That's really useful - thank you so much! Rather than moving files around, I
    changed the .NET compiler settings to force it to compile for x86 rather
    than Any. That forces it to be 32bit (as in that article) and it seems that
    windows then picks the right dlls!

    Thanks again - really appreciate your help - it's been driving me nuts!

    Jamie.

    "Tony Sperling" <> wrote in message
    news:...
    > Ah - that has to be the *.DLL, then. I'm not absolutly certain at the
    > moment, and I'm not at all 'home' on Basic, but I think you should have
    > that - or a copy of any 32bit DLL's you use, in the SYSWOW directory -
    > this
    > whole compatibility re-direction issue, is very confusing. This link may
    > help:
    >
    > http://support.microsoft.com/kb/896456
    >
    > Your routines don't have to actually call anything in the filesystem, or
    > manipulate it in any way, to be subject to compatibility side-effects -
    > this
    > is an effect of how 32bit app's are installed in the filesystem on this
    > OS.
    >
    > Tony. . .
    >
    >
    >
    >
    > "Jamie Turner" <> wrote in message
    > news:%...
    >> Hi Tony
    >>
    >> Thanks for the response. I'm writing in VB.NET (.NET 2.0) using this
    >> declaration (which I'm sure is right):
    >>
    >> <DllImport("user32.dll")> Private Shared Function SendInput(ByVal cInputs

    > As
    >> Integer, ByRef pInputs As INPUT, ByVal cbSize As Integer) As Integer
    >> End Function
    >>
    >> It works fine in 32bit XP but doesn't do anything in 64bit XP. I'm not
    >> touching the file system so I don't think it's that. Any ideas?!
    >>
    >> Thanks
    >>
    >> Jamie.
    >>
    >> "Tony Sperling" <> wrote in message
    >> news:...
    >> >I cannot be sure, but I think that the standard 'char' type has to be a
    >> > 'wchar' today (in support of uni-code). I havn't been doing any of this
    >> > for
    >> > a long time, but I think this is all pretty much standardized and
    >> > should
    >> > be
    >> > handled more or less automatically in compiled routines, if they call

    > the
    >> > correct header files?
    >> >
    >> > But there is one other possibility. It concerns the subsystem that
    >> > arranges
    >> > for how 32bit and 64bit apps are installed on XP x64. They both use the
    >> > Program Files Directory, but they must be distinctly separated, if your
    >> > app
    >> > is making non-system calls that directs your keystrokes to the wrong
    >> > directory - you are in trouble! But I may be wrong, and your trouble

    > could
    >> > turn out to be more trivial. If nothing else turns up here, I think a
    >> > developer group might be able to give more specific answers. Might be a
    >> > guide to find the most suitable one, if you knew what language the app

    > was
    >> > originally written in?
    >> >
    >> >
    >> > Tony. . .
    >> >
    >> >
    >> > "Jamie Turner" <> wrote in message
    >> > news:...
    >> >> Hi all
    >> >>
    >> >> I have an app that uses Sendinput to simulate keystrokes in other
    >> >> apps.
    >> >> It
    >> >> works fine in regular XP but not in XP x64. I can't find any
    >> >> documentation
    >> >> about why the API call doesn't work - does anyone know of
    >> >> compatibility
    >> >> issues?
    >> >>
    >> >> TIA
    >> >>
    >> >> Jamie.
    >> >>
    >> >>
    >> >
    >> >

    >>
    >>

    >
    >
     
    Jamie Turner, Feb 13, 2007
    #5
  6. That is good news, Jamie. Thanks for letting us know.


    Tony. . .


    "Jamie Turner" <> wrote in message
    news:...
    > Hi Tony
    >
    > That's really useful - thank you so much! Rather than moving files around,

    I
    > changed the .NET compiler settings to force it to compile for x86 rather
    > than Any. That forces it to be 32bit (as in that article) and it seems

    that
    > windows then picks the right dlls!
    >
    > Thanks again - really appreciate your help - it's been driving me nuts!
    >
    > Jamie.
    >
    > "Tony Sperling" <> wrote in message
    > news:...
    > > Ah - that has to be the *.DLL, then. I'm not absolutly certain at the
    > > moment, and I'm not at all 'home' on Basic, but I think you should have
    > > that - or a copy of any 32bit DLL's you use, in the SYSWOW directory -
    > > this
    > > whole compatibility re-direction issue, is very confusing. This link may
    > > help:
    > >
    > > http://support.microsoft.com/kb/896456
    > >
    > > Your routines don't have to actually call anything in the filesystem, or
    > > manipulate it in any way, to be subject to compatibility side-effects -
    > > this
    > > is an effect of how 32bit app's are installed in the filesystem on this
    > > OS.
    > >
    > > Tony. . .
    > >
    > >
    > >
    > >
    > > "Jamie Turner" <> wrote in message
    > > news:%...
    > >> Hi Tony
    > >>
    > >> Thanks for the response. I'm writing in VB.NET (.NET 2.0) using this
    > >> declaration (which I'm sure is right):
    > >>
    > >> <DllImport("user32.dll")> Private Shared Function SendInput(ByVal

    cInputs
    > > As
    > >> Integer, ByRef pInputs As INPUT, ByVal cbSize As Integer) As Integer
    > >> End Function
    > >>
    > >> It works fine in 32bit XP but doesn't do anything in 64bit XP. I'm not
    > >> touching the file system so I don't think it's that. Any ideas?!
    > >>
    > >> Thanks
    > >>
    > >> Jamie.
    > >>
    > >> "Tony Sperling" <> wrote in message
    > >> news:...
    > >> >I cannot be sure, but I think that the standard 'char' type has to be

    a
    > >> > 'wchar' today (in support of uni-code). I havn't been doing any of

    this
    > >> > for
    > >> > a long time, but I think this is all pretty much standardized and
    > >> > should
    > >> > be
    > >> > handled more or less automatically in compiled routines, if they call

    > > the
    > >> > correct header files?
    > >> >
    > >> > But there is one other possibility. It concerns the subsystem that
    > >> > arranges
    > >> > for how 32bit and 64bit apps are installed on XP x64. They both use

    the
    > >> > Program Files Directory, but they must be distinctly separated, if

    your
    > >> > app
    > >> > is making non-system calls that directs your keystrokes to the wrong
    > >> > directory - you are in trouble! But I may be wrong, and your trouble

    > > could
    > >> > turn out to be more trivial. If nothing else turns up here, I think a
    > >> > developer group might be able to give more specific answers. Might be

    a
    > >> > guide to find the most suitable one, if you knew what language the

    app
    > > was
    > >> > originally written in?
    > >> >
    > >> >
    > >> > Tony. . .
    > >> >
    > >> >
    > >> > "Jamie Turner" <> wrote in message
    > >> > news:...
    > >> >> Hi all
    > >> >>
    > >> >> I have an app that uses Sendinput to simulate keystrokes in other
    > >> >> apps.
    > >> >> It
    > >> >> works fine in regular XP but not in XP x64. I can't find any
    > >> >> documentation
    > >> >> about why the API call doesn't work - does anyone know of
    > >> >> compatibility
    > >> >> issues?
    > >> >>
    > >> >> TIA
    > >> >>
    > >> >> Jamie.
    > >> >>
    > >> >>
    > >> >
    > >> >
    > >>
    > >>

    > >
    > >

    >
    >
     
    Tony Sperling, Feb 13, 2007
    #6
    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. bigal

    Problems with PHP again...

    bigal, Aug 24, 2005, in forum: The Lounge
    Replies:
    0
    Views:
    1,456
    bigal
    Aug 24, 2005
  2. RObErT_RaTh

    Initial problems registering

    RObErT_RaTh, Aug 24, 2005, in forum: The Lounge
    Replies:
    5
    Views:
    1,582
    unholy
    Aug 26, 2005
  3. K.S.Andersen

    Netgear WG614v3 problems

    K.S.Andersen, Jun 19, 2004, in forum: Wireless Networking
    Replies:
    2
    Views:
    2,506
    K.S.Andersen
    Jun 22, 2004
  4. Harold Potter

    Re: sound problems and modem problems

    Harold Potter, Dec 3, 2003, in forum: Computer Support
    Replies:
    5
    Views:
    787
    Patrick
    Dec 4, 2003
  5. =?Utf-8?B?TWFrc2lt?=

    SendInput() inconsistency between 32/64 bit function equivalents

    =?Utf-8?B?TWFrc2lt?=, Aug 3, 2006, in forum: Windows 64bit
    Replies:
    5
    Views:
    3,909
    WhatIThink
    Feb 12, 2010
Loading...

Share This Page