YexuanXiao.CppWinRTPlus.Ext 0.9.0.3

Requires NuGet 2.5 or higher.

dotnet add package YexuanXiao.CppWinRTPlus.Ext --version 0.9.0.3
                    
NuGet\Install-Package YexuanXiao.CppWinRTPlus.Ext -Version 0.9.0.3
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="YexuanXiao.CppWinRTPlus.Ext" Version="0.9.0.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="YexuanXiao.CppWinRTPlus.Ext" Version="0.9.0.3" />
                    
Directory.Packages.props
<PackageReference Include="YexuanXiao.CppWinRTPlus.Ext" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add YexuanXiao.CppWinRTPlus.Ext --version 0.9.0.3
                    
#r "nuget: YexuanXiao.CppWinRTPlus.Ext, 0.9.0.3"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package YexuanXiao.CppWinRTPlus.Ext@0.9.0.3
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=YexuanXiao.CppWinRTPlus.Ext&version=0.9.0.3
                    
Install as a Cake Addin
#tool nuget:?package=YexuanXiao.CppWinRTPlus.Ext&version=0.9.0.3
                    
Install as a Cake Tool

YexuanXiao.CppWinRTPlus.Ext

CppWinRTPlus.Ext provides a set of C++20 module interface extensions for C++/WinRT and the Windows App SDK.

Module winrtplus_coroutine

Provides coroutine helpers:

  • winrtplus::resume_foreground(dispatcher, priority)
  • co_await dispatcher

Supported dispatchers:

  • Windows::System::DispatcherQueue
  • Microsoft::UI::Dispatching::DispatcherQueue
  • Windows::UI::Core::CoreDispatcher

WinUI Interop Modules

The following module wrapper wraps the WinUI Interop header files from Microsoft.WindowsAppSDK.InteractiveExperiences as C++ modules.

All declarations remain in the original namespace.

winrtplus.Microsoft.UI.Interop

Wraps winrt/Microsoft.UI.Interop.h:

  • GetWindowIdFromWindow(HWND)
  • GetWindowFromWindowId(WindowId)
  • GetDisplayIdFromMonitor(HMONITOR)
  • GetMonitorFromDisplayId(DisplayId)
  • GetIconIdFromIcon(HICON)
  • GetIconFromIconId(IconId)

winrtplus.Microsoft.UI.Composition.Interop

Wraps winrt/Microsoft.UI.Composition.Interop.h:

  • ICompositionDrawingSurfaceInterop
  • ICompositionDrawingSurfaceInterop2
  • ICompositionGraphicsDeviceInterop
  • ICompositorInterop
  • ICompositorSwapChainInterop
  • IVisualInteractionSourceInterop

winrtplus.Microsoft.UI.Designer.Interop

Wraps winrt/Microsoft.UI.Designer.Interop.h:

  • IDesignerOutputHostInterop

winrtplus.Microsoft.UI.Dispatching.Interop

Wraps winrt/Microsoft.UI.Dispatching.Interop.h:

  • ContentPreTranslateMessage(const MSG*)

winrtplus.Microsoft.UI.Input.InputCursor.Interop

Wraps winrt/Microsoft.UI.Input.InputCursor.Interop.h:

  • IInputCursorStaticsInterop

winrtplus.Microsoft.UI.Input.InputPreTranslateSource.Interop

Wraps winrt/Microsoft.UI.Input.InputPreTranslateSource.Interop.h:

  • IInputPreTranslateKeyboardSourceHandler
  • IInputPreTranslateKeyboardSourceInterop

Requirements

  • Microsoft.Windows.CppWinRT 3.0.
  • Microsoft.WindowsAppSDK.InteractiveExperiences 2.0 (optional).
  • Enable C++/WinRT module generation with CppWinRTBuildModule.
  • Enable STL module support with BuildStlModules.
  • Define WINRT_ENABLE_LEGACY_COM globally.

If Microsoft.WindowsAppSDK.InteractiveExperiences is not installed, the relevant module will still exist, but will not contain any content.

Example project settings:

<PropertyGroup>
  <CppWinRTBuildModule>true</CppWinRTBuildModule>
</PropertyGroup>

<ItemDefinitionGroup>
  <ClCompile>
    <BuildStlModules>true</BuildStlModules>
    <PreprocessorDefinitions>WINRT_ENABLE_LEGACY_COM;%(PreprocessorDefinitions)</PreprocessorDefinitions>
  </ClCompile>
</ItemDefinitionGroup>
Product Compatible and additional computed target framework versions.
native native is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.9.0.3 91 6/12/2026
0.9.0.2 96 6/11/2026
0.9.0.1 92 6/11/2026