[PATCH] ntdll/exception: Change return type to CONTEXT* of RtlLocateLegacyContext.

Paul Gofman pgofman at codeweavers.com
Wed Sep 2 04:11:43 CDT 2020


On 9/2/20 09:11, Biswapriyo Nath wrote:
> -void * WINAPI RtlLocateLegacyContext( CONTEXT_EX *context_ex, ULONG 
> *length )
> +CONTEXT * WINAPI RtlLocateLegacyContext( CONTEXT_EX *context_ex, 
> ULONG *length )
>  {

Did you find a definition of this function in some version of SDK (I 
could not)?

The thing is, RtlLocateLegacyContext does not really return a 'CONTEXT 
*'. CONTEXT structure definition is arch specific, while Rtl context 
function work for x86 and x64 contexts on any of these archs. E. g., you 
can call RtlLocateLegacyContext() for x86 context on x64 then the return 
structure will be x86 version of context which is different from what 
you have defined as 'CONTEXT' in x64 build. So 'void *' looks more 
appropriate unless there is an evidence that Windows SDk defines it 
another way.





More information about the wine-devel mailing list