[fpc-pascal] windows.GetProcAddress() vs DynLibs.GetProcAddress()

Tomas Hajny XHajT03 at hajny.biz
Mon Jan 13 12:07:54 CET 2014


On Mon, January 13, 2014 11:47, Fred van Stappen wrote:
> Hello.
>
> I have a external dll. In Windows i can access perfectly the procedures
> with
> GetProcAddress() if i use Windows unit.
>
> If i use DynLibs unit, prog crash when i try to load the procedure.
> I prefer to use DynLibs unit because i want to use the dll for Linux too
> (of course with library.so).
>
> I have try, in linux to access the procedure with DynLibs too but same
> crash than for Windows.
> What must i do to access procedure with DynLibs ?

Can you provide a simplified program demonstrating the problem? Does it
"crash" when trying the obtain the address, or when trying to use it (e.g.
after assignment to a procedural variable)? If it is the latter, have you
checked that the calling conventions of your DLL and your procedural type
match? If it is the former, how is the "crash" demonstrated (i.e. what
happens)?

Tomas





More information about the fpc-pascal mailing list