System.Classes.TStreamAdapter.Seek
Delphi
function Seek(dlibMove: Largeint; dwOrigin: DWORD; out libNewPosition: LargeUInt): HResult; virtual; stdcall;
C++
virtual HRESULT __stdcall Seek(__int64 dlibMove, unsigned dwOrigin, /* out */ unsigned __int64 &libNewPosition);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | System.Classes.pas System.Classes.hpp |
System.Classes | TStreamAdapter |
Description
Implements the IStream Seek method.
Seek moves the current position of the stream to the position specified by dlibMove and dwOrigin. The dlibMove parameter indicates a number of bytes, and dwOrigin indicates from where the bytes are measured to locate the new position. The libNewPosition parameter returns the new position of the stream.
Seek returns S_OK if it successfully Seeks to the specified position. It returns STG_E_INVALIDFUNCTION if dlibMove is STREAM_SEEK_SET or STREAM_SEEK_END, because these types of seek operations are not supported by the TStream.Seek method. It returns STG_E_INVALIDPOINTER if the seek operation fails for any other reason.