Keeping VB Components Compatible

Has Your Reference Gone Missing?

As you might guess, the possible problems that can arise while playing with compatibility are relatively large. And, for the most part, a pain in the butt to debug. At some point in your coding career, odds are pretty good that you will run into the following error message:

"Connection to type library or object library for remote process has been lost"

Let me outline a number of reasons for this behavior in the hopes that you might find enlightenment. (Just call me the VB Buddha :)

If this is a new project, you have probably just compiled it for the first time. A new CLSID is generated, one that the calling project knows nothing about. So go into the calling project and add the class in question to the reference list.


If you're debugging your project by running two instances of Visual Basic, not keeping the class project running will trigger this message. Makes sense. If all of a sudden you were to delete one of the components defined to a project, you would expect the same Missing Reference error.
One final piece of experience that I'd like to leave you with. If you're trying the debug server side ASP components by having Visual Basic running along side the web server, then you need to be particularly aware of the compatibility setting. Otherwise the registry entries necessary to get that specific debugging mode are will not be set correctly. And you will find that the web server never seems to hit the break point you've put into your code. You'll be left scratching your heard and cursing the gods of computing. Again, take the word of a man with experience.

You might also like...

Comments

About the author

Bruce Johnson Canada

I am the owner of a small application development consulting company that specialized in the design and implementation of Internet-based applications. While there are others who can make a web ...

Interested in writing for us? Find out more.

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“To iterate is human, to recurse divine” - L. Peter Deutsch