Sign in Join
FPDoc Onlineexperiment

VarSupports function

In unit Variants

Check if a variant supports an interface.

Declaration

pascal
function VarSupports(const V: Variant; const IID: TGUID; out Intf)
: Boolean

Arguments

V

Variant to check.

IID

Interface identifier.

Intf

Optional argument to receive an instance of the interface.

Function result

True if V supports IID.

Description

VarSupports checks if the variant V contains an interface (types Unknown, varDispatch) and the interface supports the specified interface IID. If it does, True is returned, False otherwise. If Intf is specified, and the variant supports the requested interface, the interface instance is returned in Intf.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.