mirror of
https://github.com/reactos/wine.git
synced 2024-11-28 14:10:32 +00:00
comdlg32: Fix PrintDlg(NULL) and reenable a test that was in an '#if 0'.
Fix the test so it compiles without warnings.
This commit is contained in:
parent
458ebf423d
commit
2c531ade2e
@ -1994,9 +1994,16 @@ static BOOL PRINTDLG_CreateDCW(LPPRINTDLGW lppd)
|
||||
BOOL WINAPI PrintDlgA(LPPRINTDLGA lppd)
|
||||
{
|
||||
BOOL bRet = FALSE;
|
||||
LPVOID ptr;
|
||||
HINSTANCE hInst = (HINSTANCE)GetWindowLongPtrA( lppd->hwndOwner, GWLP_HINSTANCE );
|
||||
LPVOID ptr;
|
||||
HINSTANCE hInst;
|
||||
|
||||
if (!lppd)
|
||||
{
|
||||
COMDLG32_SetCommDlgExtendedError(CDERR_INITIALIZATION);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
hInst = (HINSTANCE)GetWindowLongPtrA( lppd->hwndOwner, GWLP_HINSTANCE );
|
||||
if(TRACE_ON(commdlg)) {
|
||||
char flagstr[1000] = "";
|
||||
const struct pd_flags *pflag = pd_flags;
|
||||
@ -2131,14 +2138,19 @@ BOOL WINAPI PrintDlgA(LPPRINTDLGA lppd)
|
||||
*
|
||||
* See PrintDlgA.
|
||||
*/
|
||||
BOOL WINAPI PrintDlgW(
|
||||
LPPRINTDLGW lppd /* [in/out] ptr to PRINTDLG32 struct */
|
||||
)
|
||||
BOOL WINAPI PrintDlgW(LPPRINTDLGW lppd)
|
||||
{
|
||||
BOOL bRet = FALSE;
|
||||
LPVOID ptr;
|
||||
HINSTANCE hInst = (HINSTANCE)GetWindowLongPtrW( lppd->hwndOwner, GWLP_HINSTANCE );
|
||||
LPVOID ptr;
|
||||
HINSTANCE hInst;
|
||||
|
||||
if (!lppd)
|
||||
{
|
||||
COMDLG32_SetCommDlgExtendedError(CDERR_INITIALIZATION);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
hInst = (HINSTANCE)GetWindowLongPtrW( lppd->hwndOwner, GWLP_HINSTANCE );
|
||||
if(TRACE_ON(commdlg)) {
|
||||
char flagstr[1000] = "";
|
||||
const struct pd_flags *pflag = pd_flags;
|
||||
|
@ -46,15 +46,12 @@ static void test_PrintDlgA(void)
|
||||
if (!pDlg) return;
|
||||
|
||||
|
||||
#if 0
|
||||
/* will crash with unpatched wine */
|
||||
SetLastError(0xdeadbeef);
|
||||
res = PrintDlgA(NULL);
|
||||
ok( !res && (CommDlgExtendedError() == CDERR_INITIALIZATION),
|
||||
"returned %ld with 0x%lx and 0x%lx (expected '0' and " \
|
||||
"returned %d with 0x%x and 0x%x (expected '0' and " \
|
||||
"CDERR_INITIALIZATION)\n", res, GetLastError(), CommDlgExtendedError());
|
||||
}
|
||||
#endif
|
||||
|
||||
ZeroMemory(pDlg, sizeof(PRINTDLGA));
|
||||
pDlg->lStructSize = sizeof(PRINTDLGA) - 1;
|
||||
|
Loading…
Reference in New Issue
Block a user