开发者

Linking 64bit DLL to Visual Basic 6

I'm updating an existing DLL project written in C. For multiple reasons, both 32bit and 64bit versions of this are required.

The application using these DLLs is written in Visual Basic 6 and is needed by a class within the project. This class contains a module full of Publ开发者_JAVA技巧ic Declare Functions to the DLL; the class is a wrapper to the functions in the module.

There are no references in the Visual Basic 6 project itself. So far I've finished coding the 32bit version and am happy with it.

Are there any issues with changing the file name in the module to point at the 64bit DLL, given the 64bit DLL will be called from a 32bit DLL, within a 32bit application, written in Visual Basic 6?


You can't call 64 bit code from 32 bit. The only way to do this run the 64 bit code in a 64 bit process and use some sort of inter-process communication to talk to them.


Raymond "The Old New Thing" has a nice article that explains why it is not possible to thunk from 32-bit to 64-bit.


With all due respect toward VB6, VB6 came out in 1998, the era when it was not entirely clear if computing will migrate from 16-bit to 32-bit, let alone 64-bit processing. Unless you come up with some sort of a 64-bit <-> 16/32-bit intercommunication layer, this isn't directly possible. At least not through the means of VB6

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜