Doubts about QueryInterface

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Doubts about QueryInterface

Agustin Barto
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?

fpc-pascal maillist  -  [hidden email]