ntdll: Implement compatible FindActCtxSectionString() for window class section (try3)
Alexandre Julliard
julliard at winehq.org
Fri Aug 2 04:33:12 CDT 2013
Nikolay Sivov <nsivov at codeweavers.com> writes:
> @@ -1031,6 +1105,17 @@ static BOOL parse_window_class_elem(xmlbuf_t* xmlbuf, struct dll_redirect* dll)
>
> if (!(entity->u.class.name = xmlstrdupW(&content))) return FALSE;
>
> + /* each class entry needs index, data and string data */
> + acl->actctx->wndclass_section_len += sizeof(struct wndclass_index);
> + acl->actctx->wndclass_section_len += sizeof(struct wndclass_redirect_data);
> + /* original name is stored separately */
> + acl->actctx->wndclass_section_len += aligned_string_len((content.len+1)*sizeof(WCHAR));
> + /* versioned name and module name are stored one after another */
> + len = get_assembly_version(assembly, NULL) + content.len + 2 /* null terminator and '!' separator */;
> + len += strlenW(dll->name) + 1;
> + acl->actctx->wndclass_section_len += aligned_string_len(len*sizeof(WCHAR));
> + acl->actctx->wndclass_count++;
> +
It would be better to do this at the time you build the structure. The
parser shouldn't need to worry about this.
--
Alexandre Julliard
julliard at winehq.org
More information about the wine-devel
mailing list