From 0f53dbf32b7247c3358e53f09fc910bd92a654c1 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Mon, 4 Nov 2002 22:37:57 +0000 Subject: [PATCH] Specify existing extra size of WINEPS Devmode structure. Make ExtDeviceMode16 in WINEPS return the correct size. --- dlls/wineps/driver.c | 4 ++-- dlls/wineps/init.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/wineps/driver.c b/dlls/wineps/driver.c index 4f479ca33d..d132e62a55 100644 --- a/dlls/wineps/driver.c +++ b/dlls/wineps/driver.c @@ -285,7 +285,7 @@ hwnd, hDriver, lpdmOutput, lpszDevice, lpszPort, lpdmInput, lpszProfile, fwMode); if(!fwMode) - return sizeof(DEVMODEA); /* Just copy dmPublic bit of PSDRV_DEVMODE */ + return pi->Devmode->dmPublic.dmSize + pi->Devmode->dmPublic.dmDriverExtra; if((fwMode & DM_MODIFY) && lpdmInput) { TRACE("DM_MODIFY set. devIn->dmFields = %08lx\n", lpdmInput->dmFields); @@ -337,7 +337,7 @@ fwMode); if((fwMode & DM_COPY) || (fwMode & DM_UPDATE)) { if (lpdmOutput) - memcpy(lpdmOutput, pi->Devmode, sizeof(DEVMODEA)); + memcpy(lpdmOutput, pi->Devmode, pi->Devmode->dmPublic.dmSize + pi->Devmode->dmPublic.dmDriverExtra ); else FIXME("lpdmOutput is NULL what should we do??\n"); } diff --git a/dlls/wineps/init.c b/dlls/wineps/init.c index 8a38dd14e4..668f47604b 100644 --- a/dlls/wineps/init.c +++ b/dlls/wineps/init.c @@ -46,7 +46,7 @@ static PSDRV_DEVMODEA DefaultDevmode = /* dmSpecVersion */ 0x30a, /* dmDriverVersion */ 0x001, /* dmSize */ sizeof(DEVMODEA), -/* dmDriverExtra */ 0, +/* dmDriverExtra */ sizeof(PSDRV_DEVMODEA)-sizeof(DEVMODEA), /* dmFields */ DM_ORIENTATION | DM_PAPERSIZE | DM_SCALE | DM_COPIES | DM_DEFAULTSOURCE | DM_COLOR | DM_DUPLEX | DM_YRESOLUTION | DM_TTOPTION, -- 2.32.0.93.g670b81a890