Haruyuki Mohri


XE8 Use TCppInterfacedObject IInterface

Using the "C++Builder XE8" in the Delphi "IInterface".

Here, the description that of Hosokawa san is "Delphi IInterface".

.delphi maniacs: Delphi の Interface

 Rewrite in this the "C++ Builder".


The "IInterface", write the inherited class.

"__interface" is like a macro??

It uses as "System::DelphiInterface<IFoo>"

It will create a reality TFoo class.

The "TFoo" will make to "TCppInterfacedObject<>" inheritance.

_di_IFoo foo = static_cast<IFoo* >(new TFoo());
Label1->Text = foo->Bar;

It is a variable of "__interface".

We will call a reality TFoo.


IInterfaceSupports (C++) - RAD Studio Code Examples