tags:

views:

153

answers:

1

Hi,

The situation might sound a bit weird but I have to play with what I have. There's a Win2003 64-bit server OS and a legacy application written using Visual Studio 6. The app consists of two parts: ActiveX components written in VB6 and C++ code which uses them.

I need to debug the components' code. I installed Visual Studio 6 on the server and I'm able to step into the component's code. Then I got following situation:

  1. C++ code works until it needs to instantiate component A.
  2. We switch to VB6 and start debugging component's A VB6 code.
  3. In the very beginning component A creates an instance of a class C exposed by component B. At this step VB6 debugger shows error message with title "OLEDB32.DLL" and following text: "Failed to load resource DLL C:\Program Files (x86)\Common Files\System\Ole DB\OLEDB32R.DLL"

Additional information: The last step in initialization of the class C is opening an ADO connection to SQL server using OLEDB provider.

I'd appreciate any ideas on how resolve this problem. Thanks in advance.

A: 

The VB6 debugger has a reputation for sometimes being a bit flaky, and I'm not sure it was ever supported on 64-bit operating systems.

There are some other options for debugging VB6.

  • You could try debugging the VB6 in the Visual C++ 6 debugger at the same time as the C++. Compile the VB6 into native code with symbols (create PDB files). Then you should be able to step from the C++ straight into the VB6 and still debug. I have done this before (not on 64-bit). Here's a Microsoft knowledgebase article on doing this with C++ 5 - I think it's much the same in C++ 6. Here's info on doing it with Visual C++ 2008 (!)
  • Or you could try running the program in Windbg, a free standalone debugger from Microsoft. Again compile your VB6 into native code with symbols (PDB files) and you will be able to debug your VB6 in Windbg. You should also be able to debug the C++ at the same time.
    • Here's a 2006 blog post by a Microsoft guy about using Windbg with VB6, and 2004 blog post by another Microsoft VB guy with a brief introduction to Windbg.
MarkJ