On Tuesday, 4 June 2013 at 14:06:29 UTC, Frank Fuente wrote:
The function is declared...
alias extern (C) FT_STATUS function(uint* lpdwVersion) FT_GetLibraryVersion;

The calling convention is wrongly declared, it should be:

alias extern (Windows) FT_STATUS function(uint* lpdwVersion) FT_GetLibraryVersion;

From the header file[1] I can see it uses the WINAPI macro, which makes the function have the stdcall calling convention (extern(Windows) in D).

ftp://ftp.mn-net.com/Rapid_Tests/Software/USB%20DRIVER/FTDI_USB_32BIT/FTD2XX.H

Reply via email to