Module: wine Branch: master Commit: 44d8f6a35a1e559315b606007c162b15322477ce URL: http://source.winehq.org/git/wine.git/?a=commit;h=44d8f6a35a1e559315b606007c...
Author: Nikolay Sivov nsivov@codeweavers.com Date: Mon Sep 2 11:03:19 2013 +0400
ntdll: For typelib and COM class sections point global data to module names.
---
dlls/kernel32/tests/actctx.c | 13 +++++++++---- dlls/ntdll/actctx.c | 8 ++++---- 2 files changed, 13 insertions(+), 8 deletions(-)
diff --git a/dlls/kernel32/tests/actctx.c b/dlls/kernel32/tests/actctx.c index 213674a..def61da 100644 --- a/dlls/kernel32/tests/actctx.c +++ b/dlls/kernel32/tests/actctx.c @@ -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); diff --git a/dlls/ntdll/actctx.c b/dlls/ntdll/actctx.c index a172d59..6458b06 100644 --- a/dlls/ntdll/actctx.c +++ b/dlls/ntdll/actctx.c @@ -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;