Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
2c531ade
Commit
2c531ade
authored
Dec 14, 2006
by
Francois Gouget
Committed by
Alexandre Julliard
Dec 14, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comdlg32: Fix PrintDlg(NULL) and reenable a test that was in an '#if 0'.
Fix the test so it compiles without warnings.
parent
458ebf42
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
11 deletions
+20
-11
printdlg.c
dlls/comdlg32/printdlg.c
+19
-7
printdlg.c
dlls/comdlg32/tests/printdlg.c
+1
-4
No files found.
dlls/comdlg32/printdlg.c
View file @
2c531ade
...
...
@@ -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
;
...
...
dlls/comdlg32/tests/printdlg.c
View file @
2c531ade
...
...
@@ -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%l
x (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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment