[PATCH 1/4] kernelbase: Implement compatibility mode for GetVersionEx.
Alex Henrie
alexhenrie24 at gmail.com
Mon Mar 16 15:07:16 CDT 2020
On Mon, Mar 16, 2020 at 7:07 AM Gabriel Ivăncescu
<gabrielopcode at gmail.com> wrote:
>
> + if (idx >= 0)
> + {
> + ver = &VersionData[WIN8];
> +
> + if (RtlQueryInformationActivationContext(0, NULL, NULL,
> + CompatibilityInformationInActivationContext, NULL, 0, &req) == STATUS_BUFFER_TOO_SMALL
> + && req)
> + {
> + if (!(acci = RtlAllocateHeap(GetProcessHeap(), 0, req)))
> + return NULL;
> +
> + if (RtlQueryInformationActivationContext(0, NULL, NULL,
> + CompatibilityInformationInActivationContext, acci, req, &req) == STATUS_SUCCESS)
> + {
Please use the goto keyword to avoid nesting a lot of if statements.
It'll make any future patches that modify this code much cleaner.
-Alex
More information about the wine-devel
mailing list