Sign in Join
FPDoc Onlineexperiment

TObject.GetInterface function

Member of TObjectpublicIn unit System

Return a reference to an interface.

Declaration

pascal
function GetInterface(const iid: TGUID; out obj): Boolean
function GetInterface(const iidstr: shortstring; out obj): Boolean

Description

GetInterface scans the interface tables and returns a reference to the interface iid. The reference is stored in Obj which should be an interface reference. It returns True if the interface was found, False if not.

The reference count of the interface is increased by this call.

Errors

If no interface was found, False is returned.

See also

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