System.Classes.TStreamCapability

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

TStreamCapability = (stcPreallocateOptimization, stcOSErrorInfo);

C++

enum DECLSPEC_DENUM TStreamCapability : unsigned char { stcPreallocateOptimization, stcOSErrorInfo };

Properties

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

Description

Enumeration that describes some stream features. There are currently two enumeration members:

  • stcPreallocateOptimization: It specifies that the stream can be resized upfront when reading it from other stream. Resizing the stream upfront is an optimization that allows more efficient copying.
  • stcOSErrorInfo: It specifies that the stream is backed by the OS such that, on failure, we invoke GetLastError to retrieve the current thread's last error code and format the latter using SysErrorMessage.

The TStream.GetCapabilities virtual member returns the capabilities of each stream.


See Also