On 01/17/2014 03:55 PM, Fred van Stappen wrote:
>
>> > 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'));
>
>
>
That are functions without any parameters that seemingly don't do a lot.
Do you have any function working that takes a handle as a parameter?
What is the value of the handle that was returned?
Ludo
_______________________________________________
fpc-pascal maillist - [email protected]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal