[fpc-devel] {$Interfaces Corba} and TInterfacedObject
Marc Weustink
marc.weustink at cuperus.nl
Thu Nov 29 13:50:15 CET 2007
Graeme Geldenhuys wrote:
> On 29/11/2007, Thorsten Engler <thorsten.engler at gmx.net> wrote:
>> to another interface implemented by the same object (Or back to the object
>> for that matter).
>
> I guess to get back to the Obj instance, you could let your ISomething
> interface implement "function Instance" which returns the Obj
> instance. That's a old trick used in Delphi code with COM interfaces.
>
>> As for why your call to Supports fails, Supports internally gets Iinterface
>> (if implemented) from the object and then calls QueryInterface to get a
>> reference to the interface you actually asked for. That naturally only works
>> with COM interfaces.
>
> Well in that case, shouldn't the compiler give me a error when I use
> Corba interfaces and try and use the Supports() method. That would be
> the logical thing wouldn't it, since Supports() would then *never*
> work with true CORBA interfaces. Don't give the clueless developer
> false hope. :-)
Hmm... I reported something similar in the past, which is fixed:
http://www.freepascal.org/mantis/view.php?id=6796
(also 6797 and 6798 are somewhat related to this topic)
Marc
More information about the fpc-devel
mailing list