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
08a68a9f
Commit
08a68a9f
authored
Jan 23, 2018
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jan 23, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/tests: Link to activation context API directly.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
8cf375de
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
44 deletions
+9
-44
button.c
dlls/comctl32/tests/button.c
+2
-8
v6util.h
dlls/comctl32/tests/v6util.h
+7
-36
No files found.
dlls/comctl32/tests/button.c
View file @
08a68a9f
...
...
@@ -54,20 +54,14 @@ struct wndclass_redirect_data
/* returned pointer is valid as long as activation context is alive */
static
WCHAR
*
get_versioned_classname
(
const
WCHAR
*
name
)
{
BOOL
(
WINAPI
*
pFindActCtxSectionStringW
)(
DWORD
,
const
GUID
*
,
ULONG
,
LPCWSTR
,
PACTCTX_SECTION_KEYED_DATA
);
struct
wndclass_redirect_data
*
wnddata
;
ACTCTX_SECTION_KEYED_DATA
data
;
BOOL
ret
;
pFindActCtxSectionStringW
=
(
void
*
)
GetProcAddress
(
GetModuleHandleA
(
"kernel32"
),
"FindActCtxSectionStringW"
);
memset
(
&
data
,
0
,
sizeof
(
data
));
data
.
cbSize
=
sizeof
(
data
);
ret
=
pFindActCtxSectionStringW
(
0
,
NULL
,
ACTIVATION_CONTEXT_SECTION_WINDOW_CLASS_REDIRECTION
,
name
,
&
data
);
ok
(
ret
,
"got %d, error %u
\n
"
,
ret
,
GetLastError
());
ret
=
FindActCtxSectionStringW
(
0
,
NULL
,
ACTIVATION_CONTEXT_SECTION_WINDOW_CLASS_REDIRECTION
,
name
,
&
data
);
ok
(
ret
,
"Failed to find class redirection section, error %u
\n
"
,
GetLastError
());
wnddata
=
(
struct
wndclass_redirect_data
*
)
data
.
lpData
;
return
(
WCHAR
*
)((
BYTE
*
)
wnddata
+
wnddata
->
name_offset
);
}
...
...
dlls/comctl32/tests/v6util.h
View file @
08a68a9f
...
...
@@ -62,48 +62,19 @@ static const CHAR manifest[] =
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"
);
pReleaseActCtx
=
(
void
*
)
GetProcAddress
(
hKernel32
,
"ReleaseActCtx"
);
if
(
!
pDeactivateActCtx
||
!
pReleaseActCtx
)
{
win_skip
(
"Activation contexts unsupported
\n
"
);
return
;
}
pDeactivateActCtx
(
0
,
cookie
);
pReleaseActCtx
(
hCtx
);
DeactivateActCtx
(
0
,
cookie
);
ReleaseActCtx
(
hCtx
);
DeleteFileA
(
manifest_name
);
}
static
BOOL
load_v6_module
(
ULONG_PTR
*
pcookie
,
HANDLE
*
hCtx
)
{
HANDLE
hKernel32
;
HANDLE
(
WINAPI
*
pCreateActCtxA
)(
ACTCTXA
*
);
BOOL
(
WINAPI
*
pActivateActCtx
)(
HANDLE
,
ULONG_PTR
*
);
BOOL
(
WINAPI
*
pFindActCtxSectionStringA
)(
DWORD
,
const
GUID
*
,
ULONG
,
LPCSTR
,
PACTCTX_SECTION_KEYED_DATA
);
ACTCTX_SECTION_KEYED_DATA
data
;
DWORD
written
;
ACTCTXA
ctx
;
BOOL
ret
;
HANDLE
file
;
DWORD
written
;
hKernel32
=
GetModuleHandleA
(
"kernel32.dll"
);
pCreateActCtxA
=
(
void
*
)
GetProcAddress
(
hKernel32
,
"CreateActCtxA"
);
pActivateActCtx
=
(
void
*
)
GetProcAddress
(
hKernel32
,
"ActivateActCtx"
);
pFindActCtxSectionStringA
=
(
void
*
)
GetProcAddress
(
hKernel32
,
"FindActCtxSectionStringA"
);
if
(
!
(
pCreateActCtxA
&&
pActivateActCtx
))
{
win_skip
(
"Activation contexts unsupported. No version 6 tests possible.
\n
"
);
return
FALSE
;
}
BOOL
ret
;
/* create manifest */
file
=
CreateFileA
(
manifest_name
,
GENERIC_WRITE
,
0
,
NULL
,
CREATE_ALWAYS
,
0
,
NULL
);
...
...
@@ -131,10 +102,10 @@ static BOOL load_v6_module(ULONG_PTR *pcookie, HANDLE *hCtx)
ctx
.
cbSize
=
sizeof
(
ctx
);
ctx
.
lpSource
=
manifest_name
;
*
hCtx
=
p
CreateActCtxA
(
&
ctx
);
*
hCtx
=
CreateActCtxA
(
&
ctx
);
ok
(
*
hCtx
!=
0
,
"Expected context handle
\n
"
);
ret
=
p
ActivateActCtx
(
*
hCtx
,
pcookie
);
ret
=
ActivateActCtx
(
*
hCtx
,
pcookie
);
expect
(
TRUE
,
ret
);
if
(
!
ret
)
...
...
@@ -144,7 +115,7 @@ static BOOL load_v6_module(ULONG_PTR *pcookie, HANDLE *hCtx)
}
data
.
cbSize
=
sizeof
(
data
);
ret
=
p
FindActCtxSectionStringA
(
0
,
NULL
,
ACTIVATION_CONTEXT_SECTION_DLL_REDIRECTION
,
ret
=
FindActCtxSectionStringA
(
0
,
NULL
,
ACTIVATION_CONTEXT_SECTION_DLL_REDIRECTION
,
"comctl32.dll"
,
&
data
);
ok
(
ret
,
"failed to find comctl32.dll in active context, %u
\n
"
,
GetLastError
());
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