https://bugs.winehq.org/show_bug.cgi?id=41926
--- Comment #13 from Henri Verbeet hverbeet@gmail.com --- (In reply to Dmitry Timoshkov from comment #12)
(In reply to Dmitry Timoshkov from comment #11)
Exchanging first 2 params and passing HDC by value make it work.
The API returns an HDC (GetObjectType() returns 3 == OBJ_DC) in the provided storage, not an iface pointer though. Also, as as side effect the API call invalidates the passed in dd7 interface, so all further calls to it crash here.
Not sure how to interpret the results.
It looks like it's supposed to be something like this:
HRESULT WINAPI GetSurfaceFromDC(HDC dc, IDirectDrawSurface **surface, HDC *device_dc);
I suspect the last parameter is the DC for the display device corresponding to the ddraw object that created the surface, but didn't completely verify that.