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
429705ea
Commit
429705ea
authored
Mar 01, 2017
by
Nikolay Sivov
Committed by
Alexandre Julliard
Mar 02, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/propsheet: Implement PSPCB_ADDREF/PSPCB_RELEASE notifications.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
a3aa217f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
10 deletions
+35
-10
propsheet.c
dlls/comctl32/propsheet.c
+35
-6
propsheet.c
dlls/comctl32/tests/propsheet.c
+0
-4
No files found.
dlls/comctl32/propsheet.c
View file @
429705ea
...
...
@@ -2962,10 +2962,20 @@ HPROPSHEETPAGE WINAPI CreatePropertySheetPageA(
if
(
lpPropSheetPage
->
dwSize
<
PROPSHEETPAGEA_V1_SIZE
)
return
NULL
;
ppsp
=
Alloc
(
sizeof
(
PROPSHEETPAGEW
));
memcpy
(
ppsp
,
lpPropSheetPage
,
min
(
lpPropSheetPage
->
dwSize
,
sizeof
(
PROPSHEETPAGEA
)));
/* original data is used for callback notifications */
if
((
lpPropSheetPage
->
dwFlags
&
PSP_USECALLBACK
)
&&
lpPropSheetPage
->
pfnCallback
)
{
ppsp
=
Alloc
(
2
*
sizeof
(
*
ppsp
));
memcpy
(
ppsp
,
lpPropSheetPage
,
min
(
lpPropSheetPage
->
dwSize
,
sizeof
(
PROPSHEETPAGEA
)));
memcpy
(
ppsp
+
1
,
lpPropSheetPage
,
min
(
lpPropSheetPage
->
dwSize
,
sizeof
(
PROPSHEETPAGEA
)));
}
else
{
ppsp
=
Alloc
(
sizeof
(
*
ppsp
));
memcpy
(
ppsp
,
lpPropSheetPage
,
min
(
lpPropSheetPage
->
dwSize
,
sizeof
(
PROPSHEETPAGEA
)));
}
ppsp
->
dwFlags
&=
~
PSP_INTERNAL_UNICODE
;
ppsp
->
dwFlags
&=
~
PSP_INTERNAL_UNICODE
;
if
(
!
(
ppsp
->
dwFlags
&
PSP_DLGINDIRECT
)
)
{
...
...
@@ -3017,6 +3027,9 @@ HPROPSHEETPAGE WINAPI CreatePropertySheetPageA(
else
ppsp
->
pszHeaderSubTitle
=
NULL
;
if
((
ppsp
->
dwFlags
&
PSP_USECALLBACK
)
&&
ppsp
->
dwSize
>
PROPSHEETPAGEA_V1_SIZE
&&
ppsp
->
pfnCallback
)
ppsp
->
pfnCallback
(
0
,
PSPCB_ADDREF
,
ppsp
+
1
);
return
(
HPROPSHEETPAGE
)
ppsp
;
}
...
...
@@ -3032,10 +3045,20 @@ HPROPSHEETPAGE WINAPI CreatePropertySheetPageW(LPCPROPSHEETPAGEW lpPropSheetPage
if
(
lpPropSheetPage
->
dwSize
<
PROPSHEETPAGEW_V1_SIZE
)
return
NULL
;
ppsp
=
Alloc
(
sizeof
(
PROPSHEETPAGEW
));
memcpy
(
ppsp
,
lpPropSheetPage
,
min
(
lpPropSheetPage
->
dwSize
,
sizeof
(
PROPSHEETPAGEW
)));
/* original data is used for callback notifications */
if
((
lpPropSheetPage
->
dwFlags
&
PSP_USECALLBACK
)
&&
lpPropSheetPage
->
pfnCallback
)
{
ppsp
=
Alloc
(
2
*
sizeof
(
*
ppsp
));
memcpy
(
ppsp
,
lpPropSheetPage
,
min
(
lpPropSheetPage
->
dwSize
,
sizeof
(
PROPSHEETPAGEW
)));
memcpy
(
ppsp
+
1
,
lpPropSheetPage
,
min
(
lpPropSheetPage
->
dwSize
,
sizeof
(
PROPSHEETPAGEW
)));
}
else
{
ppsp
=
Alloc
(
sizeof
(
*
ppsp
));
memcpy
(
ppsp
,
lpPropSheetPage
,
min
(
lpPropSheetPage
->
dwSize
,
sizeof
(
PROPSHEETPAGEW
)));
}
ppsp
->
dwFlags
|=
PSP_INTERNAL_UNICODE
;
ppsp
->
dwFlags
|=
PSP_INTERNAL_UNICODE
;
if
(
!
(
ppsp
->
dwFlags
&
PSP_DLGINDIRECT
)
)
{
...
...
@@ -3067,6 +3090,9 @@ HPROPSHEETPAGE WINAPI CreatePropertySheetPageW(LPCPROPSHEETPAGEW lpPropSheetPage
else
ppsp
->
pszHeaderSubTitle
=
NULL
;
if
((
ppsp
->
dwFlags
&
PSP_USECALLBACK
)
&&
ppsp
->
dwSize
>
PROPSHEETPAGEW_V1_SIZE
&&
ppsp
->
pfnCallback
)
ppsp
->
pfnCallback
(
0
,
PSPCB_ADDREF
,
ppsp
+
1
);
return
(
HPROPSHEETPAGE
)
ppsp
;
}
...
...
@@ -3088,6 +3114,9 @@ BOOL WINAPI DestroyPropertySheetPage(HPROPSHEETPAGE hPropPage)
if
(
!
psp
)
return
FALSE
;
if
((
psp
->
dwFlags
&
PSP_USECALLBACK
)
&&
psp
->
pfnCallback
)
psp
->
pfnCallback
(
0
,
PSPCB_RELEASE
,
psp
+
1
);
if
(
!
(
psp
->
dwFlags
&
PSP_DLGINDIRECT
)
&&
!
IS_INTRESOURCE
(
psp
->
u
.
pszTemplate
))
Free
((
LPVOID
)
psp
->
u
.
pszTemplate
);
...
...
dlls/comctl32/tests/propsheet.c
View file @
429705ea
...
...
@@ -1080,7 +1080,6 @@ static void test_CreatePropertySheetPage(void)
else
{
ok
(
hpsp
!=
NULL
,
"Failed to create a page, size %u
\n
"
,
page
.
u
.
pageA
.
dwSize
);
todo_wine_if
(
page
.
u
.
pageA
.
dwSize
>
PROPSHEETPAGEA_V1_SIZE
)
ok
(
page
.
addref_called
==
(
page
.
u
.
pageA
.
dwSize
>
PROPSHEETPAGEA_V1_SIZE
)
?
1
:
0
,
"Expected ADDREF callback message
\n
"
);
}
...
...
@@ -1089,7 +1088,6 @@ static void test_CreatePropertySheetPage(void)
page
.
release_called
=
0
;
ret
=
DestroyPropertySheetPage
(
hpsp
);
ok
(
ret
,
"Failed to destroy a page
\n
"
);
todo_wine
ok
(
page
.
release_called
==
1
,
"Expected RELEASE callback message
\n
"
);
}
}
...
...
@@ -1111,7 +1109,6 @@ static void test_CreatePropertySheetPage(void)
else
{
ok
(
hpsp
!=
NULL
,
"Failed to create a page, size %u
\n
"
,
page
.
u
.
pageW
.
dwSize
);
todo_wine_if
(
page
.
u
.
pageW
.
dwSize
>
PROPSHEETPAGEW_V1_SIZE
)
ok
(
page
.
addref_called
==
(
page
.
u
.
pageW
.
dwSize
>
PROPSHEETPAGEW_V1_SIZE
)
?
1
:
0
,
"Expected ADDREF callback message
\n
"
);
}
...
...
@@ -1120,7 +1117,6 @@ static void test_CreatePropertySheetPage(void)
page
.
release_called
=
0
;
ret
=
DestroyPropertySheetPage
(
hpsp
);
ok
(
ret
,
"Failed to destroy a page
\n
"
);
todo_wine
ok
(
page
.
release_called
==
1
,
"Expected RELEASE callback message
\n
"
);
}
}
...
...
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