Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
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
...
@@ -54,20 +54,14 @@ struct wndclass_redirect_data
/* returned pointer is valid as long as activation context is alive */
/* returned pointer is valid as long as activation context is alive */
static
WCHAR
*
get_versioned_classname
(
const
WCHAR
*
name
)
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
;
struct
wndclass_redirect_data
*
wnddata
;
ACTCTX_SECTION_KEYED_DATA
data
;
ACTCTX_SECTION_KEYED_DATA
data
;
BOOL
ret
;
BOOL
ret
;
pFindActCtxSectionStringW
=
(
void
*
)
GetProcAddress
(
GetModuleHandleA
(
"kernel32"
),
"FindActCtxSectionStringW"
);
memset
(
&
data
,
0
,
sizeof
(
data
));
memset
(
&
data
,
0
,
sizeof
(
data
));
data
.
cbSize
=
sizeof
(
data
);
data
.
cbSize
=
sizeof
(
data
);
ret
=
FindActCtxSectionStringW
(
0
,
NULL
,
ACTIVATION_CONTEXT_SECTION_WINDOW_CLASS_REDIRECTION
,
name
,
&
data
);
ret
=
pFindActCtxSectionStringW
(
0
,
NULL
,
ok
(
ret
,
"Failed to find class redirection section, error %u
\n
"
,
GetLastError
());
ACTIVATION_CONTEXT_SECTION_WINDOW_CLASS_REDIRECTION
,
name
,
&
data
);
ok
(
ret
,
"got %d, error %u
\n
"
,
ret
,
GetLastError
());
wnddata
=
(
struct
wndclass_redirect_data
*
)
data
.
lpData
;
wnddata
=
(
struct
wndclass_redirect_data
*
)
data
.
lpData
;
return
(
WCHAR
*
)((
BYTE
*
)
wnddata
+
wnddata
->
name_offset
);
return
(
WCHAR
*
)((
BYTE
*
)
wnddata
+
wnddata
->
name_offset
);
}
}
...
...
dlls/comctl32/tests/v6util.h
View file @
08a68a9f
...
@@ -62,48 +62,19 @@ static const CHAR manifest[] =
...
@@ -62,48 +62,19 @@ static const CHAR manifest[] =
static
void
unload_v6_module
(
ULONG_PTR
cookie
,
HANDLE
hCtx
)
static
void
unload_v6_module
(
ULONG_PTR
cookie
,
HANDLE
hCtx
)
{
{
HANDLE
hKernel32
;
DeactivateActCtx
(
0
,
cookie
);
BOOL
(
WINAPI
*
pDeactivateActCtx
)(
DWORD
,
ULONG_PTR
);
ReleaseActCtx
(
hCtx
);
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
);
DeleteFileA
(
manifest_name
);
DeleteFileA
(
manifest_name
);
}
}
static
BOOL
load_v6_module
(
ULONG_PTR
*
pcookie
,
HANDLE
*
hCtx
)
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
;
ACTCTX_SECTION_KEYED_DATA
data
;
DWORD
written
;
ACTCTXA
ctx
;
ACTCTXA
ctx
;
BOOL
ret
;
HANDLE
file
;
HANDLE
file
;
DWORD
written
;
BOOL
ret
;
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
;
}
/* create manifest */
/* create manifest */
file
=
CreateFileA
(
manifest_name
,
GENERIC_WRITE
,
0
,
NULL
,
CREATE_ALWAYS
,
0
,
NULL
);
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)
...
@@ -131,10 +102,10 @@ static BOOL load_v6_module(ULONG_PTR *pcookie, HANDLE *hCtx)
ctx
.
cbSize
=
sizeof
(
ctx
);
ctx
.
cbSize
=
sizeof
(
ctx
);
ctx
.
lpSource
=
manifest_name
;
ctx
.
lpSource
=
manifest_name
;
*
hCtx
=
p
CreateActCtxA
(
&
ctx
);
*
hCtx
=
CreateActCtxA
(
&
ctx
);
ok
(
*
hCtx
!=
0
,
"Expected context handle
\n
"
);
ok
(
*
hCtx
!=
0
,
"Expected context handle
\n
"
);
ret
=
p
ActivateActCtx
(
*
hCtx
,
pcookie
);
ret
=
ActivateActCtx
(
*
hCtx
,
pcookie
);
expect
(
TRUE
,
ret
);
expect
(
TRUE
,
ret
);
if
(
!
ret
)
if
(
!
ret
)
...
@@ -144,7 +115,7 @@ static BOOL load_v6_module(ULONG_PTR *pcookie, HANDLE *hCtx)
...
@@ -144,7 +115,7 @@ static BOOL load_v6_module(ULONG_PTR *pcookie, HANDLE *hCtx)
}
}
data
.
cbSize
=
sizeof
(
data
);
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
);
"comctl32.dll"
,
&
data
);
ok
(
ret
,
"failed to find comctl32.dll in active context, %u
\n
"
,
GetLastError
());
ok
(
ret
,
"failed to find comctl32.dll in active context, %u
\n
"
,
GetLastError
());
if
(
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