Hi,
When executing the DllMain of the native IR32_32.DLL (VFW), Wine crashes. After some investigations, I found that a part of the code uses the EBX register at one point without saving and restore it afterwards. Since this register contains the PLT pointer for standard unix functions like libc ones, this does not take a long time for Wine to crashing. I tested with the ugly hack attached that saves and restores the EBX register between the call to DllMain and that fixed the problem and the DLL works fine then.
This might happen.
That ebx can be scrapped?
Yes. I have seen such a case too, however in a windows WDM driver.
However, the Win32 ABI specifies that the registers should be saved across a function call, so this is a bug in IR32_32.DLL I think.
googling gives something like:
http://www.codeproject.com/cpp/calling_conventions_demystified.asp?print=tru... http://weblogs.asp.net/oldnewthing/archive/2004/01/08/48616.aspx
Ciao, Marcus