[fpc-pascal] A list of CORBA interfaces - how?
flavio.etrusco at gmail.com
Tue Sep 20 13:04:02 CEST 2011
On Tue, Sep 20, 2011 at 3:28 AM, Graeme Geldenhuys
<graemeg.lists at gmail.com> wrote:
> I'm porting some of my old Delphi code which used interfaces
> extensively. Since I moved to FPC years ago, I liked the idea of
> CORBA-style interfaces, and mostly use them under FPC projects.
> Anyway, some of my code used IInterfaceList / TInterfaceList, but that
> uses IIInterface, which is an alias for IUnknown, which is COM-style
> interfaces only.
> What is the equivalent for CORBA style interfaces? Just a TList storing
> - Graeme -
I've just found this: http://22.214.171.124/view.php?id=6036
And this really works! :) Even 'as' operator works (so the error
message in FPC 2.4.4 is misleading).
You can iterate over TClass.GetInferfaceTable, and if you declare an
interface name it'll appear there (I checked). Not sure whether
there's some way (or hack) to compare an (unnamed) interface with the
VMT pointer there...
PS. A few days ago when Marcos Douglas was asking about CORBA vs COM I
didn't find this information :-/
More information about the fpc-pascal