System.Classes.TestStreamFormat

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function TestStreamFormat(const Stream: TStream): TStreamOriginalFormat;

C++

extern DELPHI_PACKAGE TStreamOriginalFormat __fastcall TestStreamFormat(TStream* const Stream);

Properties

Type Visibility Source Unit Parent
function public
System.Classes.pas
System.Classes.hpp
System.Classes System.Classes

Description

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.

See Also