Skip to content

Commit

Permalink
Always return true for API version checks originating from the CBS pa…
Browse files Browse the repository at this point in the history
…ckage. (#6373)
  • Loading branch information
StephenLPeters authored Nov 29, 2021
1 parent cced272 commit c9c45e2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion dev/dll/SharedHelpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,10 @@ template <uint16_t APIVersion> bool SharedHelpers::IsAPIContractVxAvailable()
if (!isAPIContractVxAvailableInitialized)
{
isAPIContractVxAvailableInitialized = true;
isAPIContractVxAvailable = winrt::ApiInformation::IsApiContractPresent(L"Windows.Foundation.UniversalApiContract", APIVersion);
// The CBS package is only ever used as a part of the Windows build. Therefore, we can assume that
// all API contracts are present since we can never be running these binaries on a windows build
// that does not match the windows sdk these binaries were compiled against.
isAPIContractVxAvailable = IsInCBSPackage() ? true : winrt::ApiInformation::IsApiContractPresent(L"Windows.Foundation.UniversalApiContract", APIVersion);
}

return isAPIContractVxAvailable;
Expand Down

0 comments on commit c9c45e2

Please sign in to comment.