THPDFRandomAccessSource.ReadAtCancellable Method

Reads bytes at Offset, observing a cancellation token both 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 from which to read
BufferUntyped buffer into which the bytes go
CountGreatest number of bytes to read
CancellationTokenToken polled for cancellation, or nil so as to read without cancellation checks

Return value

Number of bytes read, exactly as ReadAt reports it

Usage notes

Related APIs