2

After the installation of Office 365 on a Windows 7 PC, the Visual Studio 6 (VB6) debugger returns an error.
+ When you add a breakpoint and try to start debugging (F5) your code, the error pops right away.
+ Without breakpoint the error comes after clicking a button on a form.

The returned Exception Code: c0000005:

Problem signature:
Problem Event Name: BEX
Application Name: VB6.EXE
Application Version: 6.0.97.82
Application Timestamp: 403acf6c
Fault Module Name: StackHash_7e3b
Fault Module Version: 0.0.0.0
Fault Module Timestamp: 00000000
Exception Offset: 07ba32ac
Exception Code: c0000005
Exception Data: 00000008
OS Version: 6.1.7601.2.1.0.256.4
Locale ID: 2060
Additional Information 1: 7e3b
Additional Information 2: 7e3beb1e9ccf6d519c5b994ca59a280f
Additional Information 3: 2ac0
Additional Information 4: 2ac004046dc496f347320c8826a4cbdc

Creating an exe file still works and the created exe file still works fine.

Any testimony of a working office 365 - visual studio 6 combination is helpful as it allows me to look for other (indirect) causes of the problem.

ywwy
  • 124
  • 1
  • 2
  • 18
  • Painful... wish I had a suggestion – StayOnTarget Feb 14 '19 at 19:53
  • 1
    hmm ... no idea what that can be. my dev pc is win10 (upgraded from existing installation) and vb6 and office365 running smooth together. But I´m not sure, If I installed Office365 (years ago) before vb6 .... – nabuchodonossor Feb 15 '19 at 09:13
  • 1
    @nabuchodonossor Just knowing that running Office 365 and Visual Studio 6 together is possible, allows me to look for other causes of the problem. Thx. – ywwy Feb 15 '19 at 09:23
  • @ywwy: Yeah, at least it should be possible somehow. But your problem may be triggerd by your last installation. If you have the "special" setup (which still runs on win10 & also on 64bit) maybe a reinstall of the vb6 ide helps. – nabuchodonossor Feb 15 '19 at 09:59
  • @ywwy: I do not like to add a link here, if you like to make a setup of your vb6 original software (which is not so ease to install on newer machines), google for "new visual basic 6.0 installer". I´m pretty sure you will find this page(s) helpful. – nabuchodonossor Feb 15 '19 at 15:39
  • This is a programming problem. So you can't fix it. The stack is trashed. It can't work out the faulting module. If it could you could load it in a debugger and go to the offset in the error and see what function it is. Try running your debugger under the system debugger - See https://pastebin.com/Qdf5C2Lt – Noodles Feb 17 '19 at 20:45

2 Answers2

2

I don't have enough points to comment, so...

I'm a long time VB6 user and it has always been my experience that installing any version of Office from MS will usually cause severe problems with Visual Studio 6. This goes a long way back and I believe it is due to the thousands of changes that Office makes to the registry.

I have had some success fixing this problem in the past by:

  1. Uninstall Office - reboot
  2. Uninstall VS6 - reboot
  3. Do a full registry clean (repeated runs with CCleaner or similar until there are no more issues detected)
  4. Install Office - reboot
  5. Install VS6 last

Cleaning the registry is the most important part. Office leaves behind a huge number of obsolete registry entries when uninstalled. Even though a full clean will catch a lot of them, it won't catch anywhere near all of them, so these orphan entries can still cause problems.

With at least with one version of Office, this process still didn't help. I was never able to use VS6 without problems again until I did a full OS reinstall without Office. Another version caused the VB6 IDE to crash immediately when opened, rendering it useless.

My ultimate solution was to ditch MS Office for OpenOffice. Since then, I've never had any problems with VS6 at all.

So the short of it is that MS Office and VS6 are not compatible, especially if VS6 is installed first.

(On a couple of occasions, I took snapshots of the registry before and after installing Office. One version (2007 I think) made over 12,000 changes to the registry. A later version (possibly 2012) made over 16,000 changes.)

Scruff
  • 111
  • 5
  • Indeed, I will try the registry cleaning and keep you informed. It might take some time to get the approvals :), don't hold your breath. – ywwy Feb 18 '19 at 08:16
  • Installing VS6 after Office is also important. I can't say for sure, but I think most of the issues are because Office uses VBA and I think that is where it overwrites a lot of important registry info that VB6 relies on. – Scruff Feb 18 '19 at 23:15
  • I partially followed the suggested steps because we cannot uninstall office 365. Just uninstalling VB6 and cleaning the registry did not help. Even following [link](https://stackoverflow.com/questions/10495680/installation-of-vb6-on-windows-7-8-10) for doing the installation. We'll probably go for a VM with office XP. – ywwy Feb 22 '19 at 12:12
  • VM with office XP? Do you mean a VM with "Windows" XP and install VS6 on that? That would be a good choice beacuse you won't have any issues at all with VS6 on XP - just don't install any version of Office on the VM. – Scruff Feb 24 '19 at 04:52
  • No prob. I still use XP every day on both my main PC and laptop - I just find it far less troublesome than any newer OS. So if you run into any problems with XP in the VM, let me know. – Scruff Feb 24 '19 at 16:52
  • I did a first time installation of Visual Studio 6 on a different pc with both Office365 and Visual Studio 2015 pre-installed. Visual Studio 6 works ! So we are going to go try out your suggestion of uninstalling office 365,.... to be continued – ywwy Mar 04 '19 at 09:22
  • Installing office 365 first, then visual studio 2017 and finally Visual Studio 6 did not give us a working Visual Studio 6. We took an image of an existing pc with office365, Visual Studio 2015 and Visual Studio 6. Our careful conclusion would be to stay away from Visual Studio 2017. But there could be other reasons. – ywwy Apr 25 '19 at 06:47
  • Typical MS. I'm surprised that another VS version could be causing the problem. I've never had that issue, but that's without Office installed. – Scruff Apr 26 '19 at 20:24
  • I'm now wondering if this might be "DLL Hell" rather than registry. I think they stopped using "side by side" for VS2017 or it's required Net Framework didn't they? (Net 4.6 I think?) If so, that might be the cause of the difference in your latest tests - VS2015 and it's framework uses WinSxS and VS2017 and/or it's framework doesn't, causing missing or wrong DLL versions being found for VS6. (Just thinking out loud so to speak here.) Maybe tracking the DLL versions VS6 is trying to load on a clean install vs with 2017 installed might provide some answeres. – Scruff Apr 26 '19 at 20:55
  • thx for your input, but I wouldn't jump to conlusions. No time to do it in a scientific way, keeping all other factors equal. Uac might have changed on restart, windows decided to do an intermediate update on restart, ... – ywwy Apr 26 '19 at 21:12
  • We installed visual studio 2019 after restoring on an image of a pc with Office 365, Visual Studio 6 and Visual Studio 2015. This gave us a working environment. Once you have a working environment with a Visual studio 6 .... take an image of your disk as a precaution. – ywwy May 03 '19 at 12:48
0

I have also faced the same issue while making .exe and activex dll from my VB6.0 projects. I solved the issue by changing the Compatibility of the vb6.exe in the C:\Program Files (x86)\Microsoft Visual Studio\vb98\ to Windows 7 instead of the Windows XP (SP3) by right clicking the vb6.exe file in the said folder, then clicking properties-> Compatibility-> Selected Windows 7 in the place of Windows XP (SP3)

A very late reply, but may be useful for someone who may come to face the same issue as an additional option.