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
3c1f5c6a
Commit
3c1f5c6a
authored
Jul 19, 2007
by
Eric Pouech
Committed by
Alexandre Julliard
Jul 19, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Added parsing of the clrClass and clrSurrogate elements in manifests.
parent
21427b2d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
90 additions
and
0 deletions
+90
-0
actctx.c
dlls/ntdll/actctx.c
+90
-0
No files found.
dlls/ntdll/actctx.c
View file @
3c1f5c6a
...
...
@@ -119,6 +119,16 @@ struct entity
{
WCHAR
*
name
;
}
class
;
struct
{
WCHAR
*
name
;
WCHAR
*
clsid
;
}
clrclass
;
struct
{
WCHAR
*
name
;
WCHAR
*
clsid
;
}
clrsurrogate
;
}
u
;
};
...
...
@@ -175,6 +185,8 @@ struct actctx_loader
#define ASSEMBLY_ELEM "assembly"
#define ASSEMBLYIDENTITY_ELEM "assemblyIdentity"
#define CLRCLASS_ELEM "clrClass"
#define CLRSURROGATE_ELEM "clrSurrogate"
#define COMCLASS_ELEM "comClass"
#define COMINTERFACEEXTERNALPROXYSTUB_ELEM "comInterfaceExternalProxyStub"
#define COMINTERFACEPROXYSTUB_ELEM "comInterfaceProxyStub"
...
...
@@ -360,6 +372,14 @@ static void free_entity_array(struct entity_array *array)
case
ACTIVATION_CONTEXT_SECTION_WINDOW_CLASS_REDIRECTION
:
RtlFreeHeap
(
GetProcessHeap
(),
0
,
entity
->
u
.
class
.
name
);
break
;
case
ACTIVATION_CONTEXT_SECTION_COM_PROGID_REDIRECTION
:
RtlFreeHeap
(
GetProcessHeap
(),
0
,
entity
->
u
.
clrclass
.
name
);
RtlFreeHeap
(
GetProcessHeap
(),
0
,
entity
->
u
.
clrclass
.
clsid
);
break
;
case
ACTIVATION_CONTEXT_SECTION_CLR_SURROGATES
:
RtlFreeHeap
(
GetProcessHeap
(),
0
,
entity
->
u
.
clrsurrogate
.
name
);
RtlFreeHeap
(
GetProcessHeap
(),
0
,
entity
->
u
.
clrsurrogate
.
clsid
);
break
;
default:
FIXME
(
"Unknown entity kind %d
\n
"
,
entity
->
kind
);
}
...
...
@@ -859,6 +879,68 @@ static BOOL parse_com_interface_external_proxy_stub_elem(xmlbuf_t* xmlbuf,
parse_end_element
(
xmlbuf
);
}
static
BOOL
parse_clr_class_elem
(
xmlbuf_t
*
xmlbuf
,
struct
assembly
*
assembly
)
{
xmlstr_t
attr_name
,
attr_value
;
BOOL
end
=
FALSE
,
error
;
struct
entity
*
entity
;
entity
=
add_entity
(
&
assembly
->
entities
,
ACTIVATION_CONTEXT_SECTION_COM_PROGID_REDIRECTION
);
if
(
!
entity
)
return
FALSE
;
while
(
next_xml_attr
(
xmlbuf
,
&
attr_name
,
&
attr_value
,
&
error
,
&
end
))
{
if
(
xmlstr_cmp
(
&
attr_name
,
NAME_ATTR
))
{
if
(
!
(
entity
->
u
.
clrclass
.
name
=
xmlstrdupW
(
&
attr_value
)))
return
FALSE
;
}
else
if
(
xmlstr_cmp
(
&
attr_name
,
CLSID_ATTR
))
{
if
(
!
(
entity
->
u
.
clrclass
.
clsid
=
xmlstrdupW
(
&
attr_value
)))
return
FALSE
;
}
else
{
WARN
(
"wrong attr %s=%s
\n
"
,
debugstr_xmlstr
(
&
attr_name
),
debugstr_xmlstr
(
&
attr_value
));
return
FALSE
;
}
}
if
(
error
||
end
)
return
end
;
return
parse_expect_elem
(
xmlbuf
,
ELEM_END
(
CLRCLASS_ELEM
))
&&
parse_end_element
(
xmlbuf
);
}
static
BOOL
parse_clr_surrogate_elem
(
xmlbuf_t
*
xmlbuf
,
struct
assembly
*
assembly
)
{
xmlstr_t
attr_name
,
attr_value
;
BOOL
end
=
FALSE
,
error
;
struct
entity
*
entity
;
entity
=
add_entity
(
&
assembly
->
entities
,
ACTIVATION_CONTEXT_SECTION_CLR_SURROGATES
);
if
(
!
entity
)
return
FALSE
;
while
(
next_xml_attr
(
xmlbuf
,
&
attr_name
,
&
attr_value
,
&
error
,
&
end
))
{
if
(
xmlstr_cmp
(
&
attr_name
,
NAME_ATTR
))
{
if
(
!
(
entity
->
u
.
clrsurrogate
.
name
=
xmlstrdupW
(
&
attr_value
)))
return
FALSE
;
}
else
if
(
xmlstr_cmp
(
&
attr_name
,
CLSID_ATTR
))
{
if
(
!
(
entity
->
u
.
clrsurrogate
.
clsid
=
xmlstrdupW
(
&
attr_value
)))
return
FALSE
;
}
else
{
WARN
(
"wrong attr %s=%s
\n
"
,
debugstr_xmlstr
(
&
attr_name
),
debugstr_xmlstr
(
&
attr_value
));
return
FALSE
;
}
}
if
(
error
||
end
)
return
end
;
return
parse_expect_elem
(
xmlbuf
,
ELEM_END
(
CLRSURROGATE_ELEM
))
&&
parse_end_element
(
xmlbuf
);
}
static
BOOL
parse_dependent_assembly_elem
(
xmlbuf_t
*
xmlbuf
,
struct
actctx_loader
*
acl
)
{
...
...
@@ -1110,6 +1192,14 @@ static BOOL parse_assembly_elem(xmlbuf_t* xmlbuf, struct actctx_loader* acl,
{
ret
=
parse_file_elem
(
xmlbuf
,
assembly
);
}
else
if
(
xmlstr_cmp
(
&
elem
,
CLRCLASS_ELEM
))
{
ret
=
parse_clr_class_elem
(
xmlbuf
,
assembly
);
}
else
if
(
xmlstr_cmp
(
&
elem
,
CLRSURROGATE_ELEM
))
{
ret
=
parse_clr_surrogate_elem
(
xmlbuf
,
assembly
);
}
else
{
WARN
(
"wrong element %s
\n
"
,
debugstr_xmlstr
(
&
elem
));
...
...
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