[fpc-pascal] A list of CORBA interfaces - how?
Flávio Etrusco
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:
> Hi,
>
> 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
> pointers?
>
> Regards,
> - Graeme -
>
> --
I've just found this: http://62.166.198.202/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...
Best regards,
Flávio
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
mailing list