{"id":60975,"library":"cppwinrt","title":"C++/WinRT","description":"C++/WinRT is a standard C++ language projection for the Windows Runtime.","status":"active","version":"2.0.250303.1","language":"cpp","source_language":null,"source_url":null,"tags":["com","uwp","winrt","windows-runtime"],"install":[{"cmd":"vcpkg install cppwinrt","lang":"bash","label":"vcpkg"},{"cmd":"# CMakeLists.txt\nfind_package(cppwinrt CONFIG REQUIRED)\ntarget_link_libraries(main PRIVATE cppwinrt::cppwinrt)","lang":"cmake","label":"CMake"}],"dependencies":[],"imports":[{"symbol":"winrt/Windows.Foundation.h","correct":"#include <winrt/Windows.Foundation.h>"}],"quickstart":{"code":"#include <winrt/Windows.Foundation.h>\n#include <iostream>\nusing namespace winrt;\nint main() {\n    init_apartment();\n    Uri uri(L\"https://example.com\");\n    std::wcout << uri.Domain().c_str() << std::endl;\n    return 0;\n}","lang":"cpp","description":"Create a Windows Runtime URI"},"warnings":[{"fix":"Set CMAKE_CXX_STANDARD to 17 or higher and target Windows 10+","message":"Requires C++17 or later and Windows SDK","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"search_vec":"'/winrt':2,4 'c':1,3,8 'com':15 'languag':9 'project':10 'runtim':14,20 'standard':7 'uwp':16 'window':13,19 'windows-runtim':18 'winrt':17","created_at":"2026-06-17T04:34:20.160773+00:00","updated_at":"2026-06-17T04:34:20.160773+00:00","problems":[],"ecosystem":"vcpkg","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":null,"github":null,"docs":null,"changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["other"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-17","next_check":"2026-12-14","install_tag":null}}