How the Host Obtains Type Information
When the end user inserts an ActiveX designer into the host environment, the host takes the following steps to create an instance of the visual designer and obtain type information:
- Calls CoCreateInstance to create an instance of the visual designer.
- Calls QueryInterface on the created instance to find its persistence interface.
- Calls the InitNew or Load method of the persistence interface, as appropriate, to load the persistent state of the visual designer.
- Calls the GetDynamicClassInfo method of the IProvideDynamicClassInfo interface to get the visual designer's type information. If this interface is not implemented, the host calls the GetClassInfo method of the IProvideClassInfo interface.
- Calls InPlaceActivate to activate the created instance.
If the type information changes dynamically, the host is notified via ITypeChangeEvents, triggered by Automation. It can then call GetDynamicClassInfo to retrieve the new information for property browsers, event handlers, and other features that require up-to-date type information.