Supports

Check whether a class or given interface supports an interface

Declaration

Source position: intfh.inc line 18

  function Supports(const Instance: IInterface; const AClass: TClass; 
                   out Obj) : Boolean;  Overload;
  function Supports(const Instance: IInterface; const IID: TGUID; 
                   out Intf) : Boolean;  Overload;
  function Supports(const Instance: TObject; const IID: TGUID; out Intf)
                    : Boolean;  Overload;
  function Supports(const Instance: TObject; const IID: Shortstring; 
                   out Intf) : Boolean;  Overload;
  function Supports(const Instance: IInterface; const AClass: TClass)
                    : Boolean;  Overload;
  function Supports(const Instance: IInterface; const IID: TGUID)
                    : Boolean;  Overload;
  function Supports(const Instance: TObject; const IID: TGUID) : Boolean
                   ;  Overload;
  function Supports(const Instance: TObject; const IID: Shortstring)
                    : Boolean;  Overload;
  function Supports(const AClass: TClass; const IID: TGUID) : Boolean
                   ;  Overload;
  function Supports(const AClass: TClass; const IID: Shortstring)
                    : Boolean;  Overload;

Description

Supports checks whether Instance supports the interface identified by IID. It returns True if it is supported, False. Optionally, a pointer to the interface is returned to Intf.

Errors

None.

See also

Name Description
StringToGUID Convert a string to a native TGUID type.