Through the persistence interfaces, the ActiveX Designer can save information for use at two different times:
The persistent data might include type information, properties, and global variables such as time-out values and flags that the user has already set. If your visual designer supports dynamic type information, its persistent data should include the cookie value (pdwCookie) returned from GetDynamicClassInfo. The InitNew method of the persistence interfaces should reset the cookie to zero each time a new visual designer is created.
If the visual designer implements IActiveDesigner, the host uses the SaveRuntimeState method to save persistent data for the run-time object. Without IActiveDesigner, however, the run-time object must be able to load itself from the visual designer's persistent data.
Regardless of how data are saved, the run-time object must implement the same persistence interfaces as the visual designer so that the host can load the data at run time.