RAD Studio VCL Reference
IInterface Interface

IInterface is the base class for all interfaces defined in Delphi code.

IInterface = interface;
__interface IInterface;

IInterface is the base interface for interfaces defined in Delphi code. When used in C++ code, IInterface is considered a child interface of IUnknown and IUnknown is considered the base interface for all interfaces.

Note: IInterface introduces the QueryInterface method, which is useful for discovering and using other interfaces implemented by the same object. IInterface also introduces the reference counting methods, _AddRef and _Release. The Delphi compiler automatically provides calls to these methods when interfaces are used. The System::TInterfacedObject class is provided as a base class for objects that implement interfaces. Use of System::TInterfacedObject is not mandatory, but will often be easier than designing an implementer class from scratch.
Note: C++ method declarations that use IInterface refer to the _di_IInterface type instead. This is a DelphiInterface wrapper around the IInterface interface:

typedef System::DelphiInterfaceDelphiInterface_object< IInterface > _di_IInterface;


Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!