开发者

How to keep an old VB6 application running in Windows Vista and Windows 7?

I have an old VB6 app which I'm still trying to support. A few users have reported weird crashes when running the app in Vista or Windows 7. The log files don't show anything after one of these crashes, but the customers report that the error message said "OLE something ...", if they saw anything at all.

I've never been able to reproduce these crashes while running the program开发者_Go百科 on my own Vista or Windows 7 boxes, so I have essentially no information on what the problem is.

My suspicion is that it's a problem with their versions of one or more of the umpteen billion DLLs that a VB6 application is dependent on. The app also uses lame_enc.dll, which introduces a few more dependencies.

I'm guessing this is a common problem with VB6 apps (although it's possible that I just sucked as a programmer 10 years ago). Is there some magical installer/updater out there that makes sure all the VB6 dependencies are what they need to be for a VB6 app to function properly?


If Compatibility Mode doesn't work there is also XP Mode. This virtualizes the entire environment in an XP virtual machine but also allows it to interact with the host OS. It's only available for Windows 7 though.


Have the user run the app in compatibility mode for XP. Just drag a shortcut onto the desktop, right-click, Properties. Then on the Compatibility tab, set it to "run in compatibility mode for:" and pick "Windows XP (Service Pack 3)". And also "disable display scaling on high DPI settings". See if that helps. It just might.


Try a third party installer like Installshield. I have a VB6 app which didn't install and run properly on Win 7 using the original installer, but I when I put it through a recent version of Installshield it now works fine.


One option is to contact Microsoft technical support. The VB6 runtime is fully supported on Windows 7. You may need to pay for a "support incident": or it may be free, for instance if you have an MSDN subscription (good idea to get one).


We've had just generally odd behavior with some customers who have tried to run our application on Windows 7. In one case, the application's main toolbar (a standard MSComctlLib.Toolbar control) was completely empty (none of the icons or separator bars appeared). We were mystified. The program didn't crash, the icons just simply weren't there. Nothing in the application's error logs, nothing in the Windows event log. We even made sure the application was configured to run in Windows XP Compatibility Mode, but no dice. As far as we knew, the correct DLL's were installed and registered, and we have run the same application on the same version of Windows 7 since then without any problems.

In a somewhat ironic decision, not long before that we had decided to officially support Windows 7, while at the same time stating we wouldn't officially support Vista (although some customers are running the application on Vista without any issues). At first, this might sound like an odd decision, but there are two good reasons why this makes sense:

  • Most new computers will have Windows 7 pre-installed, and most customers who skipped upgrading to Vista due to all the FUD surrounding it are very interested in upgrading from XP to Windows 7.

  • Windows 7 supports XP Mode, which lets you run apps in a virtual machine that is running Windows XP SP3. Some of our customers have gone this route and none have reported any problems running our application this way. Because you are running your application in an actual Windows XP environment, there is much less chance for things to go wrong.


I'll vote the XPMode as well.

However, if you still have issues, Dependency Walker is a good free tool that scans an exe/dll/ocx and builds a tree diagram of all dependent modules/dlls. Even without this issue it's helpful in troubleshooting install issues.

http://www.dependencywalker.com/

Additionally, we had several issues in the past with items that write the registry where the user didn't have proper security rights that caused similar issues. You might check code those functions if you have them.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜