THPDFCABIIOV1 Record

Pascal declaration of the versioned hpdf_io_v1 callback bundle that the stable C ABI uses

THPDFCABIIOV1 = record
  StructSize: UInt32;
  ABIVersion: UInt32;
  Flags: UInt64;
  UserData: Pointer;
  ReadAt: THPDFCABIReadAtCallback;
  GetSize: THPDFCABIGetSizeCallback;
  Write: THPDFCABIWriteCallback;
  IsCancelled: THPDFCABICancelCallback;
  Progress: THPDFCABIProgressCallback;
  Diagnostic: THPDFCABIDiagnosticCallback;
end;

The unit is HPDFCAPI; the layout mirrors the public C structure, so StructSize and ABIVersion have to carry the values reported by hpdf_abi_io_v1_size and hpdf_abi_version

ReadAt, GetSize and Write carry the random-access input and streamed output contract, whilst IsCancelled, Progress and Diagnostic report cancellation, progress and error text

UserData comes back to every callback unchanged; Flags must be zero for ABI v1

The record is embedded three times in THPDFCABIOperationV1 as the input, output and result channels, and the same callbacks stay available to the Pascal helpers described on the stable C callback ABI page

Native Linux C ABI · JSON and C ABI document operations