[fpc-devel]Error Delphi load DLL, when DLL created in FPC
Zbigniew KuczbaĆski
zbyszek at router.pixel.pl
Thu Nov 21 12:09:06 CET 2002
> Subject: [fpc-devel]Error Delphi load DLL, when DLL created in FPC
> Reply-To: fpc-devel at lists.freepascal.org
>
> Hi,
> I have problem when I create DLL in FPC. (FPC 1.06 Win32)
> 1.When create DLL in FPC and use it in program written in FPC - it works
> OK.
> 2. The same DLL (created in FPC) and use in Delphi (6.0) - Delphi report
> error when loading DLL.
>
> What I can do, to write DLL in FPC and use it in Delphi.
> It's very strange for me, because both use teh same function to Load
DLL ->
> LoadLibrary!
>
> Best regards
> Zb. Kuczbanski
>
>
> Here sample code my_dll.
> ----------------------------------------------
> Library my_dll;
> Begin
> WriteLn('Loaded DLL1');
> End.
OK, it is no important, what do DLL, I check it for new code of DLL.
Library DLL1;
uses Sysutils;
var F: LongInt;
szStr : array[0..100] of Char;
Begin
F:=FileCreate('Dll1.log');
strcopy(szStr,'Dll1 is loaded');
FileWrite(F,szStr,StrLen(szStr));
FileClose(F);
End.
When this DLL load program written in Delphi, it show Error (function
LoadLibrary)
In my opinion situation similar to show in Bug 2232.
I check this bug, when both DLL created in Delphi. In this case both DLL
loaded corecctly!
What I can do, to write DLL in FPC and use it in Delphi.
Zb. Kuczbanski
More information about the fpc-devel
mailing list