Module: wine Branch: master Commit: 63e4b943a9ec08172caeb9188d84756326dc74e3 URL: http://source.winehq.org/git/wine.git/?a=commit;h=63e4b943a9ec08172caeb9188d...
Author: Jacek Caban jacek@codeweavers.com Date: Thu Jul 19 18:04:32 2007 +0200
ntdll: Added parsing of the asmv2:hash element in manifests.
---
dlls/ntdll/actctx.c | 25 +++++++++++++++++++++++++ 1 files changed, 25 insertions(+), 0 deletions(-)
diff --git a/dlls/ntdll/actctx.c b/dlls/ntdll/actctx.c index 58b09b2..df2a66f 100644 --- a/dlls/ntdll/actctx.c +++ b/dlls/ntdll/actctx.c @@ -195,6 +195,7 @@ struct actctx_loader #define DEPENDENTASSEMBLY_ELEM "dependentAssembly" #define DESCRIPTION_ELEM "description" #define FILE_ELEM "file" +#define HASH_ELEM "asmv2:hash" #define NOINHERIT_ELEM "noInherit" #define NOINHERITABLE_ELEM "noInheritable" #define TYPELIB_ELEM "typelib" @@ -645,6 +646,25 @@ static BOOL parse_end_element(xmlbuf_t *xmlbuf) return parse_expect_no_attr(xmlbuf, &end) && !end; }
+static BOOL parse_unknown_elem(xmlbuf_t *xmlbuf, const char *name) +{ + xmlstr_t attr_name, attr_value, elem; + BOOL end = FALSE, error, ret = TRUE; + + while(next_xml_attr(xmlbuf, &attr_name, &attr_value, &error, &end)); + if(error || end) return end; + + while(ret && (ret = next_xml_elem(xmlbuf, &elem))) + { + if(*elem.ptr == '/' && !strncmp(elem.ptr+1, name, elem.len-1)) + break; + else + ret = parse_unknown_elem(xmlbuf, elem.ptr); + } + + return ret && parse_end_element(xmlbuf); +} + static BOOL parse_assembly_identity_elem(xmlbuf_t* xmlbuf, ACTIVATION_CONTEXT* actctx, struct assembly_identity* ai) { @@ -1108,6 +1128,11 @@ static BOOL parse_file_elem(xmlbuf_t* xmlbuf, struct assembly* assembly) { ret = parse_cominterface_proxy_stub_elem(xmlbuf, dll); } + else if (xmlstr_cmp(&elem, HASH_ELEM)) + { + WARN(HASH_ELEM " (undocumented) not supported\n"); + ret = parse_unknown_elem(xmlbuf, HASH_ELEM); + } else if (xmlstr_cmp(&elem, TYPELIB_ELEM)) { ret = parse_typelib_elem(xmlbuf, dll);