*Windows increases the refcount of the DirectDraw7 object by 1 when a surface is created. When the surface is released, the refcount of the DirectDraw7 object is decreased, obviously. Wine doesn't do so(yet), and to my current knowledge, this is what makes Empire Earth crash.
Yeah, this is what I suspected: that Wine had some reference counting differences with Windows that provoked this error.
Best would be to write a 'DDraw' test (integrated in the test suite) to be able to check reference counting in some 'standard' cases (surface creation, D3D object creation, ...).
I am looking for a good place to place the AddRef and Release calls to solve the first issue, and I'll send a patch as soon as I have one.
Well, as we call a DDraw 'method' to create the surface, you should add the AddRef call there. For the release, it should be in the 'final_release' call for the surface (AFAIK, each surface already stores a pointer to its parent DDraw object).
Lionel