Infinite loop with translation DLL
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(a)elektron.ikp.physik.tu-darmstadt.de Institut fuer Kernphysik Schlossgartenstrasse 9 64289 Darmstadt --------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------
2009/11/9 Uwe Bonnes <bon(a)elektron.ikp.physik.tu-darmstadt.de>:
Can anybody help with the flaw in my implementation? Or did anything change in wine?
I'm not sure if anything changed there recently, or if that's even supposed to work, but I suppose that one way to solve the problem would be to load the linux library dynamically with wine_dlopen() and explicitly load the entry points with wine_dlsym().
"Henri" == Henri Verbeet <hverbeet(a)gmail.com> writes:
Henri> 2009/11/9 Uwe Bonnes <bon(a)elektron.ikp.physik.tu-darmstadt.de>: >> Can anybody help with the flaw in my implementation? Or did anything >> change in wine? >> Henri> I'm not sure if anything changed there recently, or if that's Henri> even supposed to work, but I suppose that one way to solve the Henri> problem would be to load the linux library dynamically with Henri> wine_dlopen() and explicitly load the entry points with Henri> wine_dlsym(). I wonder how it works in dll/glu32 or what is different in my approach? Marcus: Do you have an example that uses dll/glu32? -- Uwe Bonnes bon(a)elektron.ikp.physik.tu-darmstadt.de Institut fuer Kernphysik Schlossgartenstrasse 9 64289 Darmstadt --------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------
On Mon, Nov 09, 2009 at 04:53:31PM +0100, Uwe Bonnes wrote:
"Henri" == Henri Verbeet <hverbeet(a)gmail.com> writes:
Henri> 2009/11/9 Uwe Bonnes <bon(a)elektron.ikp.physik.tu-darmstadt.de>: >> Can anybody help with the flaw in my implementation? Or did anything >> change in wine? >> Henri> I'm not sure if anything changed there recently, or if that's Henri> even supposed to work, but I suppose that one way to solve the Henri> problem would be to load the linux library dynamically with Henri> wine_dlopen() and explicitly load the entry points with Henri> wine_dlsym().
I wonder how it works in dll/glu32 or what is different in my approach?
Marcus: Do you have an example that uses dll/glu32?
No, I dont know. I have not used for years :/ Ciao, Marcus
participants (3)
-
Henri Verbeet -
Marcus Meissner -
Uwe Bonnes