Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Computing > Windows 64bit > SendInput Problems

Reply
Thread Tools

SendInput Problems

 
 
Jamie Turner
Guest
Posts: n/a
 
      02-12-2007
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.


 
Reply With Quote
 
 
 
 
Tony Sperling
Guest
Posts: n/a
 
      02-12-2007
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.
>
>



 
Reply With Quote
 
 
 
 
Jamie Turner
Guest
Posts: n/a
 
      02-13-2007
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.
>>
>>

>
>



 
Reply With Quote
 
Tony Sperling
Guest
Posts: n/a
 
      02-13-2007
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.
> >>
> >>

> >
> >

>
>



 
Reply With Quote
 
Jamie Turner
Guest
Posts: n/a
 
      02-13-2007
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.
>> >>
>> >>
>> >
>> >

>>
>>

>
>



 
Reply With Quote
 
Tony Sperling
Guest
Posts: n/a
 
      02-13-2007
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.
> >> >>
> >> >>
> >> >
> >> >
> >>
> >>

> >
> >

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
SendInput() inconsistency between 32/64 bit function equivalents =?Utf-8?B?TWFrc2lt?= Windows 64bit 5 02-12-2010 03:55 PM
How do I use SendInput in Python? Adam W. Python 1 02-16-2008 11:45 PM
Problems with GenerateConsoleCtrlEvent and SendInput mike_cole@adaptec.com Perl Misc 10 11-10-2005 11:34 PM
Ruby/DL SendInput Peter C. Verhage Ruby 5 05-09-2005 05:24 PM
SendInput too slow Barb C++ 1 10-03-2003 02:11 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57