[Lazarus] Newbie, porting class to FPC but get procedure assignment error
Bo Berglund
bo.berglund at gmail.com
Fri Jun 19 09:50:37 CEST 2015
On Fri, 19 Jun 2015 09:38:01 +0200, Luca Olivetti <luca at wetron.es>
wrote:
>El 19/06/15 a les 09:25, Bo Berglund ha escrit:
>
>> constructor TSentinel.Create;
>> begin
>> FTimer := TTimer.Create(Application);
>> FTimer.Enabled := false;
>> FTimer.Interval := 0;
>> FTimer.OnTimer := OnCheckTimer(Self); //<= Error here
>> ...
>
>>
>> Why is this difference Delphi/FPC appearing and what can I do?
>>
>
>Either you use {$MODE DELPHI} or you prepend the method with @, i.e.
>
>FTimer.OnTimer := @OnCheckTimer
>
>See:
>
>http://wiki.freepascal.org/Code_Conversion_Guide
>
Amazing! Minutes to get a good solution! What a difference from the
Embarcadero support forum! :)
The address symbol did the job!
Now I am getting to the real hurdle as follows:
DongleTest.lpr(20,1) Error: Illegal COFF Magic while reading
SPROMEPS.OBJ
This caused by the following line in a suppurt file from SafeNet:
...
IMPLEMENTATION
USES
Windows;
{$L SPROMEPS.OBJ} { LINK WITH THE SUPERPRO OBJECT FILE }
{ External functions }
...
So what I have is an OBJ file that contains the binary interface to
the 12 needed Sentinel driver functions.
This obj file has worked in Delphi versions from D4 up to XE5 without
problems. Can it be used with Lazarus/FPC possibly with some linker
switch???
--
Bo Berglund
Developer in Sweden
More information about the Lazarus
mailing list