[fpc-pascal] windows.GetProcAddress() vs DynLibs.GetProcAddress()
Fred van Stappen
fiens at hotmail.com
Fri Jan 17 15:55:10 CET 2014
> > I run nm and find the name of the procedures ( PS : without nm-Ewald's tip, you must be a high soothsayer to find it)
> > For example, a C called procedure : soundtouch_getVersionString() becomes : _ZN10soundtouch10SoundTouch16getVersionStringEv() !!!
> >
>
> The _ZN10soundtouch10SoundTouch16getVersionStringEv name mangling
> suggests that this is a C++ lib, not a C lib. Generally speaking, you
> can't call C++ libs from fpc.
>
> Ludo
Yep, Ludo, many thanks to take care but...
I have a test program who use some procedures to test , for example :
FVersionID := soundtouch_getVersionId();
FVersionString := StrPas(soundtouch_getVersionString());
writeln(FVersionID);
writeln(FVersionString);
>>> Result :
> 10800
> 1.8.0
So, it seems to work...
Those procedures are declared as this :
Pointer(soundtouch_getVersionId) := GetProcAddress(LibHandle, Pchar('_ZN10soundtouch10SoundTouch12getVersionIdEv'));
Pointer(soundtouch_getVersionString):= GetProcAddress(LibHandle,Pchar('_ZN10soundtouch10SoundTouch16getVersionStringEv'));
I only have problem with :
_ZN10soundtouch10SoundTouch16getVersionStringEv()...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20140117/8b2d33e8/attachment.html>
More information about the fpc-pascal
mailing list