[fpc-pascal] Interface performance
Tony Whyman
tony.whyman at mccallumwhyman.com
Fri Nov 11 11:52:59 CET 2016
On 11/11/16 10:08, Ryan Joseph wrote:
> I’m trying your code example now and I get "Class or COM interface type expected, but got “IMyInterface”” when I try to cast with “as”. I was using {$interfaces corba} so maybe that’s the problem?
Ooops, as you may guess, I typically work with COM interfaces.
Someone else may correct me, but with CORBA, I believe you have to
explicitly add a function to the interface such as
function GetObject: TMyObject;
and implement as
function TMyObject.GetObject: TMyObject;
begin
Result := self;
end;
More information about the fpc-pascal
mailing list