Fixed errors when accessing the COM library

I have almost no knowledge of COM, but I will try to make the question as clear as possible.

I have a .NET 4.0 project and I am referencing an older COM library written in VBScript.

When I use this DLL in code, I do not get any special helptexts in VS2010 that describe methods and classes. They are also not available in the object browser.

I assume this has something to do with the automatic wrapper that .NET uses in the COM library. In this process, help texts are lost.

When I look at the dll directly in the VS Object Explorer, I can see texts for methods, etc.

Is there a way to save descriptive texts for encoding with reference to COM documentation?

+4
source share
1 answer

Do you mean the built-in help documentation available for .NET classes, not parameter information? If so, I share your disappointment. I put a lot of effort into writing help comments in my IDL for the benefit of C # programmers who use my COM object through COM interaction to find that none of them survived when importing the type library.

Adam Nathan’s book has an explanation of this behavior: “.NET and COM: A Complete Compatibility Guide” in the “Frequently Asked Questions” section: Why doesn't the importer of the type library store the contents of the help line in the DescriptionAttribute automatically? I found this book very useful for studying COM interactions, despite my age. It is also available for purchase in the Kindle, epub and pdf formats.

Adam Nathan's explanation is that helpstring attributes are not translated into System.ComponentModel.DescriptionAttribute because DescriptionAttributes are for Windows form controls and are not localizable.

Personally, I would still prefer the helpstring attributes to be translated anyway. Perhaps this function can be added to the importer of the codeplex type library linked above if it doesn’t already.

0
source

All Articles