Implement WINRT_IMPL_LoadLibraryW to avoid calling LoadLibraryW directly (#8065)

* Override load library w in cppwinrt

* Add comment
This commit is contained in:
Ryan Lai 2021-06-22 14:31:20 -07:00 committed by GitHub
parent e7d7fa8fa2
commit 839f69d249
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -134,3 +134,8 @@ STDAPI DllGetActivationFactory(HSTRING classId, void** factory) {
return ret;
}
// LoadLibraryW isn't support on Windows 8.1. This is a workaround so that CppWinRT calls this function for loading libraries
void* __stdcall WINRT_IMPL_LoadLibraryW(wchar_t const* name) noexcept {
return LoadLibraryExW(name, nullptr, 0);
}