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
ebea81f1
Commit
ebea81f1
authored
Oct 20, 2009
by
Nikolay Sivov
Committed by
Alexandre Julliard
Oct 21, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/tests: Release activation context handle when we're done with tests.
parent
57577fb2
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
15 deletions
+20
-15
header.c
dlls/comctl32/tests/header.c
+4
-3
imagelist.c
dlls/comctl32/tests/imagelist.c
+3
-2
listview.c
dlls/comctl32/tests/listview.c
+4
-3
v6util.h
dlls/comctl32/tests/v6util.h
+9
-7
No files found.
dlls/comctl32/tests/header.c
View file @
ebea81f1
...
...
@@ -1814,6 +1814,7 @@ START_TEST(header)
{
HWND
parent_hwnd
;
ULONG_PTR
ctx_cookie
;
HANDLE
hCtx
;
HWND
hwnd
;
if
(
!
init
())
...
...
@@ -1841,7 +1842,7 @@ START_TEST(header)
test_hdm_unicodeformatMessages
(
parent_hwnd
);
test_hdm_bitmapmarginMessages
(
parent_hwnd
);
if
(
!
load_v6_module
(
&
ctx_cookie
))
if
(
!
load_v6_module
(
&
ctx_cookie
,
&
hCtx
))
{
DestroyWindow
(
parent_hwnd
);
return
;
...
...
@@ -1856,7 +1857,7 @@ START_TEST(header)
if
(
!
IsWindow
(
hwnd
))
{
win_skip
(
"FIXME: failed to create Header window.
\n
"
);
unload_v6_module
(
ctx_cookie
);
unload_v6_module
(
ctx_cookie
,
hCtx
);
DestroyWindow
(
parent_hwnd
);
return
;
}
...
...
@@ -1867,7 +1868,7 @@ START_TEST(header)
test_hdf_fixedwidth
(
parent_hwnd
);
test_hds_nosizing
(
parent_hwnd
);
unload_v6_module
(
ctx_cookie
);
unload_v6_module
(
ctx_cookie
,
hCtx
);
DestroyWindow
(
parent_hwnd
);
}
dlls/comctl32/tests/imagelist.c
View file @
ebea81f1
...
...
@@ -1247,6 +1247,7 @@ cleanup:
START_TEST
(
imagelist
)
{
ULONG_PTR
ctx_cookie
;
HANDLE
hCtx
;
HMODULE
hComCtl32
=
GetModuleHandle
(
"comctl32.dll"
);
pImageList_Create
=
NULL
;
/* These are not needed for non-v6.0 tests*/
...
...
@@ -1270,7 +1271,7 @@ START_TEST(imagelist)
/* Now perform v6 tests */
if
(
!
load_v6_module
(
&
ctx_cookie
))
if
(
!
load_v6_module
(
&
ctx_cookie
,
&
hCtx
))
return
;
/* Reload comctl32 */
...
...
@@ -1284,5 +1285,5 @@ START_TEST(imagelist)
test_ImageList_DrawIndirect
();
test_shell_imagelist
();
unload_v6_module
(
ctx_cookie
);
unload_v6_module
(
ctx_cookie
,
hCtx
);
}
dlls/comctl32/tests/listview.c
View file @
ebea81f1
...
...
@@ -4064,6 +4064,7 @@ START_TEST(listview)
BOOL
(
WINAPI
*
pInitCommonControlsEx
)(
const
INITCOMMONCONTROLSEX
*
);
ULONG_PTR
ctx_cookie
;
HANDLE
hCtx
;
HWND
hwnd
;
hComctl32
=
GetModuleHandleA
(
"comctl32.dll"
);
...
...
@@ -4116,7 +4117,7 @@ START_TEST(listview)
test_getcolumnwidth
();
test_ApproximateViewRect
();
if
(
!
load_v6_module
(
&
ctx_cookie
))
if
(
!
load_v6_module
(
&
ctx_cookie
,
&
hCtx
))
{
DestroyWindow
(
hwndparent
);
return
;
...
...
@@ -4130,7 +4131,7 @@ START_TEST(listview)
if
(
!
IsWindow
(
hwnd
))
{
win_skip
(
"FIXME: failed to create ListView window.
\n
"
);
unload_v6_module
(
ctx_cookie
);
unload_v6_module
(
ctx_cookie
,
hCtx
);
DestroyWindow
(
hwndparent
);
return
;
}
...
...
@@ -4144,7 +4145,7 @@ START_TEST(listview)
test_scrollnotify
();
test_LVS_EX_TRANSPARENTBKGND
();
unload_v6_module
(
ctx_cookie
);
unload_v6_module
(
ctx_cookie
,
hCtx
);
DestroyWindow
(
hwndparent
);
}
dlls/comctl32/tests/v6util.h
View file @
ebea81f1
...
...
@@ -56,32 +56,34 @@ static const CHAR manifest[] =
"</dependency>
\n
"
"</assembly>
\n
"
;
static
void
unload_v6_module
(
ULONG_PTR
cookie
)
static
void
unload_v6_module
(
ULONG_PTR
cookie
,
HANDLE
hCtx
)
{
HANDLE
hKernel32
;
BOOL
(
WINAPI
*
pDeactivateActCtx
)(
DWORD
,
ULONG_PTR
);
VOID
(
WINAPI
*
pReleaseActCtx
)(
HANDLE
);
hKernel32
=
GetModuleHandleA
(
"kernel32.dll"
);
pDeactivateActCtx
=
(
void
*
)
GetProcAddress
(
hKernel32
,
"DeactivateActCtx"
);
if
(
!
pDeactivateActCtx
)
pReleaseActCtx
=
(
void
*
)
GetProcAddress
(
hKernel32
,
"ReleaseActCtx"
);
if
(
!
pDeactivateActCtx
||
!
pReleaseActCtx
)
{
win_skip
(
"Activation contexts unsupported
\n
"
);
return
;
}
pDeactivateActCtx
(
0
,
cookie
);
pReleaseActCtx
(
hCtx
);
DeleteFileA
(
manifest_name
);
}
static
BOOL
load_v6_module
(
ULONG_PTR
*
pcookie
)
static
BOOL
load_v6_module
(
ULONG_PTR
*
pcookie
,
HANDLE
*
hCtx
)
{
HANDLE
hKernel32
;
HANDLE
(
WINAPI
*
pCreateActCtxA
)(
ACTCTXA
*
);
BOOL
(
WINAPI
*
pActivateActCtx
)(
HANDLE
,
ULONG_PTR
*
);
ACTCTXA
ctx
;
HANDLE
hCtx
;
BOOL
ret
;
HANDLE
file
;
DWORD
written
;
...
...
@@ -121,10 +123,10 @@ static BOOL load_v6_module(ULONG_PTR *pcookie)
ctx
.
cbSize
=
sizeof
(
ctx
);
ctx
.
lpSource
=
manifest_name
;
hCtx
=
pCreateActCtxA
(
&
ctx
);
ok
(
hCtx
!=
0
,
"Expected context handle
\n
"
);
*
hCtx
=
pCreateActCtxA
(
&
ctx
);
ok
(
*
hCtx
!=
0
,
"Expected context handle
\n
"
);
ret
=
pActivateActCtx
(
hCtx
,
pcookie
);
ret
=
pActivateActCtx
(
*
hCtx
,
pcookie
);
expect
(
TRUE
,
ret
);
if
(
!
ret
)
...
...
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