Most designers support dynamic type information so that a user can add properties or methods to customize the run-time object. The type information helper classes can simplify supporting this useful feature.
Before adding a method or a property to the run-time object, you have to build a representation of that method or property. Normally, you use the FUNCDESC, VARDESC, and ELEMDESC structures defined by Automation. The CFuncDesc, CVarDesc, and CElemDesc helper classes encapsulate the layout and memory management of these structures and make adding methods and properties more intuitive.
The framework provides these helper classes for use in manipulating dynamic type information:
The CFuncDesc class encapsulates a FUNCDESC structure, and is used to add methods to the ITypeinfo object of the run-time object.
The CVarDesc class encapsulates a VARDESC structure, and is used to add properties to the ITypeinfo object of the run-time object.
The CElemDesc class encapsulates an ELEMDESC structure, and is used to build function parameter lists and return lists.