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

Ewald ewald at yellowcouch.org
Fri Jan 17 17:36:14 CET 2014


On 17 Jan 2014, at 17:25, Ludo Brands wrote:

> On 01/17/2014 05:09 PM, Fred van Stappen wrote:
>> 
>>> I don't know if the Handle type in the header is defined by the C++
>> compiler
>>> or by the package itself. Consult their respective documentation for more
>>> info.
>> 
>> Here declaration of create instance :
>> 
>> // Create a new instance of SoundTouch processor.
>> SOUNDTOUCHDLL_API HANDLE __cdecl soundtouch_createInstance();
>> 
>> 
>> 
> 
> That routine is defined in SoundTouchDLL.cpp which is the windows dll
> wrapper. 

Note one detail: it is declared there as __stdcall, not as __cdecl, so perhaps this has something to do with it?

@Fred: Also note that the type HANDLE is defined there as a pointer, so [as a sanity test of sorts] sizeof(Handle {in pascal}) should be equal to sizeof(HANDLE /*in C/C++*/).

--
Ewald




More information about the fpc-pascal mailing list