2
votes

Generally, when the "User-defined type not defined" error occurs, a piece of code within the project is brought up on the VB6 UI and highlighted to show the user which user-defined type the IDE is unable to make an associate with.

In my case, however, no frame/code is popping up for this error, leaving me no idea which user-defined type this atrocious piece of software is unable to find.

This project is huge and includes hundreds of different references and components. Project -> References shows nothing is "missing". Any ideas for how to find out what user-defined type the IDE is unable to find?

enter image description here

1
When that window pops up, use Spy++ to find out which thread that window belongs to. Then, with a debugger (e.g. WinDbg, Visual Studio) inspect that thread's call stack.acelent
@PauloMadeira: This is not going to fly as it requires way too much WinDbg kung-fu (inspecting local and global variables w/o PDB file?)wqw
Yeah; agree with wqw. I'd need either a different solution or more information on what to look for in the call stack. Also, I have very limited experience in using these types of tools (less than a couple of hours experience with ollydbg). Any better ideas wqw?kwikness
I had a very similar problem. It was 15 years ago so can't be so sure about the details. Had to call Microsoft Support for help and got an escalation engineer to work on it. IIRC, it was a Public Type that was used across modules, corrupting internal state when trying to compile the code. Randomly, it didn't always fail. I got no fix, the workaround was to replace it with a class.Hans Passant

1 Answers

2
votes

Try setting project compatibility on every project in the group and start the application with Ctrl+F5 in the IDE.

Try compiling from command line -- check out vb6.exe /? for more info.