BOOL IsStoring() const;
Determines if the archive is storing data. This member function is called by the Serialize functions of the archived classes.
If the IsStoring status of an archive is TRUE, then its IsLoading status is FALSE, and vice versa.
TRUE if the archive is currently being used for storing; otherwise FALSE.
int i;
extern CArchive ar;
if( ar.IsStoring() )
ar << i;
else
ar >> i;