[fpc-pascal] windows.GetProcAddress() vs DynLibs.GetProcAddress()

Fred van Stappen fiens at hotmail.com
Mon Jan 13 23:06:47 CET 2014


From: ewald at yellowcouch.org
Date: Mon, 13 Jan 2014 21:25:27 +0100
To: fpc-pascal at lists.freepascal.org
Subject: Re: [fpc-pascal] windows.GetProcAddress() vs	DynLibs.GetProcAddress()


On 13 Jan 2014, at 17:33, Fred van Stappen wrote:Hello and many thanks to help.

Here demo to show the problem (i hope).

>> https://sites.google.com/site/fiensprototyping/dynlib_vs_windows.zip


in the dynlibs version, why do you use `PChar(1)` or `PChar(2)` [or ....] instead of the name of the function as the second argument in GetProcAddress()? Perhaps try `GetProcAddress(LibHandle,  'soundtouch_clear');` on line 54 and modify the rest in a similar fashion?
Hope it helps.--Ewald



_______________________________________________
fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Yep Ewald, many thank to help us ( and me).

The SoundTouch.dll uses index to call the procedures.

Like that :
 [Ordinal/Name Pointer]
    [   0] soundtouch_clear

    [   1] soundtouch_createInstance

    [   2] soundtouch_destroyInstance

>> try `GetProcAddress(LibHandle,  'soundtouch_clear');

I have try that, but it does not work...`

 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20140113/d0fc88ec/attachment.html>


More information about the fpc-pascal mailing list