Board index » delphi » calling dll's from Delphi 3

calling dll's from Delphi 3

From Delphi 3 in Windows NT I call a LaHey Fortran dll using LoadLibrary to
get the dll handle, and FreeLibrary to release the dll:

Handle:= LoadLibrary('filter.dll');

When I repeat this several times two unwanted effects occur:

1 The memory used by the dll is not released, while no shared memeory is
used. 2 The dll gives different results every time it is called, while they
should be equal.

Does anybody have an idea what might be the cause and what could be done
about it? All suggestions are appreciated!


Frank Tap

-----------== Posted via Deja News, The Discussion Network ==----------       Search, Read, Discuss, or Start Your Own    


Re:calling dll's from Delphi 3

Dear Frank,

I don't know exacly what kind of functions are included in the dll, but
of the name 'filter' I suppose it has something to do with strings.
You can't pass strings to a dll (unless you add sharemem to the uses clause
of both the unit and the dll unit)
Instead try using PChar. This will work fine and spare you the overhead of


Almer. S. Tigelaar

Other Threads