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:

  1. Calls CoCreateInstance to create an instance of the visual designer.

  2. Calls QueryInterface on the created instance to find its persistence interface.

  3. Calls the InitNew or Load method of the persistence interface, as appropriate, to load the persistent state of the visual designer.

  4. Calls the GetDynamicClassInfo method of the IProvideDynamicClassInfo interface to get type information. If this interface is not implemented, the host calls the GetClassInfo method of the IProvideClassInfo interface.

  5. Calls InPlaceActivate to activate the created instance.

If the type information changes dynamically, the host is notified via ITypeChangeEvents, triggered by Automation. It then calls GetDynamicClassInfo to retrieve the new information for property browsers, event handlers, and other features that require up-to-date type information.

The type information object that the designer returns from GetClassInfo or GetDynamicClassInfo must describe the run-time object, not the design-time visual designer.