function TestStreamFormat(const Stream: TStream): TStreamOriginalFormat;
extern DELPHI_PACKAGE TStreamOriginalFormat __fastcall TestStreamFormat(TStream* const Stream);
Identifies the format of a form file when reading it from a stream.
Call TestStreamFormat to check the signature of a stream that reads a form file to determine whether it was stored in binary or text format.
Stream is the stream to check.
TestStreamFormat checks the signature of the stream and returns sofBinary if the form file was saved in binary format, sofText if it was saved in text format, and sofUnknown if it could not tell. A return value of sofUnknown usually indicates that the stream is not reading a form file or that the stream is not positioned at the start of the file.