Код: Выделить всё
// WinRT.cpp
// Single source file runs
#include
#include
#include
#pragma comment(lib, "windowsapp.lib")
using namespace winrt;
using namespace Windows::Foundation;
using namespace Windows::Web::Syndication;
int main()
{
winrt::init_apartment();
Uri rssFeedUri{ L"https://blogs.windows.com/feed" };
SyndicationClient syndicationClient;
SyndicationFeed syndicationFeed = syndicationClient.RetrieveFeedAsync(rssFeedUri).get();
for (const SyndicationItem syndicationItem : syndicationFeed.Items())
{
winrt::hstring titleAsHstring = syndicationItem.Title().Text();
std::wcout
Исключение < /p>
Исключение, выброшенное по адресу 0x00007ffd9c78a839 в Winrt.exe: Microsoft C ++ Exception: winrt :: hResult_error at memoriefore 0x0000f009cffa00. /> < /blockquote>
Что пошло не так? Заранее спасибо.
Подробнее здесь: [url]https://stackoverflow.com/questions/73351032/running-c-winrt-quick-start-but-cause-exception-in-vs2022[/url]