Infinite loop with translation DLL

Uwe Bonnes bon at elektron.ikp.physik.tu-darmstadt.de
Mon Nov 9 04:11:44 CST 2009


Hello,

around July 2009, I implemented a translation dll, allowing to run Win32
programms using ftd2xx.dll with Wine translating the calls to
linux-libftd2xx. It was done while looking at dll/glu32.

I was able to run mprog.exe (www.ftdichip.org) some time ago. Reapplying
now, I hit an infinite loop with the first translated call.

I short, ftd2xx.spec contains:

@ stdcall FT_ListDevices(ptr ptr long) FTD2XX_FT_ListDevices

and ftd2xx_main.c:

extern FT_STATUS FT_ListDevices(PVOID, PVOID, DWORD);
FT_STATUS WINAPI FTD2XX_FT_ListDevices(
        PVOID pArg1,
        PVOID pArg2,
        DWORD Flags
        )
{
  FT_STATUS res = FT_ListDevices(pArg1, pArg2, Flags);
  TRACE("res %s\n",  res2string(res));
  return res;
}

and dlls/ftd2xx/Makefile.in contains:
EXTRALIBS = @FTD2XXLIBS@

with EXTRALIBS detected in configure.ac.

MProig.exe calls  FT_ListDevices(), which is resolves as
FTD2XX_FT_ListDevices(). Then
FTD2XX_FT_ListDevices() is entered and FT_ListDevices() resolves again to
FTD2XX_FT_ListDevices(), resulting in an infinite loop.

Can anybody help with the flaw in my implementation? Or did anything change
in wine?

The patches still linger on the mailing-list as "Stub implementation for ftd2xx.dll"

Thanks

-- 
Uwe Bonnes                bon at elektron.ikp.physik.tu-darmstadt.de

Institut fuer Kernphysik  Schlossgartenstrasse 9  64289 Darmstadt
--------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------



More information about the wine-devel mailing list