[PATCH v2 2/3] ntdll: Stub Wow64Transition.

Zebediah Figura z.figura12 at gmail.com
Wed Oct 28 09:54:43 CDT 2020


On 10/28/20 2:26 AM, Dmitry Timoshkov wrote:
> Zebediah Figura <z.figura12 at gmail.com> wrote:
> 
>> +#ifndef _WIN64
>> +void *Wow64Transition;
>> +#endif
>>  
>>  /***********************************************************************
>>   *           restart_winevdm
>> @@ -4061,6 +4064,14 @@ static NTSTATUS process_init(void)
>>      status = build_builtin_module( params->DllPath.Buffer, &nt_name, meminfo.AllocationBase, 0, &wm );
>>      assert( !status );
>>  
>> +#ifndef _WIN64
>> +    if ((status = load_dll( params->DllPath.Buffer, L"C:\\windows\\system32\\wow64cpu.dll",
>> +                            NULL, 0, &wm )) == STATUS_SUCCESS)
>> +        Wow64Transition = wm->ldr.DllBase;
>> +    else
>> +        WARN( "could not load wow64cpu.dll, status %#x\n", status );
>> +#endif
> 
> According to your test Wow64Transition is supposed to hold the pointer to
> pointer containing wow64cpu's base. What's the correct interpretation of
> Wow64Transition?
> 

It's apparently supposed to be a function pointer in wow64cpu.dll,
probably a 32-to-64 system call thunk. I.e. it's not supposed to point
to the DLL base, probably; it's just easier to set it to that, and
League of Legends is happy enough with it.

Note that the extra level of indirection apparent in the tests is just
due to GetProcAddress().

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20201028/2e3fdc0c/attachment-0001.sig>


More information about the wine-devel mailing list