在64位应用程序中使用32位.lib库

时间:2022-07-18 07:23:37

I'm a starting programmer and I can't solve a problem I have now.

我是一名初学者,我现在无法解决问题。

In MFC, I have a .lib binary file without the sources. I need to make a 64bit application that uses mentioned library file.

在MFC中,我有一个没有源的.lib二进制文件。我需要创建一个使用提到的库文件的64位应用程序。

I thought about making 32bit console program and run one program from another, for example using IPC with WM_COPY~ (or something like that), but the .lib file needs so many attributes like array, struct, pointer, ...

我想过制作32位控制台程序并从另一个程序运行一个程序,例如使用IPC和WM_COPY~(或类似的东西),但.lib文件需要很多属性,如数组,结构,指针,......

Is there an easier way to use that 32bit library in my 64bit application?

有没有更简单的方法在我的64位应用程序中使用32位库?

Thanks

谢谢

2 个解决方案

#1


3  

You don't have any other alternative; you cannot load a 32-bit assembly in a 64-bit program, so you'll need to create a 32 bit application that your 64 bit application can talk to somehow. There are lots of ways to do IPC, so find one that works for you.

你没有任何其他选择;您无法在64位程序中加载32位程序集,因此您需要创建一个32位应用程序,您的64位应用程序可以以某种方式进行通信。有很多方法可以做IPC,所以找一个适合你的方法。

#2


-3  

Uhmm strange, you simply can't put a big elephant into your home fridge but you still can insert in there a big chicken. If you can't do similarly with your 32 bit lib file, tell me why any of your 32bit applications can still work in 64 bit systems ? (:D) what sort of lib is that ?

嗯奇怪的是,你根本无法将一头大象放入你的家用冰箱,但你仍然可以插入一只大鸡。如果您不能对32位lib文件执行类似操作,请告诉我为什么任何32位应用程序仍然可以在64位系统中运行? (:D)那是什么类型的lib?

#1


3  

You don't have any other alternative; you cannot load a 32-bit assembly in a 64-bit program, so you'll need to create a 32 bit application that your 64 bit application can talk to somehow. There are lots of ways to do IPC, so find one that works for you.

你没有任何其他选择;您无法在64位程序中加载32位程序集,因此您需要创建一个32位应用程序,您的64位应用程序可以以某种方式进行通信。有很多方法可以做IPC,所以找一个适合你的方法。

#2


-3  

Uhmm strange, you simply can't put a big elephant into your home fridge but you still can insert in there a big chicken. If you can't do similarly with your 32 bit lib file, tell me why any of your 32bit applications can still work in 64 bit systems ? (:D) what sort of lib is that ?

嗯奇怪的是,你根本无法将一头大象放入你的家用冰箱,但你仍然可以插入一只大鸡。如果您不能对32位lib文件执行类似操作,请告诉我为什么任何32位应用程序仍然可以在64位系统中运行? (:D)那是什么类型的lib?