My code is part of a windows 32bit library, realized , compiled end built under delphi ( 4, 5, ecc..) without errors.
I want to port it under lazarus ( 0.9.26 ) for windows 32bit.
Here my code, where i suppressed the other not important lines:
library Libreria;
{$mode objfpc}{$H+}
uses
Windows,
Messages,
SysUtils,
Classes,
(*
Graphics,
Controls,
Forms,
StdCtrls,
*)
Dialogs;
...
TYPE TAzione = PROCEDURE( Action : PChar );
...
VAR var_azione : TAzione;
...
PROCEDURE Pippo( Puntatore : POINTER );
BEGIN
var_azione := @TAzione( Puntatore ); <<<<< ERROR
END;
...
EXPORTS Pippo;
...
The compilation error , into Pippo PROCEDURE, is
Libreria.lpr(175,23) Error: Incompatible types: got "Pointer" expected "<procedure variable type of procedure(PChar);Register>"
can you help me?