Commit 9f2c668c authored by Huw Davies's avatar Huw Davies Committed by Alexandre Julliard

rpcrt4/tests: Fix some tests on Win 8.

parent 4fbaab20
......@@ -397,6 +397,8 @@ static BOOL check_address(void *actual, void *expected)
{
static void *ole32_start = NULL;
static void *ole32_end = NULL;
static void *combase_start = NULL;
static void *combase_end = NULL;
if (actual == expected)
return TRUE;
......@@ -412,7 +414,21 @@ static BOOL check_address(void *actual, void *expected)
ole32_end = (void *)((char *) ole32_start + nt_headers->OptionalHeader.SizeOfImage);
}
return ole32_start <= actual && actual < ole32_end;
if (ole32_start <= actual && actual < ole32_end)
return TRUE;
/* On Win8, actual can be located inside combase.dll */
if (combase_start == NULL || combase_end == NULL)
{
PIMAGE_NT_HEADERS nt_headers;
combase_start = (void *) GetModuleHandleA("combase.dll");
if (combase_start == NULL)
return FALSE;
nt_headers = (PIMAGE_NT_HEADERS)((char *) combase_start + ((PIMAGE_DOS_HEADER) combase_start)->e_lfanew);
combase_end = (void *)((char *) combase_start + nt_headers->OptionalHeader.SizeOfImage);
}
return (combase_start <= actual && actual < combase_end);
}
static const ExtendedProxyFileInfo my_proxy_file_info =
......
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