Commit 44d8f6a3 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

ntdll: For typelib and COM class sections point global data to module names.

parent 675b0525
......@@ -1148,6 +1148,7 @@ static void test_find_com_redirection(HANDLE handle, const GUID *clsid, const GU
{
struct comclassredirect_data *comclass, *comclass2;
ACTCTX_SECTION_KEYED_DATA data, data2;
struct guidsection_header *header;
BOOL ret;
memset(&data, 0xfe, sizeof(data));
......@@ -1207,11 +1208,11 @@ static void test_find_com_redirection(HANDLE handle, const GUID *clsid, const GU
ok_(__FILE__, line)(comclass->miscstatusdocprint != 0, "got miscstatusdocprint 0x%08x\n", comclass->miscstatusdocprint);
}
}
todo_wine {
ok_(__FILE__, line)(data.lpSectionGlobalData != NULL, "data.lpSectionGlobalData == NULL\n");
ok_(__FILE__, line)(data.ulSectionGlobalDataLength > 0, "data.ulSectionGlobalDataLength=%u\n",
header = (struct guidsection_header*)data.lpSectionBase;
ok_(__FILE__, line)(data.lpSectionGlobalData == ((BYTE*)header + header->names_offset), "data.lpSectionGlobalData == NULL\n");
ok_(__FILE__, line)(data.ulSectionGlobalDataLength == header->names_len, "data.ulSectionGlobalDataLength=%u\n",
data.ulSectionGlobalDataLength);
}
ok_(__FILE__, line)(data.lpSectionBase != NULL, "data.lpSectionBase == NULL\n");
ok_(__FILE__, line)(data.ulSectionTotalLength > 0, "data.ulSectionTotalLength=%u\n",
data.ulSectionTotalLength);
......@@ -1474,6 +1475,10 @@ static void test_typelib_section(void)
ok(data.ulSectionTotalLength == data2.ulSectionTotalLength, "got %u, %u\n", data.ulSectionTotalLength,
data2.ulSectionTotalLength);
ok(data.lpSectionGlobalData == ((BYTE*)section + section->names_offset), "data.lpSectionGlobalData == NULL\n");
ok(data.ulSectionGlobalDataLength == section->names_len, "data.ulSectionGlobalDataLength=%u\n",
data.ulSectionGlobalDataLength);
/* test some actual data */
tlib = (struct tlibredirect_data*)data.lpData;
ok(tlib->size == sizeof(*tlib), "got %d\n", tlib->size);
......
......@@ -3294,8 +3294,8 @@ static NTSTATUS find_tlib_redirection(ACTIVATION_CONTEXT* actctx, const GUID *gu
data->lpData = tlib;
/* full length includes string length with nulls */
data->ulLength = tlib->size + tlib->help_len + sizeof(WCHAR);
data->lpSectionGlobalData = NULL;
data->ulSectionGlobalDataLength = 0;
data->lpSectionGlobalData = (BYTE*)actctx->tlib_section + actctx->tlib_section->names_offset;
data->ulSectionGlobalDataLength = actctx->tlib_section->names_len;
data->lpSectionBase = actctx->tlib_section;
data->ulSectionTotalLength = RtlSizeHeap( GetProcessHeap(), 0, actctx->tlib_section );
data->hActCtx = NULL;
......@@ -3517,8 +3517,8 @@ static NTSTATUS find_comserver_redirection(ACTIVATION_CONTEXT* actctx, const GUI
data->lpData = comclass;
/* full length includes string length with nulls */
data->ulLength = comclass->size + comclass->progid_len + sizeof(WCHAR);
data->lpSectionGlobalData = NULL;
data->ulSectionGlobalDataLength = 0;
data->lpSectionGlobalData = (BYTE*)actctx->comserver_section + actctx->comserver_section->names_offset;
data->ulSectionGlobalDataLength = actctx->comserver_section->names_len;
data->lpSectionBase = actctx->comserver_section;
data->ulSectionTotalLength = RtlSizeHeap( GetProcessHeap(), 0, actctx->comserver_section );
data->hActCtx = NULL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment