<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'><br><div>On Mon, 13 Jan 2014, Fred van Stappen wrote:<br><pre> <br>> > > begin<br>> > > LibHandle:=DynLibs.LoadLibrary(libfilename);<br>> > > if LibHandle <> DynLibs.NilHandle then<br>> > > <br>> > > Pointer(soundtouch_createInstance) := DynLibs.GetProcedureAddress(LibHandle, PAnsiChar('soundtouch_createInstance<br>> '));<br>> > <br>> > Remove the typecast PansiChar()<br>> > <br>> > Michael.<br>> > >> Hello Michael and thanks for answer.<br>> > But if i remove PansiChar(), i still get :<br>> > An unhandled exception occurred at $0000000000000000:<br>> > EAccessViolation: Access violation<br>> > $0000000000000000<br>> <br>> What is the value of Pointer(soundtouch_createInstance) after the above statement ? Is it nil ?<br>> <br>> Michael.<br>> Thanks for answer Michael.<br>> <br>> Hum, how can i get the value of pointer if the application crash when i do :<br>> <br>> >> FHandle := soundtouch_createInstance(); <br> <br>Do a<br> <br>Writeln((@soundtouch_createInstance)=Nil);<br> <br>Michael.<br>___________<br><br>Thanks Michael.<br><br>Result in Linux for :<br><br>if ST_Load('/home/fred/libSoundTouch/libSoundTouch.so')
<br> then writeln('ok') else writeln('no') ;
<br>>> ok<br><br>Writeln((@soundtouch_createInstance)=Nil);
>> FALSE<br><br>I agree it is very strange, in windows, with unit Windows, it works perfectly..<br> <br></pre><br>_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal</div> </div></body>
</html>