Access violation when exiting program

Andrej Mitrovic andrej.mitrovich at gmail.com
Mon Jun 17 17:16:09 PDT 2013


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


More information about the Digitalmars-d-learn mailing list