[fpc-pascal] windows.GetProcAddress() vs DynLibs.GetProcAddress()
Michael Van Canneyt
michael at freepascal.org
Mon Jan 13 12:32:53 CET 2014
On Mon, 13 Jan 2014, Fred van Stappen wrote:
>
> >>> Here part of NOT working code (if i call soundtouch_createInstance, it crash)
> ...
> uses
> dynlibs ;
> ...
>
> var
> soundtouch_createInstance : function() : THandle; stdcall;
>
> ...
>
> procedure InitLib(LibFile : PAnsiChar);
> begin
> LibHandle:=DynLibs.LoadLibrary(libfilename);
> if LibHandle <> DynLibs.NilHandle then
>
> Pointer(soundtouch_createInstance) := DynLibs.GetProcedureAddress(LibHandle, PAnsiChar('soundtouch_createInstance'));
Remove the typecast PansiChar()
Michael.
More information about the fpc-pascal
mailing list