Skip to content

[Doc] Add missing C++/WinRT includes to C++ get-started snippet#265

Open
yeelam-gordon wants to merge 1 commit intoMicrosoftDocs:docsfrom
yeelam-gordon:fix/61791708-cpp-getstarted-missing-includes
Open

[Doc] Add missing C++/WinRT includes to C++ get-started snippet#265
yeelam-gordon wants to merge 1 commit intoMicrosoftDocs:docsfrom
yeelam-gordon:fix/61791708-cpp-getstarted-missing-includes

Conversation

@yeelam-gordon
Copy link
Copy Markdown

@yeelam-gordon yeelam-gordon commented Apr 14, 2026

Problem

The C++/WinRT tab uses winrt:: async APIs but is missing Windows.Foundation.h and Windows.Foundation.Collections.h includes, causing compilation errors. Also uses blocking .get() instead of co_await.

Fix

  • Added #include <winrt/Windows.Foundation.h> and Windows.Foundation.Collections.h
  • Changed .get() to co_await

Files changed

  • docs/new-windows-ml/get-started.md — C++/WinRT tab

EnsureAndRegisterCertifiedAsync().get() requires Windows.Foundation.h
and Windows.Foundation.Collections.h for the projected return types.
Fixes ADO #61791708

Co-authored-by: Copilot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant