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
7a612654
Commit
7a612654
authored
Dec 31, 2014
by
Nikolay Sivov
Committed by
Alexandre Julliard
Dec 31, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Skip context dependencies that have allowDelayedBinding attribute set.
parent
c7482ad1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
52 additions
and
4 deletions
+52
-4
actctx.c
dlls/kernel32/tests/actctx.c
+35
-0
actctx.c
dlls/ntdll/actctx.c
+17
-4
No files found.
dlls/kernel32/tests/actctx.c
View file @
7a612654
...
...
@@ -222,6 +222,17 @@ static const char manifest4[] =
"</dependency>"
"</assembly>"
;
static
const
char
manifest5
[]
=
"<assembly xmlns=
\"
urn:schemas-microsoft-com:asm.v1
\"
manifestVersion=
\"
1.0
\"
>"
"<assemblyIdentity version=
\"
1.2.3.4
\"
name=
\"
Wine.Test
\"
type=
\"
win32
\"
>"
"</assemblyIdentity>"
"<dependency>"
" <dependentAssembly dependencyType=
\"
preRequisite
\"
allowDelayedBinding=
\"
true
\"
>"
" <assemblyIdentity name=
\"
Missing.Assembly
\"
version=
\"
1.0.0.0
\"
/>"
" </dependentAssembly>"
"</dependency>"
"</assembly>"
;
static
const
char
testdep_manifest1
[]
=
"<assembly xmlns=
\"
urn:schemas-microsoft-com:asm.v1
\"
manifestVersion=
\"
1.0
\"
>"
"<assemblyIdentity type=
\"
win32
\"
name=
\"
testdep
\"
version=
\"
6.5.4.3
\"
processorArchitecture=
\"
"
ARCH
"
\"
/>"
...
...
@@ -1728,6 +1739,29 @@ static void test_typelib_section(void)
pReleaseActCtx
(
handle
);
}
static
void
test_allowDelayedBinding
(
void
)
{
HANDLE
handle
;
if
(
!
create_manifest_file
(
"test5.manifest"
,
manifest5
,
-
1
,
NULL
,
NULL
))
{
skip
(
"Could not create manifest file
\n
"
);
return
;
}
handle
=
test_create
(
"test5.manifest"
);
if
(
handle
==
INVALID_HANDLE_VALUE
)
{
win_skip
(
"allowDelayedBinding attribute is not supported.
\n
"
);
return
;
}
DeleteFileA
(
"test5.manifest"
);
DeleteFileA
(
"testdep.manifest"
);
if
(
handle
!=
INVALID_HANDLE_VALUE
)
{
test_basic_info
(
handle
,
__LINE__
);
pReleaseActCtx
(
handle
);
}
}
static
void
test_actctx
(
void
)
{
ULONG_PTR
cookie
;
...
...
@@ -1993,6 +2027,7 @@ static void test_actctx(void)
test_wndclass_section
();
test_dllredirect_section
();
test_typelib_section
();
test_allowDelayedBinding
();
}
static
void
test_app_manifest
(
void
)
...
...
dlls/ntdll/actctx.c
View file @
7a612654
...
...
@@ -129,6 +129,7 @@ struct assembly_identity
WCHAR
*
type
;
struct
assembly_version
version
;
BOOL
optional
;
BOOL
delayed
;
};
struct
strsection_header
...
...
@@ -2027,13 +2028,25 @@ static BOOL parse_clr_surrogate_elem(xmlbuf_t* xmlbuf, struct assembly* assembly
static
BOOL
parse_dependent_assembly_elem
(
xmlbuf_t
*
xmlbuf
,
struct
actctx_loader
*
acl
,
BOOL
optional
)
{
struct
assembly_identity
ai
;
xmlstr_t
elem
;
BOOL
end
=
FALSE
,
ret
=
TRU
E
;
xmlstr_t
elem
,
attr_name
,
attr_value
;
BOOL
end
=
FALSE
,
error
=
FALSE
,
ret
=
TRUE
,
delayed
=
FALS
E
;
if
(
!
parse_expect_no_attr
(
xmlbuf
,
&
end
)
||
end
)
return
end
;
while
(
next_xml_attr
(
xmlbuf
,
&
attr_name
,
&
attr_value
,
&
error
,
&
end
))
{
static
const
WCHAR
allowDelayedBindingW
[]
=
{
'a'
,
'l'
,
'l'
,
'o'
,
'w'
,
'D'
,
'e'
,
'l'
,
'a'
,
'y'
,
'e'
,
'd'
,
'B'
,
'i'
,
'n'
,
'd'
,
'i'
,
'n'
,
'g'
,
0
};
static
const
WCHAR
trueW
[]
=
{
't'
,
'r'
,
'u'
,
'e'
,
0
};
if
(
xmlstr_cmp
(
&
attr_name
,
allowDelayedBindingW
))
delayed
=
xmlstr_cmp
(
&
attr_value
,
trueW
);
else
WARN
(
"unknown attr %s=%s
\n
"
,
debugstr_xmlstr
(
&
attr_name
),
debugstr_xmlstr
(
&
attr_value
));
}
if
(
error
||
end
)
return
end
;
memset
(
&
ai
,
0
,
sizeof
(
ai
));
ai
.
optional
=
optional
;
ai
.
delayed
=
delayed
;
if
(
!
parse_expect_elem
(
xmlbuf
,
assemblyIdentityW
,
asmv1W
)
||
!
parse_assembly_identity_elem
(
xmlbuf
,
acl
->
actctx
,
&
ai
))
...
...
@@ -2914,7 +2927,7 @@ static NTSTATUS parse_depend_manifests(struct actctx_loader* acl)
{
if
(
lookup_assembly
(
acl
,
&
acl
->
dependencies
[
i
])
!=
STATUS_SUCCESS
)
{
if
(
!
acl
->
dependencies
[
i
].
optional
)
if
(
!
acl
->
dependencies
[
i
].
optional
&&
!
acl
->
dependencies
[
i
].
delayed
)
{
FIXME
(
"Could not find dependent assembly %s (%s)
\n
"
,
debugstr_w
(
acl
->
dependencies
[
i
].
name
),
...
...
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