开发者

Starting a 64bit process from a 32bit app?

开发者 https://www.devze.com 2023-02-18 05:17 出处:网络
I have a WPF 4.0 application that I have compiled for x86.When running on 64bit Win7, I need to start up an on-screen keyboard, located in %windows%/System32/osk.exe.Problem is I can\'t do it- I get a

I have a WPF 4.0 application that I have compiled for x86. When running on 64bit Win7, I need to start up an on-screen keyboard, located in %windows%/System32/osk.exe. Problem is I can't do it- I get an error 'Could not开发者_StackOverflow start On-Screen Keyboard'.

I found this thread: Unable to launch onscreen keyboard (osk.exe) from a 32-bit process on Win7 x64 which sounds exactly like my problem.

I used all the relevant bits from that post, but the error persists. And even worse, I managed to get a 32 bit version of osk.exe and when I try to start THAT I just get a blank error box- no message at all, just a red 'X'.

So I can't compile my app for AnyCPU (3rd party interop libs), and have read that that might not solve the issue anyways. I have also read that one workaround is to disable virtualization using Wow64DisableWow64FsRedirection, but that this is unsafe. Seems like a lot of effort just to run a little app :(

What can I do to launch this little thing from my app?


Wrapping the offending app in a exe compiled with AnyCPU works fine and seems to be the least painful approach.

0

精彩评论

暂无评论...
验证码 换一张
取 消