[fpc-pascal] fpc required to dynamic load VS DLL ?
Fred van Stappen
fiens at hotmail.com
Wed Jun 19 15:12:46 CEST 2013
Hello.
I use a external C library (call parent-lib). That library uses a other external library (call child-lib).
To compile a DLL using a external DLL with Microsoft Visual Studio, you need the lib file of the child-lib.
If you want to dynamically load those libraries, you need to use "loadlibrary" and so you can choose the folder of your library.
Sadly, the child-lib cannot dynamically be loaded with Visual Studio.
You need to place the child-lib in the same folder that the parent-lib and if you load the parent-lib, it load the child-lib...(same for unload).
Now, if i use fpc, translate the C header and use DynLibs.LoadLibrary for both libraries... it works, i can load both parent and child libraries, even if they are not in the same folder (and of course access all the functions)...
I can also load only the parent-lib or child-lib or both. (even for unload)
So the question is : Is fpc required to dynamic load C DLL ? ;-)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20130619/f05c9984/attachment.html>
More information about the fpc-pascal
mailing list