http://bugs.winehq.org/show_bug.cgi?id=20711
--- Comment #11 from Markus mst@collogia.de 2010-03-23 15:59:48 --- Finally had some time to narrow down the cause of the error.
With the patch CoUninitialize is called es expected at the end of the application and not at the beginning during initialization of dinput8.dll. A call leads to a subcall of apartment_freeunusedlibraries(). In this function the system wants to unload dinput8.dll and crashes in the following line.
if (entry->dll->DllCanUnloadNow && (entry->dll->DllCanUnloadNow() == S_OK))
DllCanUnloadNow of dinput8 for some reason points to nowhere.