Step 1: Use IProvideDynamicClassInfoImpl
The IProvideDynamicClassInfoImpl implementation provides access to default type information and generates the type information for a specific class ID. The implementation includes public methods for the standard interface, standard objects, property access, and type information extensions, as well as public methods to override standard (internal) methods.
The interface, object, and override methods are self-explanatory. The property access and type information extension methods are new and are described below.
Property Access Methods
IProvideDynamicClassInfoImpl includes these methods to change designer properties:
- Get/SetCoClassName. Sets or returns the name of the coclass. At start-up, the designer must set the name of the coclass.
- Get/SetDefInterfaceName. Sets or returns the name of the default interface. At start-up, the designer must set the name of the default interface.
- Get/SetSrcInterfaceName. Sets of returns the name of the source interface. At start-up, the designer must set the name of the source interface.
- GetSourceLib. Returns a pointer to the source type library used to build the dynamic type information object.
Type Information Extension Methods
IProvideDynamicClassInfoImpl includes these methods to help in extending type information:
- AddMethod. Adds a method to either the default or event interface.
- AddProperty. Adds a property to the default interface (properties are not used in event interfaces).
- RemoveMethod. Removes a method from the specified interface.
- RemoveProperty. Removes a default property from the default interface.
See the Framework Reference for more information.
See Also
Step 2: Use Helper Classes to Add Methods and Properties