In our previous episode, Fred van Stappen said:
> I have only a problem with one procedure:
> 
> This c procedure is declared as this :
> SOUNDTOUCHDLL_API void __cdecl soundtouch_setSampleRate(HANDLE h, unsigned 
> int srate);
> 
> And i translate it like that :
> 
> soundtouch_setSampleRate : procedure(h : THandle; srate :  cardinal); cdecl;
> and for dynamic-loading :
> Pointer(soundtouch_setSampleRate):= GetProcAddress(LibHandle, 
> Pchar('_ZN10soundtouch10SoundTouch13setSampleRateEj'));
> 
> Sadly i get that message when i try to load that procedure :  

Handle is not defined on Linux. Many libraries emulate some handle type, but
it depends on the vendor if they make handle 32-bit or 64-bit.

Make sure that sizeof(HANDLE) in C++  matches sizeof(THandle) in FPC. Adjust
the type you use at the FPC side if necessary.
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to