Reading and writing variants.
Posted on 1998-05-11
I'm overriding the define properties method of a number of classes to stream my own classes into a file stream. I create the TReaderProc and TWriterProc for each property and use Reader.ReadString, ReadInteger etc. My only problem is that I have some variant properties which I need to store in the stream, and there is no ReadVariant and WriteVariant methods. How do I read and write variants to and from the stream. The variants are variant arrays of byte.