My system is Win10 and Lazarus 2.0.10 with freepascal 3.2.0.
I have successfuly converted a Delphi 7 project. This project makes use of two Windows dll's. The following code worked successfully when compiled with Delphi, but not with Lazarus. Lazarus build is successful so syntax seems OK, it is execution that is problematic.
the variable Wes5Handle is returned as a zero so the message 'Unable to load Wes5ENG.dll' is displayed.
Code is below, any input would be appreciated.
Wes5Handle := LoadLibrary('Wes5ENG.dll');
if Wes5Handle <> 0 then
@ftn_Wes5ENG := GetProcAddress(Wes5Handle,'_ftn_wes5eng@116')
else
MessageDlg('Unable to load Wes5ENG.dll',mtError,[mbAbort],0);
if (@ftn_Wes5ENG = nil) then
MessageDlg('Could not import function from Wes5ENG.dll',mtError,[mbAbort],0);