[fpc-pascal] load a library twice
xrfang at gmail.com
Thu Apr 2 16:49:58 CEST 2015
Is the following correct:
h1, h2: TLibHandle;
lib1, lib2: string;
lib1 := 'library.so';
lib2 := 'library.so';
h1 := LoadLibrary(lib1);
h2 := LoadLibrary(lib2);
The reason I need this is that I would like to keep the possibility to
provide different group of functions in the same or two different
libraries. For example, lib1 provides function A, lib2 provide function B,
or, lib3 provide both function A and B.
If I open the same library via 2 different handles, are they actually
pointing to the same memory address internally, so that if I UnloadLibrary,
it will cause something like access violation in the second call?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the fpc-pascal