Hi,
( cc'd to the developer list. There might well be some better way to solve the problem.)
Eurdora 4.x and 5.x crash when handling a WM_PAINT message. The program gets a hdc from BeginPaint() and does a GetCurrentObject(hdc,OBJ_BITMAP) on that device context. In wine zero is returned and the program crashes as a result of that (step tracing it shows some math on it and then uses the result as a pointer). The same problem was reported on the developer list in: http://www.winehq.com/hypermail/wine-devel/2002/11/0599.htm
Since the program does not do anything suspicious between aquiring the dc handle and the GetCurrentObject, Checking under Windows (Win2000). I found that GetCurrentObject(,OBJ_BITMAP) on the the dc returned both by BeginPaint() and CreateDC(), retrieves a non-zero handle. The handle looks genuine, but the bitmap does not appear to be valid (funny dimensions and so).
My proposed solution is to do what CreatCompatibleDC already does: load a default bitmap in CreateDC(). This has worked here for a long time without any aparent problems.
Changelog:
objects: dc.c Load default stock bitmap in CreateDC()
Rein.