title: get pointer of member function delphi
body: <p>Is there some trick how to get pointer of a member function in Lazarus / delphi?
  I have this code which won't compile....<BR><br> Error is 
  in Delphi:<BR>
  <code>variable required</code><BR><br>
  in Lazarus:<BR>
  <code>Error: Incompatible types: got "&lt;procedure variable type of function(Byte):LongInt of object;StdCall&gt;" expected "Pointer"</code></p>
  
  <p><BR>
  The code:<br></p>
  
  <pre><code>  TClassA = class
    public
        function ImportantFunc(AParameter: byte): integer; stdcall;
    end;
  
    TClassB = class
    public
       ObjectA: TClassA;
       ImportantPtr: pointer;
       procedure WorkerFunc;
    end;
  
    function TClassA.ImportantFunc(AParameter: byte): integer; stdcall;
    begin
       // some important stuff
    end;
  
    procedure TClassB.WorkerFunc;
    begin
       ImportantPtr := @ObjectA.ImportantFunc; //  &lt;-- ERROR HERE
    end;
  </code></pre>
  
  <p>Thanks!</p>