ftInterface
ftInterface = 33
Example
function IsInterfaceReference(Field: TField): Boolean;
begin
Result := Field.DataType = ftInterface;
end;
Usage
ftInterface identifies an IUnknown interface reference whose contract, lifetime and thread safety are supplied by the host.
Additional Technical Info
ftInterface is ordinal 33 of TFieldType. Delphi maps it to TInterfaceField, which stores an IUnknown reference and exposes it through a Variant/interface value.
The member identifies storage mechanics, not a specific interface IID or callable API. Reference counting affects lifetime; the implementation controls thread affinity, reentrancy and mutation. Do not cast blindly, retain the reference beyond its owner, or pass it across threads without the interface's documented contract.
Nil is distinct from a valid interface returning Null/Empty. Use ftIDispatch only for Automation-compatible references.
The example only inspects metadata and was source-reviewed; no interface query/invocation, dataset, runtime or image test ran.
External references
- Embarcadero
TFieldTypeandTInterfaceField. - Free Pascal
TFieldTypecompatibility reference.