How can I adapt a 32-bit VB6 application to work with 64-bit Office?

谁说胖子不能爱 提交于 2019-12-07 16:11:42

问题


I have an application developed in VB 6.0 and VBA that uses latest Office 32 bit version. But since this application is 32 bit, it does not run on systems where 64 bit Office versions are installed. What is the best strategy I have to adopt to port this application to 64 bit. We have a mandate to use VB.NET and minimal (as much as possible) code modification from VB/VBA to .NET 64 bit. Please suggest the best option I can use so that I can leverage all best practices for this porting.


回答1:


The answer of @Prof.Falken is fine, and porting to VB.NET may be a good idea for itself, but this does not guarantee that you get easily a 64 bit version of your application. If your .NET port will use 32 bit ActiveX components for which you have no 64 bit replacement, then this won't help. Here are some topics listed to be considered:

http://office.microsoft.com/en-us/word-help/choose-the-32-bit-or-64-bit-version-of-microsoft-office-HA010369476.aspx

In our workplace, systems administration decided not to install 64 bit Office on any of the new 64 bit Windows machines since here are too much applications in use (also from third party vendors) which would run into trouble else. And currently we don't see much benefits for us from the 64 bit Office version nowadays.

Here I found another link which might be interesting for you:

http://www.pcpro.co.uk/news/enterprise/356173/microsoft-warns-users-off-64-bit-office-2010




回答2:


Depending on what the code looks like, one or both of these may be a good way:

a) Port it to VB.NET, or another language altogether.

b) Keep it in VB6, but replace EVERY place it talks to Office, with a wrapper call. This wrapper call talks to a VB.NET application, which in turn talks to Office.

The upshot of method b, is that it makes is possible to keep all the business logic in the old VB6 program untouched. Whether this is suitable or not depends on what the program looks like, what the programmers are experienced with, and so on. The old VB6 program and the new VB.NET could talk to each other through for instance COM or XML-RPC.



来源:https://stackoverflow.com/questions/8337134/how-can-i-adapt-a-32-bit-vb6-application-to-work-with-64-bit-office

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!