Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[0.72] Enable using newer CppWinRT versions that use WINRT_IMPL_LoadL…
…ibraryExW (#11986) This PR backports #11953 to RNW 0.72. ## Description CppWinRT >= 2.0.230524.3 no longer expose the `WINRT_IMPL_LoadLibraryW` method for loading libraries, instead preferring a new `WINRT_IMPL_LoadLibraryExW`. See microsoft/cppwinrt#1293. This PR fixes our usage of `WINRT_IMPL_LoadLibraryW` by detecting newer versions of CppWinRT and using the new API when available. ### Type of Change - Bug fix (non-breaking change which fixes an issue) ### Why Customers who tried to specify newer versions of CppWinRT hit build errors due to the use of the deprecated API. Closes #11795 ### What Created a macro to re-define the old API which calls the new API with the same behavior, as seen in the PR which deprecated the API in the first place. ## Screenshots N/A ## Testing Verified able to build against the latest [Microsoft.Windows.CppWinRT 2.0.230706.1](https://www.nuget.org/packages/Microsoft.Windows.CppWinRT/2.0.230706.1). ## Changelog Should this change be included in the release notes: yes Customers who specify their own version of Microsoft.Windows.CppWinRT can now use versions >= 2.0.230524.3.
- Loading branch information