THPDFRandomAccessSource.ReadAtCancellable Method

Reads bytes at Offset while observing a cancellation token before and after the underlying read

Declaration

function ReadAtCancellable(Offset: Int64; var Buffer; Count: Longint;
  CancellationToken: THPDFCancellationToken): Longint; virtual;

Unit

HPDFDoc

Parameters

NamePurpose
OffsetZero-based byte offset to read from
BufferUntyped buffer that receives the bytes
CountMaximum number of bytes to read
CancellationTokenToken polled for cancellation, or nil to read without cancellation checks

Return value

Number of bytes read, as reported by ReadAt

Usage notes

Related APIs