[fpc-pascal] Doubts about QueryInterface

Agustin Barto abarto at gmail.com
Wed Jul 27 04:04:07 CEST 2005

When I try to compile a unit in delphi mode with the following function

function Implements(out AReference; const AObject: TObject; const
AInterface: TGUID): Boolean;
  Result := (AObject is TInterfacedObject) and
    ((AObject as TInterfacedObject).QueryInterface(AInterface, AReference) = 0);

I get:

Utilities.pas(33,44) Error: identifier idents no member "QueryInterface"
Utilities.pas(33,58) Fatal: Syntax error, ")" expected but "(" found
Utilities.pas(33,58) Error: Compilation aborted

What am I doing wrong?

More information about the fpc-pascal mailing list