<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>> Subject: Re: [fpc-pascal] windows.GetProcAddress() vs DynLibs.GetProcAddress()<br><div>> <br>> In our previous episode, Fred van Stappen said:<br>> > I have only a problem with one procedure:<br>> > <br>> > This c procedure is declared as this :<br>> > SOUNDTOUCHDLL_API void __cdecl soundtouch_setSampleRate(HANDLE h, unsigned int srate);<br>> > <br>> > And i translate it like that :<br>> > <br>> > soundtouch_setSampleRate : procedure(h : THandle; srate : cardinal); cdecl;<br>> > and for dynamic-loading :<br>> > Pointer(soundtouch_setSampleRate):= GetProcAddress(LibHandle, Pchar('_ZN10soundtouch10SoundTouch13setSampleRateEj'));<br>> > <br>> > Sadly i get that message when i try to load that procedure : <br>> <br>> Handle is not defined on Linux. Many libraries emulate some handle type, but<br>> it depends on the vendor if they make handle 32-bit or 64-bit.<br>> <br>> Make sure that sizeof(HANDLE) in C++ matches sizeof(THandle) in FPC. Adjust<br>> the type you use at the FPC side if necessary.<br><br><br>Yep, Marco, many thanks...<br><br>Hum, :<br>> Make sure that sizeof(HANDLE) in C++ matches sizeof(THandle) in FPC. <br>>Adjust the type you use at the FPC side if necessary. <br><br>How to do that ? (sorry, i do not understand)<br></div> </div></body>
</html>