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

Mark Morgan Lloyd markMLl.fpc-pascal at telemetry.co.uk
Mon Jan 13 12:37:41 CET 2014


Tomas Hajny wrote:
> 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)?

Also note the availability of GetLoadErrorStr on most platforms in later 
versions of the RTL (>= 2.6.2 I think).

-- 
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]



More information about the fpc-pascal mailing list