[PATCH 11/11] [Kernel32]: ActCtx: now parsing and storing some
attributes for a file
Eric Pouech
eric.pouech at wanadoo.fr
Wed May 9 15:08:38 CDT 2007
element
---
dlls/kernel32/actctx.c | 30 ++++++++++++++++++++++++++++++
1 files changed, 30 insertions(+), 0 deletions(-)
diff --git a/dlls/kernel32/actctx.c b/dlls/kernel32/actctx.c
index b7b919c..c0ffe80 100644
--- a/dlls/kernel32/actctx.c
+++ b/dlls/kernel32/actctx.c
@@ -128,6 +128,7 @@ struct entity
struct dll_redirect
{
LPWSTR name;
+ LPWSTR hash;
struct entity* entities;
unsigned num_entities;
unsigned allocated_entities;
@@ -169,6 +170,7 @@ struct actctx_loader
};
#define PUBLIC_KEY_TOKEN_LEN 16
+#define HASH_LEN 40
static WCHAR* strdupW(const WCHAR* str)
{
@@ -263,6 +265,7 @@ static struct dll_redirect* add_dll_redirect(struct assembly* assembly)
if (!assembly->dlls) return NULL;
dll = &assembly->dlls[assembly->num_dlls++];
dll->name = NULL;
+ dll->hash = NULL;
dll->num_entities = 0;
dll->allocated_entities = 0;
dll->entities = NULL;
@@ -417,12 +420,16 @@ done:
#define ELEM_END(elem) "/" elem
#define CLSID_ATTR "clsid"
+#define HASH_ATTR "hash"
+#define HASHALG_ATTR "hashalg"
#define HELPDIR_ATTR "helpdir"
#define IID_ATTR "iid"
+#define LOADFROM_ATTR "loadFrom"
#define MANIFESTVERSION_ATTR "manifestVersion"
#define NAME_ATTR "name"
#define PROCESSORARCHITECTURE_ATTR "processorArchitecture"
#define PUBLICKEYTOKEN_ATTR "publicKeyToken"
+#define SIZE_ATTR "size"
#define TLBID_ATTR "tlbid"
#define TYPE_ATTR "type"
#define VERSION_ATTR "version"
@@ -787,6 +794,28 @@ static BOOL parse_file_elem(xmlbuf_t* xmlbuf, struct assembly* assembly)
dll->name = strdupXW(&attr_value);
TRACE("name=%s\n", debugstr_xmlstr(&attr_value));
}
+ else if (xmlstr_cmp(&attr_name, HASH_ATTR))
+ {
+ if (attr_value.len != HASH_LEN) return FALSE;
+ dll->hash = strdupXW(&attr_value);
+ }
+ else if (xmlstr_cmp(&attr_name, HASHALG_ATTR))
+ {
+ if (!xmlstr_cmp(&attr_value, "SHA1"))
+ {
+ FIXME("Hash algo should be SHA1, got %s\n",
+ debugstr_xmlstr(&attr_value));
+ }
+ }
+ /* the following two are not documented (just present in schemas) */
+ else if (xmlstr_cmp(&attr_name, LOADFROM_ATTR))
+ {
+ FIXME("loadFrom=%s\n", debugstr_xmlstr(&attr_value));
+ }
+ else if (xmlstr_cmp(&attr_name, SIZE_ATTR))
+ {
+ FIXME("size=%s\n", debugstr_xmlstr(&attr_value));
+ }
else
{
WARN("wrong attr %s=%s\n", debugstr_xmlstr(&attr_name),
@@ -1440,6 +1469,7 @@ void WINAPI ReleaseActCtx(HANDLE hActCtx)
}
HeapFree(GetProcessHeap(), 0, dll->entities);
HeapFree(GetProcessHeap(), 0, dll->name);
+ HeapFree(GetProcessHeap(), 0, dll->hash);
}
HeapFree(GetProcessHeap(), 0, assembly->dlls);
HeapFree(GetProcessHeap(), 0, assembly->manifest.info);
More information about the wine-patches
mailing list