mcpField
W
windows-interop-modernize

windows-interop-modernize

github.com/fandhe-ai开发4199 次安装1 天前更新
代码仓库

关于 windows-interop-modernize

该技能是涵盖 Win32、COM、WinRT、WPF/WinForms 和 UWP 的互操作与现代化参考资料,面向维护 Windows 应用或规划迁移的开发者。它按任务分类文档,帮助定位相应 API、决策指南和操作步骤。

主要功能

  1. 01覆盖 Win32、COM 与 WinRT 互操作
  2. 02指导 WPF/WinForms 托管 XAML 内容
  3. 03提供 UWP 到 Windows App SDK 的迁移资料
  4. 04按任务映射到分类参考文档
  5. 05涵盖迁移决策与术语

适用场景

  1. 01评估既有应用的现代化或迁移路径
  2. 02在桌面应用中调用 WinRT API
  3. 03在 WPF 或 WinForms 中托管 WinUI 3 内容
  4. 04规划 UWP 应用迁移到 Windows App SDK

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/fandhe-ai/agent-reference-skills --skill windows-interop-modernize

安装后在 Claude Code 中输入/windows-interop-modernize确认已加载。

包含的文件

除 SKILL.md 外,安装时一起下载的参考资料和脚本。

references/cppwinrt/
advanced-concurrency.md
agile-objects.md
async-coroutines.md
author-apis.md
author-coclasses.md
base-type.md
binding-collection.md
boxing.md
collections.md
com-ptr-iinspectable.md
completion-source.md
consume-apis.md
consume-com.md
diag-direct-alloc.md
error-handling.md
events-delegates.md
extension-points.md
get-started.md
init-apartment.md
interop-abi.md
interop-winrt-cx-async.md
interop-winrt-cx.md
macros.md
move-to-winrt-from-csharp.md
move-to-winrt-from-cx.md
move-to-winrt-from-wrl.md
naming.md
native-interop.md
natvis.md
overview.md

详细介绍

Windows Interop / Modernize リファレンス

Win32・COM・C++/WinRT・C#/WinRT・XAML Islands・WPF/WinForms・UWP を横断する相互運用と近代化のリファレンス。 既存の Win32/WPF/WinForms/UWP 資産に WinRT API や WinUI 3 コンテンツを組み込む、または UWP から Windows App SDK へ移行する際の API・手順を蒸留する。 ユーザーのタスクに応じて適切な README.md を読み、そこから個別ファイルへ辿ること。

ディレクトリ構成

skills/windows-interop-modernize/
  SKILL.md
  references/
    migration-planning/
      README.md
      migration-decision-guide.md
      migration-terminology.md
      modernize-overview.md
    win32-com/
      README.md
      com-create-instance.md
      com-initialization.md
      com-smart-pointers.md
      create-window.md
      cswin32.md
      dialog-box.md
      dpi-awareness.md
      extended-window-styles.md
      hresult-error-handling.md
      iunknown.md
      message-box.md
      message-loop.md
      pinvoke-csharp.md
      register-window-class.md
      win32-data-types.md
      window-lifecycle.md
      window-messages.md
      window-procedure.md
      window-styles.md
      windows-rs.md
    cppwinrt/
      README.md
      advanced-concurrency.md
      agile-objects.md
      async-coroutines.md
      author-apis.md
      author-coclasses.md
      base-type.md
      binding-collection.md
      boxing.md
      collections.md
      com-ptr-iinspectable.md
      completion-source.md
      consume-apis.md
      consume-com.md
      diag-direct-alloc.md
      error-handling.md
      events-delegates.md
      extension-points.md
      get-started.md
      init-apartment.md
      interop-abi.md
      interop-winrt-cx-async.md
      interop-winrt-cx.md
      macros.md
      move-to-winrt-from-csharp.md
      move-to-winrt-from-cx.md
      move-to-winrt-from-wrl.md
      naming.md
      native-interop.md
      natvis.md
      overview.md
      pass-parms-to-abi.md
      projection-headers.md
      std-cpp-data-types.md
      strings.md
      troubleshooting.md
      use-csharp-component-from-cpp-winrt.md
      weak-references.md
      xaml-binding.md
      xaml-cust-ctrl.md
    csharp-winrt/
      README.md
      agile-objects.md
      aot-trimming.md
      api-availability-checks.md
      async-operations.md
      authoring-winrt-components.md
      com-interop.md
      dotnet-winrt-removal.md
      net-mappings-of-winrt-types.md
      net-projection-from-cppwinrt-component.md
      overview.md
      sdk-net-ref-targetframework.md
      window-handle-interop.md
      winrt-api-desktop-support.md
    xaml-islands/
      README.md
      desktop-child-site-bridge.md
      desktop-window-xaml-source.md
      dpi-and-sizing.md
      hosting-wpf-winforms-win32.md
      input-focus-navigation.md
      limitations.md
      overview.md
      uwp-vs-winui3-migration.md
      windows-xaml-manager.md
    wpf-winforms-interop/
      README.md
      ai-assisted-wpf-migration.md
      copilot-modernization-guide.md
      dotnet-upgrade-assistant.md
      hwndhost-hwndsource.md
      windows-app-sdk-existing-project.md
      winforms-application-run.md
      winforms-designer.md
      winforms-form-control.md
      winforms-patterns-winui3.md
      winrt-apis-in-wpf-winforms.md
      wpf-application.md
      wpf-basic-controls.md
      wpf-commanding.md
      wpf-data-binding.md
      wpf-dependency-property.md
      wpf-routed-events.md
      wpf-styles-templates.md
      wpf-vs-winui3.md
      wpf-window.md
      wpf-winforms-hosting.md
      wpf-xaml-overview.md
    uwp-migration/
      README.md
      ai-assisted-migration.md
      applifecycle-migration.md
      background-task-migration.md
      case-study-1-photolab.md
      case-study-2-photo-editor.md
      dwritecore-migration.md
      feature-mapping.md
      keyboard-events-migration.md
      migration-overview.md
      misc-migration-guidance.md
      mrtcore-migration.md
      namespace-mapping.md
      overall-migration-strategy.md
      push-notifications-migration.md
      threading-migration.md
      toast-notifications-migration.md
      upgrade-assistant.md
      what-is-supported.md
      windowing-migration.md
      winui3-ui-migration.md

探索手順

タスクからカテゴリを引き、カテゴリの README.md で目的のページを特定する:

  1. 下記マッピング表でタスクに対応するカテゴリを探す
  2. そのカテゴリの references/{category}/README.md を参照して目的のページを特定する
  3. 該当ページの .md を Read して詳細を確認する

任务 → 类别映射

任务类别参考 README
想判断现有应用应采用 upgrade / 原地现代化 / 迁移到 WinUI 3 中的哪种方式,想确认术语(upgrade / migrate / port / modernize)migration-planningreferences/migration-planning/README.md
想了解可添加到现有 WPF / WinForms / Win32 应用的 Windows 功能,以及是否需要 Windows App SDK 和 package identitymigration-planningreferences/migration-planning/README.md
想使用 CreateWindowExW / WNDPROC / 消息循环创建原生 Win32 窗口win32-comreferences/win32-com/README.md
想初始化和创建 COM 对象并管理引用计数(CoInitializeEx、CoCreateInstance、IUnknown、ComPtr)win32-comreferences/win32-com/README.md
想从 C# 通过 CsWin32 / P/Invoke 调用 Win32 API,或从 Rust 使用 windows-rswin32-comreferences/win32-com/README.md
想在 C++ 中使用或创建 WinRT 运行时类,并处理异步操作或事件cppwinrtreferences/cppwinrt/README.md
想了解 C++/WinRT 的高级异步(resume_after / resume_on_signal / completion_source)、C++/CX 异步互操作、基类 override、natvis、直接分配诊断和故障排除cppwinrtreferences/cppwinrt/README.md
想通过 IDL 创建 API,并实现 ABI、原生互操作或错误处理cppwinrtreferences/cppwinrt/README.md
想从 C# 调用 WinRT API,并了解 TFM 配置、异步操作和类型映射csharp-winrtreferences/csharp-winrt/README.md
想使用 ComWrappers / 支持 AOT 和 trimming,或创建 WinRT 组件csharp-winrtreferences/csharp-winrt/README.md
想在 WPF/WinForms/Win32 应用中托管 WinUI 3 的 XAML 内容xaml-islandsreferences/xaml-islands/README.md
想使用 DesktopWindowXamlSource / DesktopChildSiteBridge 处理焦点、DPI 和尺寸同步xaml-islandsreferences/xaml-islands/README.md
想了解 WPF / WinForms 现有应用的基本 API(Window、Application、DependencyProperty、数据绑定)wpf-winforms-interopreferences/wpf-winforms-interop/README.md
想通过 HwndHost/HwndSource 或 WindowsFormsHost/ElementHost 在 WPF 与 WinForms・Win32 之间相互托管wpf-winforms-interopreferences/wpf-winforms-interop/README.md
想在 WPF/WinForms 中添加 Windows App SDK 并调用 WinRT APIwpf-winforms-interopreferences/wpf-winforms-interop/README.md
想将 WinForms 控件、布局、绑定和启动流程对应到 WinUI 3,或借助 AI Agent 推进 WPF 迁移wpf-winforms-interopreferences/wpf-winforms-interop/README.md
(尚未确定迁移路径时,请从 migration-planning 开始)想了解将 UWP 应用迁移到 Windows App SDK / WinUI 3 的整体策略和命名空间对应关系uwp-migrationreferences/uwp-migration/README.md
想迁移窗口管理、线程处理、通知和后台任务的 UWP 专属 APIuwp-migrationreferences/uwp-migration/README.md
想使用 .NET Upgrade Assistant 推进机械式迁移uwp-migrationreferences/uwp-migration/README.md
想参考 PhotoLab(C#)/ Photo Editor(C++/WinRT)的迁移案例,或使用 AI 编码 Agent 自动化迁移uwp-migrationreferences/uwp-migration/README.md

此技能仅涉及 Win32、COM、C++/WinRT、C#/WinRT、XAML Islands、WPF/WinForms 和 UWP 之间的互操作及迁移步骤。WinUI 3 控件 API 本身由 windows-winui-controls 负责;布局、样式和 XAML 语法由 windows-winui-ui 负责;Windows App SDK 运行时功能由 windows-app-sdk 负责。MSIX packaging / package identity 详情由 windows-packaging-publish 负责,Windows AI Foundry 由 windows-ai 负责。

评论

支持 Markdown