ddraw: make some driver info not const

Rein Klazes wijn at wanadoo.nl
Fri Dec 2 12:46:39 CST 2005


Hi,

Davi-Tuin 3D Deluxe, a Dutch garden CAD program tries to write to some
protected driver information (watch the 0x7e347460 address):

|Unhandled exception: page fault on write access to 0x7e347460 in 32-bit code (0x004a194a).
[...]
|Backtrace:
|=>1 0x004a194a in tuin3d (+0xa194a) (0x004a194a)
|  2 0x7e32d6cf DirectDrawEnumerateProcA+0x2f(lpGUID=0x0, lpDriverDescription=0x7e347660, lpDriverName=0x7e347460, lpContext=0x7ba8f984, hm=0x0) [/wine/mywine/dlls/ddraw/main.c:274] in ddraw (0x7e32d6cf)

Making this information not const makes the application proceed further.

Changelog:
dlls/ddraw	: ddraw_hal.c, ddraw_user.c
Make some driver info not const, some applications want to modify it.

Rein.
-------------- next part --------------
--- wine/dlls/ddraw/ddraw_hal.c	2005-08-09 15:31:05.000000000 +0200
+++ mywine/dlls/ddraw/ddraw_hal.c	2005-12-02 17:47:04.000000000 +0100
@@ -41,7 +41,8 @@ static DDVERSIONDATA hal_version;
 static DD32BITDRIVERDATA hal_driverdata;
 static HINSTANCE hal_instance;
 
-static const DDDEVICEIDENTIFIER2 hal_device =
+/* no const: this must be writable */ 
+static DDDEVICEIDENTIFIER2 hal_device =
 {
     "display",
     "DirectDraw HAL",
--- wine/dlls/ddraw/ddraw_user.c	2005-10-17 12:48:45.000000000 +0200
+++ mywine/dlls/ddraw/ddraw_user.c	2005-12-02 17:47:27.000000000 +0100
@@ -38,7 +38,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(ddraw);
 
 static const IDirectDraw7Vtbl User_DirectDraw_VTable;
 
-static const DDDEVICEIDENTIFIER2 user_device =
+/* no const: this must be writable */ 
+static DDDEVICEIDENTIFIER2 user_device =
 {
     "display",
     "User (and GDI)",


More information about the wine-patches mailing list