-
Notifications
You must be signed in to change notification settings - Fork 264
Closed
Description
The code below has different output on Windows 7 depending on C++/WinRT version that was used for the code compilation due to hresult_error::message() is empty in last C++/WinRT (the code is compiled in latest VS2019):
C++/WinRT 2.0.200115.8: winrt::hresult_error: ClassFactory cannot supply requested class. Code: 0x80040111
C++/WinRT 2.0.200508.4: winrt::hresult_error: . Code: 0x80040111
#include <iostream>
#include <winrt/Windows.Foundation.Collections.h>
#include <winrt/Windows.Security.Authentication.Web.Core.h>
using namespace std;
using namespace winrt;
using namespace Windows::Foundation;
using namespace Windows::Security::Authentication::Web::Core;
int main(int argc, char* argv[])
{
try
{
auto wap = WebAuthenticationCoreManager::FindAccountProviderAsync(L"https://login.microsoft.com", L"organizations").get();
}
catch (const hresult_error& exc)
{
wcout << L"winrt::hresult_error: " << exc.message().c_str() << L". Code: 0x" << hex << exc.code() << endl;
}
}
Metadata
Metadata
Assignees
Labels
No labels