属性/方法描述为COM库 [英] Property/Method Descriptions for COM Libraries
问题描述
如果您创建一个COMClass,我注意到,在XML摘要标签值VB6 / VBA的对象浏览器不显示在引用生成的TLB文件。有没有办法让这些值显示出来?
If you create a COMClass, I've noticed that the values in the XML Summary tag do not show in the object browser of VB6/VBA when you reference the resulting tlb file. Is there a way to have these values show up?
推荐答案
没有,12年的工作,从进化的智能感知prevents这一点。在XML文档注释生成智能感知可以拿起.xml文件。在VB6 / A,文件是present与helpstring属性类型库。例如:
No, 12 years of IntelliSense evolution prevents this from working. The XML documentation comments generates an .xml file that IntelliSense can pick up. In VB6/A, documentation is present in the type library with the helpstring attribute. For example:
[
odl,
uuid(2334D2B1-713E-11CF-8AE5-00AA00C00905),
hidden,
dual,
nonextensible,
oleautomation
]
interface IVBDataObject : IDispatch {
[id(0x00000001), helpstring("Clears all data and formats in a DataObject object."), helpcontext(0x00033693)]
HRESULT Clear();
// etc...
};
获取相同的从你的[标记有ComVisible特性]类库需要[说明]属性。注意这个答案了有关它为属性的方式怪癖。
Getting the same from your [ComVisible] class library requires the [Description] attribute. Note this answer for a quirk about the way it works for properties.
这篇关于属性/方法描述为COM库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!