System.Classes.TSeekOrigin

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

TSeekOrigin = (soBeginning, soCurrent, soEnd);

C++

enum DECLSPEC_DENUM TSeekOrigin : unsigned char { soBeginning, soCurrent, soEnd };

Properties

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

Description

TSeekOrigin indicates where to start a seek operation.

The TSeekOrigin type indicates where to start a seek origin and the direction in which to seek. The following table lists the possible values:

Value Meaning

soBeginning

Seek from the beginning of the resource. The seek operation moves to a specified position (offset), which must be greater than or equal to zero.

soCurrent

Seek from the current position in the resource. The seek operation moves to an offset from the current position (position + offset). The offset is positive to move forward, negative to move backward.

soEnd

Seek from the end of the resource. The seek operation moves to an offset from the end of the resource, where the offset is expressed as a negative value because it is moving toward the beginning of the resource.

Warning: Using these constants may generate unwanted/wrong code, because an overloaded seek method will be used, which uses offest : longint, thus limiting seekrange to 2GB.

See Also