COleControl::SerializeVersion

Serializes or initializes the state of a control's version information.

DWORD SerializeVersion( 
   CArchive& ar,
   DWORD dwVersionDefault,
   BOOL bConvert = TRUE  
);

Parameters

  • ar
    A CArchive object to serialize to or from.

  • dwVersionDefault
    The current version number of the control.

  • bConvert
    Indicates whether persistent data should be converted to the latest format when it is saved, or maintained in the same format it had when it was loaded.

Return Value

The version number of the control. If the specified archive is loading, SerializeVersion returns the version loaded from that archive. Otherwise, it returns the currently loaded version.

Remarks

You can improve a control's binary persistence performance by using SerializeVersion, SerializeExtent, and SerializeStockProps to override COleControl::Serialize. For an example, see the code at SerializeExtent. For further information on optimizing initialization, see ActiveX Controls: Optimization.

Requirements

Header: afxctl.h

See Also

Reference

COleControl Class

Hierarchy Chart

COleControl::SerializeExtent

COleControl::SerializeStockProps

COleControl::ResetVersion

Other Resources

COleControl Members