I have written a .NET class library (using Visual C++ 2005 and old syntax) which is exposed to VB6 via COM Interop. The assembly works quite satisfactorily. I recently decided to enhance it by documenting all classes and class members; this is done by qualifying items with a
Description
attribute, like:
[Description("This is my class")]
public __gc class MyClass
{
[Description("This is the constructor")]
MyClass();
}
These helpstrings are well recognized and displayed by the Object Browser in Visual C++. They are also retrieved by the Object Browser in VB6.
But there is a but: the trick does not work for properties.
[Description("This is my property")]
__property void set_Value(int Value);
__property int get_Value();
does not let the description appear in the Object Browser of VB6. Repeating the description for the getter does not help.
I have found several posts giving a solution in C#:
int Value
{
[Description("This is my property")]
set;
[Description("This is my property")]
get;
}
I tried different ways, but I couldn't find an equivalent syntactic trick in C++.
Has anyone solved this ?