[PATCH] comdlg32: Improve stub for PrintDlgEx

Detlef Riekenberg wine.dev at web.de
Thu Oct 25 17:22:32 CDT 2007


---
 dlls/comdlg32/printdlg.c |   53 +++++++++++++++++++++++++++++++---------------
 1 files changed, 36 insertions(+), 17 deletions(-)

diff --git a/dlls/comdlg32/printdlg.c b/dlls/comdlg32/printdlg.c
index 009af2a..d1d3cdc 100644
--- a/dlls/comdlg32/printdlg.c
+++ b/dlls/comdlg32/printdlg.c
@@ -1987,7 +1987,7 @@ static BOOL PRINTDLG_CreateDCW(LPPRINTDL
 /***********************************************************************
  *           PrintDlgA   (COMDLG32.@)
  *
- *  Displays the PRINT dialog box, which enables the user to specify
+ *  Displays the the PRINT dialog box, which enables the user to specify
  *  specific properties of the print job.
  *  
  * PARAMS
@@ -3359,7 +3359,7 @@ PageDlgProcW(HWND hDlg, UINT uMsg, WPARA
 /***********************************************************************
  *            PageSetupDlgA  (COMDLG32.@)
  *
- *  Displays the PAGE SETUP dialog box, which enables the user to specify
+ *  Displays the the PAGE SETUP dialog box, which enables the user to specify
  *  specific properties of a printed page such as
  *  size, source, orientation and the width of the page margins.
  *
@@ -3568,25 +3568,30 @@ BOOL WINAPI PageSetupDlgW(LPPAGESETUPDLG
 }
 
 /***********************************************************************
- *	PrintDlgExA (COMDLG32.@)
+ * PrintDlgExA (COMDLG32.@)
  *
  * See PrintDlgExW.
  *
- * FIXME
- *   Stub
  */
-HRESULT WINAPI PrintDlgExA(LPPRINTDLGEXA lpPrintDlgExA)
+HRESULT WINAPI PrintDlgExA(LPPRINTDLGEXA lppd)
 {
-	FIXME("stub\n");
-	return E_NOTIMPL;
+
+    FIXME("(%p) stub\n", lppd);
+    if ((lppd == NULL) || (lppd->lStructSize != sizeof(PRINTDLGEXA))) {
+        return E_INVALIDARG;
+    }
+
+    if (!IsWindow(lppd->hwndOwner)) {
+        return E_HANDLE;
+    }
+
+    return E_NOTIMPL;
 }
 
 /***********************************************************************
- *	PrintDlgExW (COMDLG32.@)
+ * PrintDlgExW (COMDLG32.@)
  *
- * Displays the PRINT dialog box, which enables the user to specify
- * specific properties of the print job.  The property sheet can also have
- * additional application-specific and driver-specific property pages.
+ * Display the property sheet style PRINT dialog box
  *  
  * PARAMS
  *  lppd  [IO] ptr to PRINTDLGEX struct
@@ -3600,11 +3605,25 @@ HRESULT WINAPI PrintDlgExA(LPPRINTDLGEXA
  *    E_HANDLE      Invalid handle.
  *    E_FAIL        Unspecified error.
  *  
- * FIXME
- *   Stub
+ * NOTES
+ * This Dialog enables the user to specify specific properties of the print job.
+ * The property sheet can also have additional application-specific and
+ * driver-specific property pages.
+ *
+ * BUGS
+ *   Only a Stub
  */
-HRESULT WINAPI PrintDlgExW(LPPRINTDLGEXW lpPrintDlgExW)
+HRESULT WINAPI PrintDlgExW(LPPRINTDLGEXW lppd)
 {
-	FIXME("stub\n");
-	return E_NOTIMPL;
+
+    FIXME("(%p) stub\n", lppd);
+    if ((lppd == NULL) || (lppd->lStructSize != sizeof(PRINTDLGEXW))) {
+        return E_INVALIDARG;
+    }
+
+    if (!IsWindow(lppd->hwndOwner)) {
+        return E_HANDLE;
+    }
+
+    return E_NOTIMPL;
 }
-- 
1.4.1


--=-mxEhRxzoh7ES9y++BLLR--




More information about the wine-patches mailing list