Graeme Geldenhuys wrote:
On 29/11/2007, Marc Weustink <[EMAIL PROTECTED]> wrote:
http://www.freepascal.org/mantis/view.php?id=6798
I can confirm that this doesn't work....
{$Interfaces Corba}
var
cmd: ICommand;
holder: ICommandHolder;
ins: TAddCommand;
begin
ins := TAddCommand.Create(memName1);
ins.GetInterface(ICommand, cmd);
if cmd <> nil then
begin
writeln('It worked');
cmd.Execute;
end;
ins.free;
end;
"it worked" never gets printed.
Yes, you cannot query corba objects, since they don't have a
QueryInterface method.
However cmd := ins; should work.
Marc
PS.
IMO borland screwed up here when they introduced IInterface = IUnknown.
It was IMo cleaner (and you can mix interface types) when they declared
it like:
type
IInterface = interface
end;
IUnknown = interface(IInterface)
_addref...
_release....
Query....
end;
_______________________________________________
fpc-devel maillist - fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel