68 "returned %u with %u and 0x%x (expected '0' and "
76 "returned %u with %u and 0x%x (expected '0' and "
85 "returned %u with %u and 0x%x (expected '0' and CDERR_STRUCTSIZE)\n",
95 "returned %u with %u and 0x%x (expected '!= 0' or '0' and "
99 skip(
"No printer configured.\n");
105 "got %p and %p (expected '!= NULL' for both)\n",
149 "returned %d with 0x%x and 0x%x (expected '0' and "
157 "returned %d with 0x%x and 0x%x (expected '0' and "
166 "returned %u with %u and 0x%x (expected '0' and "
176 "returned %d with 0x%x and 0x%x (expected '!= 0' or '0' and "
180 skip(
"No printer configured.\n");
187 ok(pDevNames !=
NULL,
"(expected '!= NULL')\n");
216 "got %u with %u and %p for '%s' (expected '>1' and '!= NULL')\n",
224 ok(n_copies > 0,
"DeviceCapabilities(DC_COPIES) failed\n");
248 ok(pDlg->
hDevMode != 0,
"hDevMode should not be 0\n");
252 "expected dm->dmCopies 1, got %d\n",
S1(
U1(*dm)).dmCopies);
264 ok(pDlg->
hDevMode != 0,
"hDevMode should not be 0\n");
266 ok(
S1(
U1(*dm)).dmCopies == 123,
"expected dm->dmCopies 123, got %d\n",
S1(
U1(*dm)).dmCopies);
286 trace(
"callback_AddRef\n");
292 trace(
"callback_Release\n");
298 trace(
"callback_InitDone\n");
304 trace(
"callback_SelectionChange\n");
311 trace(
"callback_HandleMessage %p,%04x,%lx,%lx,%p\n", hdlg,
msg, wp, lp,
res);
350 trace(
"unknown_AddRef\n");
356 trace(
"unknown_Release\n");
371 PRINTPAGERANGE pagerange[2];
378 skip(
"PrintDlgExW not available\n");
389 "got 0x%x with %u and %u (expected 'E_INVALIDARG')\n",
398 pDlg->lStructSize =
sizeof(PRINTDLGEXW) - 1;
401 res = pPrintDlgExW(pDlg);
403 "got 0x%x with %u and %u (expected 'E_INVALIDARG')\n",
408 pDlg->lStructSize =
sizeof(PRINTDLGEXW) + 1;
411 res = pPrintDlgExW(pDlg);
413 "got 0x%x with %u and %u (expected 'E_INVALIDARG')\n",
418 pDlg->lStructSize =
sizeof(PRINTDLGEXW);
420 res = pPrintDlgExW(pDlg);
422 "got 0x%x with %u and %u (expected 'E_HANDLE')\n",
427 pDlg->lStructSize =
sizeof(PRINTDLGEXW);
430 res = pPrintDlgExW(pDlg);
435 pDlg->lStructSize =
sizeof(PRINTDLGEXW);
439 res = pPrintDlgExW(pDlg);
444 pDlg->lStructSize =
sizeof(PRINTDLGEXW);
447 pDlg->lpPageRanges = pagerange;
449 res = pPrintDlgExW(pDlg);
454 pDlg->lStructSize =
sizeof(PRINTDLGEXW);
457 pDlg->nMaxPageRanges = 1;
459 res = pPrintDlgExW(pDlg);
464 pDlg->lStructSize =
sizeof(PRINTDLGEXW);
467 pDlg->nMaxPageRanges = 1;
468 pDlg->lpPageRanges = pagerange;
470 res = pPrintDlgExW(pDlg);
473 skip(
"No printer configured.\n");
481 ok(dn !=
NULL,
"expected '!= NULL' for GlobalLock(%p)\n",pDlg->hDevNames);
496 pDlg->lStructSize =
sizeof(PRINTDLGEXW);
500 res = pPrintDlgExW(pDlg);
507 pDlg->lStructSize =
sizeof(PRINTDLGEXW);
511 res = pPrintDlgExW(pDlg);
513 ok(pDlg->hDC !=
NULL,
"HDC missing for PD_RETURNDC\n");
520 pDlg->lStructSize =
sizeof(PRINTDLGEXW);
524 res = pPrintDlgExW(pDlg);
526 ok(pDlg->hDC !=
NULL,
"HDC missing for PD_RETURNIC\n");
535 skip(
"interactive PrintDlgEx tests (set WINETEST_INTERACTIVE=1)\n");
541 pDlg->lStructSize =
sizeof(PRINTDLGEXW);
546 pDlg->dwResultAction =
S_OK;
547 res = pPrintDlgExW(pDlg);
549 ok(pDlg->dwResultAction ==
PD_RESULT_PRINT,
"expected PD_RESULT_PRINT, got %#x\n", pDlg->dwResultAction);
550 ok(pDlg->hDC !=
NULL,
"HDC missing for PD_RETURNIC\n");
571 skip(
"Failed to create a temporary file name\n");
583 skip(
"No default printer available.\n");
589 ok(pd.
hDC !=
NULL,
"PrintDlg didn't return a DC.\n");
590 if (!(print_dc = pd.
hDC))
597 doc_info.
cbSize =
sizeof(doc_info);
605 "StartDocA failed ret %d gle %d\n", job_id,
GetLastError());
609 skip(
"StartDoc failed\n");
622 ok(
EndPage(print_dc) > 0,
"EndPage failed\n");
623 ok(
EndDoc(print_dc) > 0,
"EndDoc failed\n");
char * strchr(const char *String, int ch)
#define PDERR_NODEFAULTPRN
#define CDERR_INITIALIZATION
DWORD WINAPI CommDlgExtendedError(void)
struct tagPSDA PAGESETUPDLGA
#define START_PAGE_GENERAL
#define PD_USEDEVMODECOPIES
#define PD_ENABLEPRINTHOOK
#define PSD_RETURNDEFAULT
BOOL WINAPI PageSetupDlgA(LPPAGESETUPDLGA setupdlg)
BOOL WINAPI PrintDlgA(LPPRINTDLGA lppd)
#define GetProcAddress(x, y)
#define HeapFree(x, y, z)
BOOL WINAPI DeleteFileA(IN LPCSTR lpFileName)
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
INT WINAPI GetProfileStringA(LPCSTR section, LPCSTR entry, LPCSTR def_val, LPSTR buffer, UINT len)
int WINAPI lstrcmpiA(LPCSTR str1, LPCSTR str2)
UINT WINAPI GetTempFileNameA(IN LPCSTR lpPathName, IN LPCSTR lpPrefixString, IN UINT uUnique, OUT LPSTR lpTempFileName)
LPVOID NTAPI GlobalLock(HGLOBAL hMem)
HGLOBAL NTAPI GlobalFree(HGLOBAL hMem)
BOOL NTAPI GlobalUnlock(HGLOBAL hMem)
static IPrintDialogCallback callback
static const IPrintDialogCallbackVtbl callback_Vtbl
static BOOL CALLBACK abort_proc(HDC hdc, int error)
static HRESULT WINAPI callback_InitDone(IPrintDialogCallback *iface)
static HRESULT WINAPI callback_SelectionChange(IPrintDialogCallback *iface)
static const CHAR PrinterPortsA[]
static const IUnknownVtbl unknown_Vtbl
static ULONG WINAPI unknown_AddRef(IUnknown *iface)
static HRESULT WINAPI callback_HandleMessage(IPrintDialogCallback *iface, HWND hdlg, UINT msg, WPARAM wp, LPARAM lp, LRESULT *res)
static UINT_PTR CALLBACK print_hook_proc(HWND hdlg, UINT msg, WPARAM wp, LPARAM lp)
static HRESULT WINAPI unknown_QueryInterface(IUnknown *iface, REFIID riid, void **ppv)
static void test_PrintDlgExW(void)
static ULONG WINAPI callback_AddRef(IPrintDialogCallback *iface)
static void test_PageSetupDlgA(void)
static BOOL abort_proc_called
static ULONG WINAPI unknown_Release(IUnknown *iface)
static const CHAR emptyA[]
static ULONG WINAPI callback_Release(IPrintDialogCallback *iface)
static HRESULT WINAPI callback_QueryInterface(IPrintDialogCallback *iface, REFIID riid, void **ppv)
static void test_abort_proc(void)
const IID IID_IObjectWithSite
static void test_PrintDlgA(void)
struct @1673::@1674 driver
unsigned __int3264 UINT_PTR
#define IsEqualGUID(rguid1, rguid2)
_Check_return_ _CRTIMP _CONST_RETURN char *__cdecl strrchr(_In_z_ const char *_Str, _In_ int _Ch)
static __inline const char * wine_dbgstr_guid(const GUID *id)
LPPRINTHOOKPROC lpfnPrintHook
DWORD WINAPI GetLastError(void)
#define ERROR_SPL_NO_STARTDOC
DWORD WINAPI DeviceCapabilitiesA(_In_ LPCSTR pDevice, _In_opt_ LPCSTR pPort, _In_ WORD fwCapability, _Out_writes_opt_(_Inexpressible_(1)) LPSTR pOutput, _In_opt_ const DEVMODEA *pDevMode)
int WINAPI EndPage(_In_ HDC)
int WINAPI EndDoc(_In_ HDC)
int WINAPI StartDocA(_In_ HDC, _In_ const DOCINFOA *)
int WINAPI StartPage(_In_ HDC)
int WINAPI FillRect(HDC, LPCRECT, HBRUSH)
int WINAPI SetAbortProc(_In_ HDC, _In_ ABORTPROC)
BOOL WINAPI DeleteDC(_In_ HDC)
HWND WINAPI GetDesktopWindow(void)
BOOL WINAPI SetDlgItemInt(_In_ HWND, _In_ int, _In_ UINT, _In_ BOOL)
BOOL WINAPI PostMessageA(_In_opt_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)