comdlg32/tests: More tests for the member lStructSize.

This commit is contained in:
Detlef Riekenberg 2007-08-10 07:12:04 +02:00 committed by Alexandre Julliard
parent f8b2b77f69
commit 84e4904ffd

View file

@ -58,6 +58,15 @@ static void test_PageSetupDlgA(void)
"returned %u with %u and 0x%x (expected '0' and "
"CDERR_STRUCTSIZE)\n", res, GetLastError(), CommDlgExtendedError());
ZeroMemory(pDlg, sizeof(PAGESETUPDLGA));
pDlg->lStructSize = sizeof(PAGESETUPDLGA) +1;
pDlg->Flags = PSD_RETURNDEFAULT;
SetLastError(0xdeadbeef);
res = PageSetupDlgA(pDlg);
ok( !res && (CommDlgExtendedError() == CDERR_STRUCTSIZE),
"returned %u with %u and 0x%x (expected '0' and CDERR_STRUCTSIZE)\n",
res, GetLastError(), CommDlgExtendedError());
ZeroMemory(pDlg, sizeof(PAGESETUPDLGA));
pDlg->lStructSize = sizeof(PAGESETUPDLGA);
@ -106,6 +115,15 @@ static void test_PrintDlgA(void)
"returned %d with 0x%x and 0x%x (expected '0' and "
"CDERR_STRUCTSIZE)\n", res, GetLastError(), CommDlgExtendedError());
ZeroMemory(pDlg, sizeof(PRINTDLGA));
pDlg->lStructSize = sizeof(PRINTDLGA) + 1;
pDlg->Flags = PD_RETURNDEFAULT;
SetLastError(0xdeadbeef);
res = PrintDlgA(pDlg);
ok( !res && (CommDlgExtendedError() == CDERR_STRUCTSIZE),
"returned %u with %u and 0x%x (expected '0' and "
"CDERR_STRUCTSIZE)\n", res, GetLastError(), CommDlgExtendedError());
ZeroMemory(pDlg, sizeof(PRINTDLGA));
pDlg->lStructSize = sizeof(PRINTDLGA);