mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-15 08:37:16 +00:00
ntdll/tests: Add some more tests for the contents of the WOW64INFO structure.
This commit is contained in:
parent
626f8d75e8
commit
572cc841a6
|
@ -414,6 +414,28 @@ static void test_peb_teb(void)
|
|||
}
|
||||
ok( i < limit, "wow64info not found in PEB\n" );
|
||||
}
|
||||
if (wow64info->SectionHandle && wow64info->CrossProcessWorkList)
|
||||
{
|
||||
HANDLE handle;
|
||||
void *data, *addr = NULL;
|
||||
SIZE_T size = 0;
|
||||
|
||||
ret = DuplicateHandle( pi.hProcess, (HANDLE)(ULONG_PTR)wow64info->SectionHandle,
|
||||
GetCurrentProcess(), &handle, 0, FALSE, DUPLICATE_SAME_ACCESS );
|
||||
ok( ret, "DuplicateHandle failed %lu\n", GetLastError() );
|
||||
status = NtMapViewOfSection( handle, GetCurrentProcess(), &addr, 0, 0, NULL,
|
||||
&size, ViewShare, 0, PAGE_READWRITE );
|
||||
ok( !status, "NtMapViewOfSection failed %lx\n", status );
|
||||
data = malloc( size );
|
||||
ret = ReadProcessMemory( pi.hProcess, (void *)(ULONG_PTR)wow64info->CrossProcessWorkList,
|
||||
data, size, &size );
|
||||
ok( ret, "ReadProcessMemory failed %lu\n", GetLastError() );
|
||||
ok( !memcmp( data, addr, size ), "wrong data\n" );
|
||||
free( data );
|
||||
UnmapViewOfFile( addr );
|
||||
CloseHandle( handle );
|
||||
}
|
||||
else trace( "no WOW64INFO section handle\n" );
|
||||
}
|
||||
else win_skip( "RtlWow64GetSharedInfoProcess not supported\n" );
|
||||
|
||||
|
|
|
@ -4103,14 +4103,16 @@ typedef struct _WOW64_CPU_AREA_INFO
|
|||
|
||||
typedef struct _WOW64INFO
|
||||
{
|
||||
ULONG NativeSystemPageSize;
|
||||
ULONG CpuFlags;
|
||||
ULONG Wow64ExecuteFlags;
|
||||
ULONG unknown[5];
|
||||
USHORT NativeMachineType;
|
||||
USHORT EmulatedMachineType;
|
||||
ULONG unknown2;
|
||||
ULONG NativeSystemPageSize;
|
||||
ULONG CpuFlags;
|
||||
ULONG Wow64ExecuteFlags;
|
||||
ULONG unknown;
|
||||
ULONGLONG SectionHandle;
|
||||
ULONGLONG CrossProcessWorkList;
|
||||
USHORT NativeMachineType;
|
||||
USHORT EmulatedMachineType;
|
||||
} WOW64INFO;
|
||||
C_ASSERT( sizeof(WOW64INFO) == 40 );
|
||||
|
||||
#define WOW64_CPUFLAGS_MSFT64 0x01
|
||||
#define WOW64_CPUFLAGS_SOFTWARE 0x02
|
||||
|
|
Loading…
Reference in a new issue