问题描述
嘿,
我正在编写一个小程序来卸载扫描仪驱动程序.我的程序可以在32位Windows上运行,但是在64位Windows下却不能运行.
I am writing a little program to uninstall a scanner driver. I have the program working in 32-bit Windows, but it does not work under 64-bit.
稍作阅读后,就需要从64位进程中调用API(SetupDiCallClassInstaller),因此我尝试将程序重新编译为64Bit版本,并且可以正常工作.
After a bit of reading the API (SetupDiCallClassInstaller) needs to be called from a 64-bit process, so I tried recompiling the program to a 64Bit version and it works.
理想情况下,我只想拥有1个可执行文件,无论如何我都可以这样做.
Ideally I only want to have 1 executable, is there anyway I can do this.
我知道32-位进程无法加载64位DLL.我可以使用COM吗?还是什么?
I understand that a 32-bit process can not load a 64-bit DLL. Can I use COM? or something?
我对COM零经验:)
推荐答案
如果可以的话,您可以只编译一个可以在32位和64位Windows上运行的32位应用程序.
If you can then you could just compile a single 32-bit app that will work on 32-bit and 64-bit Windows.
答案:不会...
Answer: Nope ...
这篇关于需要一点帮助,32位进程调用64位API的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!