From 4f2a3c2c28a4c7815c0a277ed6ecbf471122ddf4 Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Tue, 7 Oct 2008 16:01:01 +0200 Subject: [PATCH] gdi32: Call AbortProc from StartDoc instead of EndPage. --- dlls/gdi32/printdrv.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/dlls/gdi32/printdrv.c b/dlls/gdi32/printdrv.c index b224896de40..7d2cb426f98 100644 --- a/dlls/gdi32/printdrv.c +++ b/dlls/gdi32/printdrv.c @@ -77,6 +77,12 @@ INT WINAPI StartDocW(HDC hdc, const DOCINFOW* doc) if(!dc) return SP_ERROR; + if (dc->pAbortProc && !dc->pAbortProc( hdc, 0 )) + { + release_dc_ptr( dc ); + return ret; + } + if (dc->funcs->pStartDoc) ret = dc->funcs->pStartDoc( dc->physDev, doc ); release_dc_ptr( dc ); return ret; @@ -173,11 +179,6 @@ INT WINAPI EndPage(HDC hdc) if(!dc) return SP_ERROR; if (dc->funcs->pEndPage) ret = dc->funcs->pEndPage( dc->physDev ); - if (dc->pAbortProc && !dc->pAbortProc( hdc, 0 )) - { - EndDoc( hdc ); - ret = 0; - } release_dc_ptr( dc ); return ret; }