On Mon, Mar 16, 2020 at 7:07 AM Gabriel Ivăncescu <gabrielopcode(a)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