RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
Classes.TestStreamFormat Function

Identifies the format of a form file when reading it from a stream.

Pascal
function TestStreamFormat(Stream: TStream): TStreamOriginalFormat;
C++
TStreamOriginalFormat TestStreamFormat(TStream Stream);

Classes

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. 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!