Eric Pouech : gdi.exe: Rewrite QueryAbort16 to be independant of gdi32. dll internals.

Alexandre Julliard julliard at winehq.org
Mon Nov 16 11:43:58 CST 2009


Module: wine
Branch: master
Commit: 40eea7acd7834771d1f12cbf7b3fddf5694b3e97
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=40eea7acd7834771d1f12cbf7b3fddf5694b3e97

Author: Eric Pouech <eric.pouech at orange.fr>
Date:   Sun Nov 15 22:10:05 2009 +0100

gdi.exe: Rewrite QueryAbort16 to be independant of gdi32.dll internals.

---

 dlls/gdi32/gdi16.c      |   21 +++++++++++++++++++++
 dlls/gdi32/printdrv16.c |   25 -------------------------
 2 files changed, 21 insertions(+), 25 deletions(-)

diff --git a/dlls/gdi32/gdi16.c b/dlls/gdi32/gdi16.c
index 6579f86..37a15e9 100644
--- a/dlls/gdi32/gdi16.c
+++ b/dlls/gdi32/gdi16.c
@@ -135,6 +135,27 @@ static struct gdi_thunk*        GDI_FindThunk(HDC16 hdc)
 }
 
 /**********************************************************************
+ *           QueryAbort   (GDI.155)
+ *
+ *  Calls the app's AbortProc function if avail.
+ *
+ * RETURNS
+ * TRUE if no AbortProc avail or AbortProc wants to continue printing.
+ * FALSE if AbortProc wants to abort printing.
+ */
+BOOL16 WINAPI QueryAbort16(HDC16 hdc16, INT16 reserved)
+{
+    struct gdi_thunk* thunk = GDI_FindThunk(hdc16);
+
+    if (!thunk) {
+        ERR("Invalid hdc 0x%x\n", hdc16);
+	return FALSE;
+    }
+    return GDI_Callback3216( thunk->pfn16, HDC_32(hdc16), 0 );
+}
+
+
+/**********************************************************************
  *           SetAbortProc   (GDI.381)
  */
 INT16 WINAPI SetAbortProc16(HDC16 hdc16, ABORTPROC16 abrtprc)
diff --git a/dlls/gdi32/printdrv16.c b/dlls/gdi32/printdrv16.c
index d71a752..f0b8cf0 100644
--- a/dlls/gdi32/printdrv16.c
+++ b/dlls/gdi32/printdrv16.c
@@ -57,31 +57,6 @@ static const char DefaultDevMode[]    = "Default DevMode";
 static const char PrinterDriverData[] = "PrinterDriverData";
 static const char Printers[]          = "System\\CurrentControlSet\\Control\\Print\\Printers\\";
 
-/**********************************************************************
- *           QueryAbort   (GDI.155)
- *
- *  Calls the app's AbortProc function if avail.
- *
- * RETURNS
- * TRUE if no AbortProc avail or AbortProc wants to continue printing.
- * FALSE if AbortProc wants to abort printing.
- */
-BOOL16 WINAPI QueryAbort16(HDC16 hdc16, INT16 reserved)
-{
-    BOOL ret = TRUE;
-    HDC hdc = HDC_32( hdc16 );
-    DC *dc = get_dc_ptr( hdc );
-
-    if(!dc) {
-        ERR("Invalid hdc %p\n", hdc);
-	return FALSE;
-    }
-    if (dc->pAbortProc) ret = dc->pAbortProc(hdc, 0);
-    release_dc_ptr( dc );
-    return ret;
-}
-
-
 /****************** misc. printer related functions */
 
 /*




More information about the wine-cvs mailing list