http://bugs.winehq.org/show_bug.cgi?id=30602
--- Comment #3 from Henri Verbeet hverbeet@gmail.com 2012-06-14 08:11:21 CDT --- Created attachment 40541 --> http://bugs.winehq.org/attachment.cgi?id=40541 patch
The issue is that the game unloads ddraw (and as a result ddraw) from its WM_DESTROY handler while the window is still registered with wined3d. That means that when it returns from its own window proc to the wined3d one the wined3d dll is already unmapped. The attached patch should help, although it isn't particularly pretty.